PreviewChanges

Summary: Preview highlighted changes of the wiki markup
Version: 2.2.118
Prerequisites: PmWiki versions 2.2.13 or newer
Status: Stable, added to core
Maintainer: Petko
Users: +8 (view / edit)
License: GPL3+

Show highlighted changes of the wiki markup when previewing a modified page.

This feature has been integrated in the PmWiki core as of version 2.2.118. Please uninstall the recipe if you upgrade, and set in config.php:

  $EnablePreviewChanges = 1;

Description

While editing a page in "preview" mode, a diff block is shown before the rendered page output. The diff block contains, like a page history, highlighted differences between the saved version of the page and the currently edited text.

Demo: The recipe is now enabled on pmwiki.org, edit any page and press the "Preview" button.

Installation, PmWiki 2.2.118 or newer

Add to config.php:

  $EnablePreviewChanges = 1;

Installation, PmWiki 2.2.113 to 2.2.117

  • Copy previewchanges.phpΔ to your pmwiki/cookbook directory.
  • Add to config.php such a line:
    if(@$_REQUEST['preview']>'') include_once("$FarmD/cookbook/previewchanges.php");

Configuration

No configuration is required. The recipe will use the same functions that create and display the page history.

Usage

While modifying a page, press the "Preview" button. Above the rendered page output you will see a block with highlighted differences between the versions.

Notes

  • The recipe requires PmWiki version 2.2.13 or newer.
  • An old version of the recipe InlineDiff is reported to conflict with PreviewChanges.

Change log / Release notes

  • 20190820 : function included in the PmWiki core version 2.2.118.
  • 20111019 : first public release, ready to be tested.

See also

Cookbook /
ViewDiff  Compare arbitrary revisions and view a particular version. (Beta)

Contributors

  • Recipe written and maintained by Petko (5ko [snail] 5ko [period] fr).
  • If this recipe helps you or saves you time, you can help support its continued development by .

Comments

See discussion at PreviewChanges-Talk

User notes +8: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.