| Pages: [1] |
|
|
Author |
Topic: Editor adding unwanted styles (Read 652 times) |
|
D3
Beta Tester
Posts: 6
|
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:
<P><FONT size=+1><STRONG>Schedule:</STRONG></FONT></P>
This is the code that appears automatically, after loading, before even starting to edit:
<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
|
|
|
|
|
admin
Forum Administrator

Posts: 2212
SnippetMaster Author
|
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.
|
|
|
|
|
admin
Forum Administrator

Posts: 2212
SnippetMaster Author
|
For reference, here's my post on the editor's vendor forums:
http://tinymce.moxiecode.com/punbb/viewtopic.php?pid=11533#p11533
|
|
|
|
|
|
Jenkinhill
|
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.
I wonder what it would do faced with <blink>...........
|
Kelvyn
|
|
|
admin
Forum Administrator

Posts: 2212
SnippetMaster Author
|
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.

|
|
|
|
|
hostu
Posts: 22

|
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
|
|
|
|
|
|
Jenkinhill
|
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.
|
Kelvyn
|
|
|
hostu
Posts: 22

|
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
chuck
|
|
|
|
|
|
Jenkinhill
|
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
|
Kelvyn
|
|
|
|
|
Pages: [1]
|
|
|
|