Item2619: Code segments getting mangled when saved with TinyMCEPlugin
Priority: Normal
Current State: No Action Required
Released In: n/a
Target Release: n/a
We are using Foswiki 1.0.5, with
DpSyntaxHighlighterPlugin 5964,
TinyMCEPlugin 5860, and
WysiwygPlugin 5356. If I add a code segment to a page using code/endcode syntax in raw edit, save it, then at any point in the future edit the same page in wysiwyg mode and save, it will munge the code segment, deleting line returns, changing less than and greater than symbols, etc. Essentially from the moment I add a code segment to the page I can no longer use the wysiwyg editor on it and preserve the way the page should appear.
David,
Could you please try encapsulating your
%CODE%/%ENDCODE
segments with
<sticky>...</sticky>
tags.
Protecting text between particular start/end tags is possible with XML markup (see
DirectedGraphPlugin), but I'm not sure if we can do the same for START/END macro tag pairs. Would be useful though.
Lowering to normal:
WysiwygPlugin eats newlines, this is a known artefact of the tml2html/html2tml round-trip process.
Solution would be to automatically mark up
%CODE%/%ENDCODE
content as wysiwyg sticky/protected.
--
PaulHarvey - 03 Mar 2010
Item2174 is also relevant to eating of newlines. However, note that some WYSIWYG use-cases
require eating of newlines e.g. the non-technical user wants the editor to present paragraphs in the same way as they are rendered,
without extra linebreaks. This is a tricky problem. For now,
<sticky>...</sticky>
is the way to go.
--
MichaelTempest - 03 Mar 2010