SnippetMaster Support Forums
Return to main website
 
April 05, 2008, 06:12:13 AM
* Show unread posts since last visit.
* Show new replies to your posts.
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 05, 2008, 06:12:13 AM

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 652 times)
D3
Beta Tester

Posts: 6


[-] 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: 2212

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: 2212

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: 344



[-] 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: 2212

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
hostu

Posts: 22


WWW
[-] Re: Editor adding unwanted styles
« Reply #5 on: May 17, 2006, 06:56:43 PM »

hi admin and all, i have a problem kinda like the above, i have a menu at the top of my page and no matter what setting i use it just wipes the menu away when the page is loaded in the editor, before any editing, i can see the area where the menu is gone, not only this just by swithing to html mode and back it really changes the look of the whole page, and all this without editing anything,, i have repeated this action over and over and with all the setting changes available in the admins menu. i noticed something on the editors forum abt changing some configuration settings but i cant find this file with the snippetmaster files... any thoughts and or help in this area will be received with many thanks...


chuck
Report to moderator   Logged
Jenkinhill
Beta Tester

Posts: 344



[-] Re: Editor adding unwanted styles
« Reply #6 on: May 18, 2006, 01:56:16 AM »

Chuck, can you provide a url for the page giving you this grief? That may make it easeir to spot the problem, which almost certainly is with the TinyMCE editor. The editor tries to produce valid XHTML (as it should) but in doing so for non-XHTML pages may strip out non-valid tags and attributes during the "codesweep" which it runs.
Report to moderator   Logged

Kelvyn
hostu

Posts: 22


WWW
[-] Re: Editor adding unwanted styles
« Reply #7 on: May 18, 2006, 03:54:49 AM »

hi again, sure  http://desotowebservices.com  iam pretty sure, like you that it is the format of the pages , they were produced by a program called webstyle 4 by xara, i know i could use dreaweaver or such but i have so many sites already using this that i want to use SM with that i was hopiing for a fix or some configuration setting of the editor, i saw mention  on the editors forum of a configuration file for the editor but not sure if it was included in the SM distro. or not... anyway any help welcomed, guess i could just start using a development system that works wit SM  Smile

chuck
Report to moderator   Logged
Jenkinhill
Beta Tester

Posts: 344



[-] Re: Editor adding unwanted styles
« Reply #8 on: May 18, 2006, 05:00:46 AM »

The use of Xara's non-standard code is almost certainly the root of the  problem. The DTD defines the page code as HTML4.01 transitional, but even then it fails W3C validation. It should be possible to just define the central text content for editing by careful positioning of the SnippetMaster tags, but if you try to edit the whole page the TinyMCE editor will very likely be totally confused - as you have seen.

There is a valid_elements configuration file for the TinyMCE editor - see http://tinymce.moxiecode.com/tinymce/docs/option_valid_elements.html
« Last Edit: May 18, 2006, 05:03:32 AM by Jenkinhill » Report to moderator   Logged

Kelvyn
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 Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!