Very cool paulb, I’ll try it out it will certainly be very useful for online documentation or editorial content... nice !
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id
I made some corrections to the documentation. The corrected usage example looks like this (I originally left off the "#toc_plugin#_" part on some of the lines. Sorry about that:
<!--#toc_plugin#_START_CONFIGURATION-->
<!--#toc_plugin#_list_type=ul-->
<!--#toc_plugin#_start_level=2-->
<!--#toc_plugin#_end_level=3-->
<!--#toc_plugin#_header=Page Contents-->
<!--#toc_plugin#_header_tag=h2-->
<!--#toc_plugin#_parent_tag=div-->
<!--#toc_plugin#_parent_tag_id=toc-->
<!--#toc_plugin#_END_CONFIGURATION-->
<!--#toc_plugin#_TOC_OUTPUT-->
<!--#toc_plugin#_START_TOC_INDEXING-->
<h2>Here is a heading</h2>
<p>Here is some text</p>
<h2>Here is another heading</h2>
<h3>Here is a subheading</h3>
<h3>Here is another subheading</h3>
<!--#toc_plugin#_END_TOC_INDEXING-->
Hi,
I love your plugin but there’s something going wrong with my website, your plugin takes away my <h> tags and thus my header tags aren’t properly styled anymore..
Can you help me out?
Wouter
If you could post the way the code looks before (in MODx) and after (the way it is rendered in the browser), that might help diagnose the problem.
You’ve found a bug. It appears that the plugin fails when you have attributes in the heading tag. I’ve mentioned this to the programmer, and he’ll post an update when he gets the chance. In the meantime, you could align the heading some other way. For example, in the style sheet, you could do something like this:
h2 {
text-align:center;
}
Note: You may also want to clean up the code a bit. You’ve got a stray ">" after the opening h2 tag, and your closing tag does not match the opening tag (closing tag is h1, opening tag is h2). Fixing these things won’t fix the plugin, but it will improve your page a bit.
The code has been updated. You can now have attributes in header elements, e.g. <h2 align="center">