Log in or register to post comments
Last post
Mozilla tags (eg. <b>) instead of <span> CSS
If you want to have Mozilla send <b> tag instead of <span style="font-weight: bold"> on the execCommand("bold"), you should first run the command "useCSS" with the value set to "off".

I do that by adding the following line near the end of internals/fck_1_gecko.js, just after .designMode = "on":
this.EditorDocument.execCommand("useCSS", false, "off");
RE: Mozilla tags (eg. &lt;b&gt;) instead of &lt;span&gt;
Another note: in the code to switch between source-code view and designMode, designMode is turned off for Mozilla (search for designMode = "off"). When it's turned back on, you need to call "useCSS" again as above, otherwise, Mozilla will start inserting <span>s all over again.

Here's a list of some tags Mozilla outputs with useCSS set to "on":
- <b> for bold
- <i> for italic
- <u> for underline
- <div align="center|right|left|justify"> for one of justification methods
- <blockquote> for indent
- <sub>, <sup> for subscripts and superscripts
RE: Mozilla tags (eg. &lt;b&gt;) instead of &lt;span&gt; CSS
I've tried doing this as suggested but can't get it to work. I'm using netscape 7.1 on a Mac. Is it possible.

I'd like it to work on all browsers - is this possible?

Many thanks,

Ben
RE: Mozilla tags (eg. &lt;b&gt;) instead of &lt;span&gt;
designMode is available only on Mozilla 1.3 or later; try looking for date string in your User-Agent field: visit "about:" page from Netscape, and look for text like

Mozilla/5.0 (X11; U; Linux i686; sr_CS; rv:1.6) Gecko/20040311 Epiphany/1.1.12

FCKEditor checks for Gecko from at least 20030210 (mine in this example is from 20040311).

If your version of Netscape is not recent enough, you'd need to upgrade it (if you don't, you should get plain textarea).