You are here: Foswiki>Tasks Web>Item9653 (09 Sep 2010, PaulHarvey)Edit Attach

Item9653: WysiwygColorLost

pencil
Priority: Normal
Current State: No Action Required
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: WysiwygPlugin
Branches:
Reported By: CatiaLavalle
Waiting For:
Last Change By: PaulHarvey
Say you write a Topic within the WYSIWYG plugin. Say you colorize with the color palette some text in the Topic. You save (exit): the text you have colorized has the correct color.

Sometimes, not always but often, if you the open the topic again in the WYSIWYG editor, no matter if you really change someting in the topic or you just open and save it again, when you go out of the editor the color gets lost.

You can "loop" the procedure .... you will get the same result.

I do not really know why sometimes it happens and when not but I have pasted a topic in the foswiki.org Sandbox, which has the problem.

See: http://foswiki.org/Sandbox/TestTopic44571 the "colored block" after "Up2date konfigurieren und am RHN anmelden ". If you edit, save it will become black.

I have alredy chattet about this and I got this feedback: "yes - definitely duplicated. For some reason it moves the closing span up to the same line that opens it."

-- CatiaLavalle - 09 Sep 2010

Hi Catia, thank you for the report.

I discussed this with George on IRC and I believe this is an artefact of TinyMCE 3.2.7 (the version we ship in Foswiki 1.0.x) which somehow ends up with <p> markup inside a <span>.

This is not valid HTML, and the WysiwygPlugin will try to close the <span> early when it encounters the first newline <p/>.

Two options:
  1. Wait for Foswiki 1.1 (or upgrade to the WysiwygPlugin + TinyMCEPlugin in Extensions/Testing, but this can be risky - requires ZonePlugin + JQueryPlugin too) - this seems to be fixed in TinyMCE 3.3.8
  2. Use "standard" colours (those that can be converted to Eg. %RED%

Note however, that once the "bad" HTML is created by TinyMCE 3.2.7, the "new" TinyMCE cannot fix it; will just avoid any new invalid HTML.

So I am closing this. Please re-open if you observe this behaviour on trunk/Foswiki 1.1

-- PaulHarvey - 09 Sep 2010
 
Topic revision: r2 - 09 Sep 2010, PaulHarvey
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