Why is the HTML generated by FCKEditor different if you use different browsers?
For example, if you use IE it uses <p> tags for paragraphs. In Firefox it uses <br/> tags. For font formatting, using IE makes it generate <em>, <strong>, <strike>, <u> etc. Using it in Firefox makes it produce <span> tags. For text alignment, in IE it uses <p align=x> tags. In firefox, again it uses span tags.
To verify it wasn't a glitch with my setup, I went to the FCKEditor page and looked at the demo page on their site. It was exactly the same.
Ordinarily I wouldn't care. However I am using an application where consistency is required. Add to that, the code in IE just looks neater and easier to read. Can anyone suggest a way of making the generated HTML the same across all browsers?
Thanks,
Norphy
For example, if you use IE it uses <p> tags for paragraphs. In Firefox it uses <br/> tags. For font formatting, using IE makes it generate <em>, <strong>, <strike>, <u> etc. Using it in Firefox makes it produce <span> tags. For text alignment, in IE it uses <p align=x> tags. In firefox, again it uses span tags.
To verify it wasn't a glitch with my setup, I went to the FCKEditor page and looked at the demo page on their site. It was exactly the same.
Ordinarily I wouldn't care. However I am using an application where consistency is required. Add to that, the code in IE just looks neater and easier to read. Can anyone suggest a way of making the generated HTML the same across all browsers?
Thanks,
Norphy
RE: Generated HTML
FCKConfig.GeckoUseSPAN = false ;
FCKConfig.UseBROnCarriageReturn = false ;
If you set the first to true, then Gecko-based browsers (ie. Firefox) will use something like <span style="font-weight:bold;"> instead of <strong>. Set it to false to force the use of strong and em. The other config is related to hitting the Enter key. When set to true, the editor adds a <br>. When set to false it adds a new paragraph. You might try clearing the cache for Firefox to make sure it's reading both configs correctly. Not sure about the alignment issue...