-
Bug
-
Resolution: Fixed
-
High
-
2.6.0
-
None
It is currently impossible for macros which have a body that contains wiki markup to be correctly rendered or converted when switching between RichText and wiki markup editing. For example, the {toc-zone} macro generates a table of contents for all headings contained within it's body. However, when it's contents are viewed in the RTE bad stuff happens. Here are the options, with all possible combinations of the 'supressMacroRenderingDuringyWysiwyg' ('Macro Rendering') and 'suppressSurroundingTagDuringWysiwygRendering' ('Surrounding Tag') methods:
Suppress Macro Rendering | Suppress Surrounding Tag | Result |
---|---|---|
false | false | All content is unrendered and wiki markup for the {toc-zone} is displayed. Eg. 'h1.' displays as 'h1.', not a pretty heading. Not what I would expect. |
true | false | All content is unrendered and wiki markup for the {toc-zone} is displayed. |
true | true | All content is rendered and wiki markup for the {toc-zone} is suppressed. Additionally, once you switch to and from RTE mode, or save, the original {toc-zone} markup is lost, and will no longer dynamically update. Not only that, but the hard-coded markup will loose it's links also. Not exactly what I had in mind. |
false | true | All content is rendered and wiki markup for the {toc-zone} is suppressed. However, as above, switching between RTE and wiki mode will corrupt the page irretrievably. |
Essentially, it seems that the 'Suppress Macro Rendering' option is not working as expected - it seems that 'Suppress Surrounding Tag' is the only flag which has any effect, and when enabled it will do both - either display the markup for everything or display the markup for nothing.
In any case, I think that a better option would be to allow an option for macros to specify that the macro body to be rendered, rather than the whole macro. Some cases will still want the exiting options (if they actually worked, that is), but in the example of {toc-zone} it would be much more useful to be able to display the
{toc-zone}macro itself, but have it's body markup rendered as per usual. As such, perhaps an extra option to 'suppressMacroBodyRenderingInWysywiyg' could be added, which will be trumped if the 'suppressMacroRenderingInWysiwiy' returns true.
But even if that is not added, getting the other two flags to work correctly would help a lot...
- causes
-
CONFSERVER-10473 {toc-zone} macro breaks WYSIWYG editor <-> wiki markup editing
- Closed
- is related to
-
CONFSERVER-12149 Third-party macros should be able to specify whether macro body should be displayed in Rich Text editor
- Closed
-
CONFSERVER-16071 Macro filter for Rich Text Editor
- Closed