key Log In

You are here: wiki.fini > TWiki Web > SectionalEditPlugin

Start of topic | Skip to actions

Sectional Edit Plugin

Discussion of this plugin can be found in SectionalEditPluginDev.

This plugin allows the user to break a topic into sections which can be edited individually.

ALERT! There is a known problem in that if the last character in a section is a TWiki markup, the markup will be rendered verbatim. Nevertheless, due to many requests I have put the plugin here without having addressed this final issue.

Syntax Rules

To enable editing of:

  • One or more sections, insert a <sectionbreak/> tag on the line above each heading marker (---+) or deeper;
  • Any portion of a topic, enclose that portion between <sectionedit> and </sectionedit> tags;
  • The entire topic, insert the <editsections/> tag on the first line of the topic; or
  • On all topics, by default, set the preference flag EDITSECTIONS to true (in either user or web preferences). With this approach, the preference variable SECTIONDEPTH (again set in either user or web) controls the level of headings down to which SectionalEditPlugin will apply (with all lower headings/sections being included in that section).

NOTE: You cannot mix these three methods on a single page.

NOTE: This breaks the page up at the lowest level, meaning that you can't put section breaks inside tables, lists, etc. as it breaks the whole page up into a table.

SectionalEditPlugin Settings

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Allows the user to break a topic into sections for individual editing.

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 0

  • Edit Label (may also be an <img> tag):
    • Set LABEL = Edit

  • A comma separated list of skins NOT to section (you'll probably want the print skin here):
    • Set SKIPSKIN = print, plain

  • Style for marking sections. This is either an inline style definition or a class reference. If left blank, a bar of BGCOLOR is placed next to the sections that can be edited. Style definitions may also be placed with the <sectionedit> tag to give individual sections a different style.
    • Set STYLE = style="border: black thin dotted"
    • #Set STYLE = class="twikiTopicActions"
    • #Set STYLE =

  • Placement of the Edit Label (below or above, only valid together with the STYLE setting)
    • Set PLACEMENT = Below

  • Left or Right Justification of Edit Label
    • Set JUSTIFICATION = Right

  • Edit Bar Background Color:
    • Set BGCOLOR = silver

Plugin Installation Instructions

  1. Download the zip file.
  2. Unzip the zip file into your twiki web folder.
  3. Verify access and ownership settings for the new scripts.
  4. Edit your .htaccess file to require a valid user for the editsection and previewsection scripts.

Plugin Info

Plugin Author: TWiki:Main.DanBoitnott
Plugin Maintainer: TWiki:Main.JohnKnottenbelt, TWiki:Main.ThomasWeigert (03 Feb 2005 onwards)
Plugin Version: 17 Jul 2006
Change History: 17 Jul 2006: Added use strict. Removed use of startRenderingHandler. Support render script.
17 Jun 2006: Fixed an interaction with plugins that generate Javascript, such as TreeBrowserPlugin?
12 Jun 2006: Transitioned to Dakar Release
4 Aug 2005: Updated definition of styles with <sectionedit> tag
2 May 2005: Fixed caching problem when using SpeedyCGI?
12 Apr 2005: Corrected documentation. Add the ability to define styles for the edited sections, in addition to the bar next to an editable section.
21 Mar 2005: Integrate 21 Mar version of TWiki:Plugins/EditContrib
20 Mar 2005: Resolved problems due to discrepancies between browsers in handling URL parameters
12 Mar 2005: Abstract additional features into TWiki:Plugins/EditContrib
08 Mar 2005: Rely on TWiki:Plugins/EditContrib to pull out code common to serveral plugins.
27 Feb 2005: Do not edit attached form, if any, when editing sections. Made more consistent with lib/TWiki/UI/
13 Feb 2005: Integrate savemulti capability. Render text before and after the section being edited.
12 Feb 2005: Added SECTIONDEPTH preference variable.
11 Feb 2005: Added EDITSECTIONS preference variable with the same effect as inserting an <editsection/> tag in every topic.
03 Feb 2005: Preliminary port to cairo with support for PatternSkin. Does not yet support savemulti.
06 April 2004: Custom edit width / edit height / edit style (defaults to same as ordinary edit). BGCOLOR is now interpreted so you can set it to be the same as %WEBBGGOLOR% if you like. Edit bar can be left or right justified. Added <editsections/> tag which automatically splits on section headers ---+ Updated bin/editsection program and templates.
21 Sep 2003: Fixed a few bugs in plugin (especially the double-quote problem)
11 May 2003: JohnCavanaugh's tag method added
16 Mar 2003: Windoze compatibility issue corrected
12 Feb 2003: Break replacement bug fixed
11 Feb 2003: False dependencies HTML::Entities fixed properly
11 Feb 2003: False dependencies on Ispell & HTML:Entities fixed
09 Feb 2003: Added ability to exclude certain skins (like print) from sectioning
07 Feb 2003: Wordwrap fixed in edit page
06 Feb 2003: Initial version
CPAN Dependencies: none
Other Dependencies: TWiki:Plugins/EditContrib
Perl Version: 5.0
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/SectionalEditPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/SectionalEditPluginDev

Discussion

Discussion of this plugin can be found in SectionalEditPluginDev.

Related Topics: TWikiPlugins, EditContrib

-- TWiki:Main/ThomasWeigert - 17 Jun 2006

This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding wiki.fini? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.SectionalEditPlugin