EditPreview
<< | Cookbook-V1 | >>
Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.
Goal
Provide a way to preview the contents of a page being edited before saving the changes.
Solution
This script adds a Preview button to the Edit page, for PmWiki/PmWiki versions 0.5 and above.
Attach:preview.php - source code
Discussion
PmWiki versions 0.5.21 and later already have page preview capabilities integrated. This page is provided for historical reference.
Put preview.php
in your local
directory and add the line include_once("local/preview.php")
to local.php
.
The script redefines the default page headers and footers to make it clear that this is a preview. Deleting these lines will cause PmWiki/PmWiki to display the standard headers and footers. All directives (noheader
and so on) work as expected in the Preview.
<#>? implemented this feature in pmwiki-0.5.21, but this was an interim solution provided for versions of PmWiki from 0.5.0 to 0.5.20.
Modified 29 July 2003 to add Page is unsaved to the default page header.
Contributors
- John Rankin
- Bernhard Weichel - initial sketch [(approve links) edit diff]
pmwiki-2.4.4 -- Last modified by {{}}?