SID-02137: % TOC % Variable using !!
| Status: |
Answered |
TWiki version: |
|
Perl version: |
|
| Category: |
WysiwygPlugin |
Server OS: |
|
Last update: |
10 years ago |
Every time I use !! to block part of a sentence from being included in the table of contents it ends up moving to the front of my sentence thus deleting my whole topic from the TOC.
Ex:
Starts looking like this:
---+++++ C. TYPES OF Topics !! - Alabama is a Mortgage state.
After saving and reediting it. I open to it looking like this:
---+++++!! C. TYPES OF Topics – Alabama is a Mortgage state.
Is there a way I can prevent this from happening.
--
Jonathan Mayran - 2015-12-21
Discussion and Answer
Whoa - I wasn't even aware that
!! could be used to suppress
part of a heading to appear in the table of contents. It isn't written in the
TextFormattingRules, nor in the test suite. I just found it in the
Description for TOC, though, so apparently it is a documented feature.
And probably that's also the root cause: The developers didn't have that feature in mind when they implemented the necessary conversions between WYSIWYG- and "traditional" markup editing.
As a workaround you can "Raw edit" such topics, this keeps the headers intact.
For a fix, you can file a bug report: Round trips without changing anything in a heading must not change its rendering.
With regard to the editing interface, this needs the eyes of people familar with the WYSIWYG editor: So far I haven't spotted a possibility to
remove the "hide in TOC" state from a heading, or to even
see that a heading wouldn't appear in the TOC.
--
Harald Jörg - 2015-12-22
As another workaround, I'll attach a simple patch (
https://twiki.org/p/pub/Support/SID-02137/SID-02137.diff): This avoids moving
!! to the front of the line, at the expense of keeping it visible while editing the page in WYSIWYG mode.
--
Harald Jörg - 2015-12-22
Thank you Harald for the patch! Having the
!! visible in WYSIWYG edit mode is actually good I think.
--
Peter Thoeny - 2015-12-23
Can you please tell me how to implement this patch that you have posted. I apologized I am a twiki novice.
--
Jonathan Mayran - 2015-12-23
See
HowToApplyPatch
--
Peter Thoeny - 2015-12-24
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.