You are here: Foswiki>Tasks Web>Item2619 (28 Feb 2011, DavidErickson)Edit Attach

Item2619: Code segments getting mangled when saved with TinyMCEPlugin

pencil
Priority: Normal
Current State: No Action Required
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: TinyMCEPlugin, WysiwygPlugin, DpSyntaxHighlighterPlugin
Branches:
Reported By: DavidErickson
Waiting For:
Last Change By: DavidErickson
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

ItemTemplate edit

Summary Code segments getting mangled when saved with TinyMCEPlugin
ReportedBy DavidErickson
Codebase 1.0.5
SVN Range
AppliesTo Extension
Component TinyMCEPlugin, WysiwygPlugin, DpSyntaxHighlighterPlugin
Priority Normal
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
Topic revision: r4 - 28 Feb 2011, DavidErickson
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy