SnippetMaster Support Forums
Return to main website
 
May 14, 2006, 05:09:31 PM
* Show unread posts since last visit.
* Show new replies to your posts.
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 14, 2006, 05:09:31 PM

Login with username, password and session length
Search:  
Advanced search
* Home Help Search Login Register
SnippetMaster Support Forums  |  General  |  General Discussion & Support  |  Topic: Editor adding unwanted styles « previous next »
Pages: [1] Print
Author Topic: Editor adding unwanted styles  (Read 35 times)
D3
Beta Tester

Posts: 1


[-] Editor adding unwanted styles
« on: May 11, 2006, 09:40:26 AM »

I just installed the 2.2 version on a client site and have ran into an issue.

When I load a page into the editor, an unwanted span tag is being automatically inserted.

This is the code before loading:
Code:
<P><FONT size=+1><STRONG>Schedule:</STRONG></FONT></P>

This is the code that appears automatically, after loading, before even starting to edit:
Code:
<p><span style="font-size: xx-small"><strong>Schedule:</strong></span></p>

The font and strong tags have been removed and a span with a really tiny style has been put in its place.

AFAIK, this did not happen in the 2.1.1 version.

I can handle this with no problem but my clients have no idea how to deal with it.

Thanks,
Dan
Report to moderator   Logged
admin
Forum Administrator
*
Posts: 1430

SnippetMaster Author


WWW
[-] Re: Editor adding unwanted styles
« Reply #1 on: May 11, 2006, 09:46:58 AM »

Hi Dan,

The old font tag is being replaced with the span, because the font tag is not XHTML compliant and the editor only outputs XHTML compliant code.  (So it has to convert the font tag to a span with font style.)

It's definately strange that it is replaceing the +1 size with a different value, though.  I'm going to look into this and figure out what that's happening.

Report to moderator   Logged
admin
Forum Administrator
*
Posts: 1430

SnippetMaster Author


WWW
[-] Re: Editor adding unwanted styles
« Reply #2 on: May 11, 2006, 10:11:21 AM »

For reference, here's my post on the editor's vendor forums:

http://tinymce.moxiecode.com/punbb/viewtopic.php?pid=11533#p11533
Report to moderator   Logged
Jenkinhill
Beta Tester

Posts: 121



[-] Re: Editor adding unwanted styles
« Reply #3 on: May 11, 2006, 01:09:20 PM »

It's definately strange that it is replaceing the +1 size with a different value, though. 

If I recall correctly font size +x or -x were included in HTML3.2 but were depracated in HTML4.0, and non-existent in XHTML, so the editor may not "know" what to replace old markup with. XHTML has been the standard for 6 years now, so there should not be too many such problems, but it would be good if somehow the editor said"I don't recognise this code, what do you want to do?" - or similar.  Smile

I wonder what it would do faced with <blink>...........
Report to moderator   Logged

Kelvyn
admin
Forum Administrator
*
Posts: 1430

SnippetMaster Author


WWW
[-] Re: Editor adding unwanted styles
« Reply #4 on: May 11, 2006, 01:15:17 PM »

Kelvyn, you're probably exactly correct.

However, I'm going to push the tinyMCE developers to add a "switch" or flag so that it will preserve unknown values.  The code won't then be truly XHTML compliant... but of course that would only be true if the "incoming" code was already not XHTML compliant.

Smile
Report to moderator   Logged
Pages: [1] Print 
SnippetMaster Support Forums  |  General  |  General Discussion & Support  |  Topic: Editor adding unwanted styles « previous next »
Jump to:  

Powered by MySQL Powered by PHP SnippetMaster Support Forums | Powered by SMF 1.0.7.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!