00126: bring an expanded (:breakpage:) directive into the core

Summary: bring an expanded (:breakpage:) directive into the core
Created: 2004-10-28 17:05
Status: Open
Category: CoreCandidate
From: jr
Assigned:
Priority: 55533 3
Version: 2.0devel19
OS: all

Description: The current Cookbook/BreakPage extension lets authors cut a long page into pieces, which then get displayed one page at a time. The recipe provides a list of page numbers as links in browse mode and the printable view shows the entire page. This is very useful, but could be made even more useful.

The Cookbook/MarkupExtensions take this a little further:

  • use __ (4 underscores) instead of (:breakpage:)
  • add a tool tip to the page number links, that shows a cleaned version of the first paragraph of the referenced page

This issue proposes that we:

  1. add ____ to the PmWiki 2 core
  2. support, but deprecate and later remove, (:breakpage:)
  3. add an Edit Page n link to the top of the displayed text
  4. clicking the link gives you just the text being viewed
  5. Preview shows just the chunk being edited
  6. Save takes you to Group/Page?p=n
  7. the chunk edited should start (or possibly end) with ____
  8. Edit Page continues to function in the usual way

This appears to be simple to implement:

Divide the page into prechunk, chunk and postchunk, where "chunk" is the piece being edited.
Give every edit form both "prechunk" and "postchunk" attributes which are always processed when posting the data--for editing a whole page (i.e., no p= attribute supplied) the prechunk and postchunk values are simply set to null and the full text is placed in the edit box.
On Save, recombine prechunk, chunk and postchunk, then give the result to the HandleEdit function.

Sounds good, but I would prefer some kind of section editing (well in fact your suggestion is kind of that). I'm currently enhancing the Cookbook/SectionEdit script and faced some problems that should not be forgotten if such a function is implemened:

  • simultaneous edits (a major one) - requires a rewrite IMHO especially when text at the boundaries of the pages (or sections) is added or deleted while someone else saves at the same time (confict situation). Display of the difference would be currently very strange.
  • "Save and Edit" should only work for the edited part of the text (that's fairly easy)
  • What about the RecentChanges or AllRecentChanges page? What should be mentioned there? Only the page that was changed or the part (section) of the page?? (This does not apply to the sectionedit recipe, but should still be considered)

Klonk September 16, 2005, at 02:58 PM BTW: Such a sectionedit feature would be very helpful for e.g. Cookbook Klonk January 03, 2006, at 08:37 AM


I just noticed that with an existing Wiki, underscores as in the ____ markup might have been used for other puposes, introducing undesired and confusing pagebreaks when the markup is enabled. From that perspective, a directive has advantages. --Henning October 02, 2009, at 06:57 AM