DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:header3

This is an old revision of the document!


Header3 Plugin

Compatible with DokuWiki

adora belle

plugin Allows markup syntax in the header and keeps your linebreaks like you entered them in the editscreen.

Last updated on
2013-02-04
Provides
Syntax, Render
Repository
Source
Conflicts with
include, tcycle

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Similar to header2, linebreak, wikiformatstyling, xbr

Tagged with headings, syntax, typography

Description

This plugin enables the preservation of line breaks from the raw wiki text through to the html output and allows links and other markup in headers/headlines.

Note, the plugin does not preserve multiple consecutive line breaks, but it will preserve single line breaks.

Installation and Usage

Download and install the plugin using the Plugin Manager using the URL given above. Refer to Plugins on how to install plugins manually.

After installation, set 'renderer_xhtml' to “Header3” in the configuration manager.

:!: The TOC is rendered by metadata renderer instead of xhtml renderer in general 'show' action. However in 'preview' mode the TOC is rendered by xhtml renderer. So in few situations you'll find the TOC different in preview and in show mode. (mostly it doesn't happen since metedata renderer renders 'abstract' for the article and what it does is to have all markups parsed except no html tags)

Discussion

Alternative of using renderer

This renderer is just a hack to overwrite “private” attribute of the xhtml renderer.

If you use a link with empty label (2nd parameter), you might get the title lost in the TOC. For example:

[[:start|]]

To avoid this problem, do not use an empty label (i.e. no label or non-blank label are ok). The followings are OK:

[[:start]]
[[:start|Start]]

This is due to a problem in the core metadata renderer in and before dokuwiki-2010-11-07a “Anteater”, which is already reported here.

Conflicts

After activating this plugin and changing the xhtml renderer to header2 all my instances of the include plugin using “section” no longer work..the whole page is shown instead. Upon deactivating this plugin, the include works again. - Andy 2011/01/24

Conflict with tcycle because of Header3's renderer include br-tags between pairs of a-tags and tCycle try to switch css display:none/block on it, so an animation would have a pauses, equals to measures, choosed in tCycle syntax options.

How to make it work with DokuWiki's (2014-09-29a "Hrun")

I've found one provisional solution that worked for me! - Guenther, Oct. 10th, 2014

Change in DokuWiki's (2014-09-29a “Hrun”) XHTML-Renderer /inc/parser/xhtml.php some methods from 'protected' to 'public':

Line 30: protected $sectionedits = array();
change to: public $sectionedits = array();

Line 43: protected $lastlevel = 0;
change to: public $lastlevel = 0;

Line 45: protected $node = array(0, 0, 0, 0, 0);
change to: public $node = array(0, 0, 0, 0, 0);

plugin/header3.1428275664.txt.gz · Last modified: 2015-04-06 01:14 by 37.200.79.3

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki