PDA

View Full Version : HTMLEditor, Bold and italic together does not work



rney_aspect
14 Jan 2011, 1:53 AM
When we create text in HTMLEDitor with bold and italic, only bold shows as <strong> and no italic tag does not show up in the results of getValue method

Condor
14 Jan 2011, 4:09 AM
I get:

Internet Explorer:

<STRONG><EM>?abc</EM></STRONG>
Firefox:

<span style="font-weight: bold; font-style: italic;">abc</span>
Chrome:

<b><i>?abc</i></b>

And none of these are technically wrong.

There are no plans to make all browsers generate the same markup in the near future.

For now, HtmlEditor should only be considered for simple editing. If you want a full-featured editor, try TinyMCE (also available as an Ext component - see the User Extensions forum).

rney_aspect
25 Jan 2011, 12:09 AM
I just want this to work in IE alone. I don't see <EM> tags in the results of getValue() method.

Condor
25 Jan 2011, 12:14 AM
I get <em> tags in the result (but the default ext-all.css resets the <em> tag style so it doesn't look bold).

rney_aspect
25 Jan 2011, 1:23 AM
I am so sorry, I was getting strong and em both as well. Like you said, bold is not appearing. What should I do?

Condor
25 Jan 2011, 2:18 AM
The easiest solution is to display the value in a panel that is configured with preventBodyReset:true.