Loading...
 
Skip to main content

maketoc does not work with wysiwyg

Status
Pending
Subject
maketoc does not work with wysiwyg
Version
6.x
7.x
Category
  • Error
Feature
WYSIWYG (What You See is What You Get)
Submitted by
Nelson Ko
Lastmod by
beanstone
Rating
(0)
Description
maketoc does not generate any table of contents (only the heading "Table of Contents" shows) on a wysiwyg page
Solution
fix in r30196
Workaround
Version 7: Problem is, that <h1> is translated to wiki-syntax, but <h1 something> isn't.


In (tikifolder)/lib/tikilib.php insert

Copy to clipboard
$htmlheadersearch = '/<h([1-6])\s*([^<]+)\s*>\s*([^<]+)\s*<\/h[1-6]>/im'; preg_match_all($htmlheadersearch, $data, $htmlheaders); $nbhh=count($htmlheaders[1]); for ($i = 0; $i < $nbhh; $i++) { $htmlheaderreplace = ''; for ($j = 0; $j < $htmlheaders[1][$i]; $j++) { $htmlheaderreplace .= '!'; } $htmlheaderreplace .= $htmlheaders[3][$i]; $data = str_replace($htmlheaders[0][$i], $htmlheaderreplace, $data); }


after Line 5843

Importance
9 high
Priority
45
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
3589
Created
Friday 15 October, 2010 22:09:39 UTC
by Nelson Ko
LastModif
Monday 24 October, 2011 11:10:29 UTC


Show PHP error messages