• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7700 for generic doc work for TWiki-6.0.2. Use View topic Item7703 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item4550: TMCE reorders section tags (used in MultiEditPlugin) in a destructive way

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine WysiwygPlugin Normal Closed   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

Ok, having moved successfully to the latest (05 Sept) WysiwygPlugin and TinyMCEPlugin, I can see that it is much better than the Kupu integration I was struggling with. There's still some strange behaviour with the MultiEditPlugin which severely impacts its deployment. Here goes...

The MultiEditPlugin uses tags like this:

<section>
My text for section one.
</section>

I add this to the exclusions in the html section of WysiwygPlugin.pm, so that pages with this tag will invoke TMCE properly. When I save from TMCE, I get the following:

<section>
My text for section one.
As you can imagine, this is totally incorrect, and destroys the sections in the page. Why should TMCE move the locations of these tags ? Is there a way to prevent it from doing so ?

-- TWiki:Main/SteveJonesST - 05 Sep 2007

Here's some section tags, entered using the plain text editor:

Blah

Now edit in TinyMCE. Since neither TML2HTML nor the browser recognise those tags, they don't appear above, but when you view the topic in the HTML editor you can see they are in the right place. So, let's save this edit.

Now edit again in the plain text editor. The tags are still in the right place.

The problem here is that WysiwygPlugin doesn't recognise a <section> tag as "special". It passes it through to TinyMCE as an XML tag, which is meaningless to TinyMCE or the browser. However it is not destructuve, AFAICT. Can you produce a specific example in LitterTray web?

CC

Hi. I've entered a test as TestTopic10. It contains the following text (without the verbatim tags):

---+ Testing Section Tag Placement
<section>
---++ Here is my first section
Sections are really useful when presenting complex pages to new users.
</section>

If you edit this topic with TMCE, then save, then look at the TML, I believe you'll see something quite different.

Furthermore, TMC did something very strange this this topic (Item4550), in that verbatim tags had been replaced selectively with <verbatim/>. I've just put it all back, but it was very strange.

-- TWiki:Main.SteveJonesST - 06 Sep 2007

This is a tough call. The translator is behaving perfectly, and generating the right XML tag for the section. However TinyMCE has taken it into it's head to munge the tag when it loads the topic, because it recognises it as XML but doesn't know what to do with it.

I took a policy decision to only protect tags (convert them to plain text) when the translator could clearly identify them. This allows arbitrary HTML entered directly into topics to be passed through to the editor, which is as it should be. If I reverse that policy, and make any unrecognised tags escaped out, I risk breaking user entered HTML.

This will take some experimentation.

CC

Should be OK now.

CC

Cleaned "WaitingFor" field.

-- TWiki:Main.GilmarSantosJr - 10 Aug 2008

ItemTemplate
Summary TMCE reorders section tags (used in MultiEditPlugin) in a destructive way
ReportedBy TWiki:Main.SteveJonesST
Codebase 4.0.5
SVN Range TWiki-4.2.0, Wed, 05 Sep 2007, build 14735
AppliesTo Engine
Component WysiwygPlugin
Priority Normal
CurrentState Closed
WaitingFor

Checkins TWikirev:14777
TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2008-08-10 - GilmarSantosJr
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback