Section Edit

Author: WikiAdmin
Status: Implemented
version: 1.0 (see repo)


Allows to edit page section.


  • pull repo head for master or 6.1 branch, or download recent 6.1.25 package (please download the updated package)
  • activate section_edit in the Admin panel (Preferences -> Basic -> Editing)


  • config option for maximum section edit level (see WackoFormatter class)
  • user setting
  • refactoring, functions
  • GUI and message sets
  • section edit link to revisions
  • breaks with a === markup at the beginning of a new line
    • "/\n[ \t]*(={3,7})(.*?)={2,7}$/um" works - however does not works with text, even spaces, behind the header
    • solution?

What works:

  • edit section, including nested sections
  • section edit for included pages
  • section edit for comments
  • shows a edit link on the left for each page sub-header (h2 - h6)
  • shows a section header, a new icon there is (self made!)
  • preview takes section level for header
  • redirects after edit to edited section
  • installer purges body_toc
  • editsection action takes context to determine tag for pages


  • All the magic happens in the edit handler. The edit section link is set within the header as editsection action in the WackoFormatter class.
  • The regex solution to build the page section array may be improved, see extract_sections() function in Wacko class.

This feature is at least since 2006 on the feature wishlist. It will help the user to edit just the section without scrolling through all the other sections,
it's a huge time saver and reduces the cognitive load.

The goal is to sort out open issues and add it to the core as soon as possible (even marked as experimental at the beginning and turned off by default).

Test the patch and share your ideas.

Implementation Notes

  • Some notes


  • section_edit

Implementation Log


  • Please provide feedback