I am using radeditor’s old version and now i want to upgrade to new one.
I downloaded the trial version and problem I am facing is, when I insert any ‘<span’> tag in radeditor, and try to read the content of radeditor I am getting <font> tag instead of <span> tag.
For ex.
$find("RadEditor1").set_html('<span> hi </span>');
alert($find("RadEditor1").get_html());
I am getting alert ‘<font>hi</font>’ instead of ‘<span>hi</span>’.
16 Answers, 1 is accepted
The span tags are converted to font tags in Design mode, because the browser's commands like FontSize, FontName, etc work with font tags.
Set the true parameter in the get_html method to obtain the content through the editor's filters:
alert($find("RadEditor1").get_html(true));
Sincerely yours,
Rumen
the Telerik team

thanks for your reply. it is working fine now.
but there is one more issues in new editor which i want to share with you..
if there is any html content containing span inside table, radeditor changes the content.
3.1) go to page http://demos.telerik.com/aspnet-ajax/editor/examples/default/defaultcs.aspx
3.2) go to html mode
3.3) paste this content
<table>
<tr><td> <span > hi this is fine </span> </td></tr>
<span>
<tr><td> this tag will not work in radeditor</td></tr>
</span>
</table>
3.4) go to design mode
3.5) go to html mode again. it looks like this
<><span>
<tr />
<td />this tag will not work in radeditor</span></>
</tbody>
The problem is that you cannot have any element different <td> inside <tr> elements. In other case this content will be invalid XHTML content and the browser will automatically validate it. To verify this test the attached editable IFRAME element using the same Rich Text Editing engine of the browser as RadEditor.
What you can do is to disable the ConvertToXhtml filter or instruct your users to validate the content using the W3C validator dialog of RadEditor.
All the best,
Rumen
the Telerik team

i added this tag in httphandlers of my web.cofig file:
<add verb="*" validate="false" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI"/>
Telerik.Web.UI.Editor.CommandList.SpellCheck = function(commandName, editor) {
var spell = GetRadSpell('<%= RadSpell1.ClientID %>');
spell.spellCheck(new PrometheusTextSource(editor));
return false;
}
var PrometheusTextSource = function(editor)
{
this._editor = editor;
this.get_text = function() { return this._editor.get_html(); };
this.set_text = function(value) { this._editor.set_html(value); };
}
but it is giving me error.. web.config registration missing..
can you send me small demo page where radspell working fine with radeditor. so it will help me..
Please, find attached the requested sample project made on VS2010 / ASP.NET 4.0.
Best wishes,
Rumen
the Telerik team

its working fine here.
is der any option i can set the zindex of spell checker. because zindex of my radeditor is more than spell checker so spell checker goes behind of editor.
You can control the z-index of RadSpell dialog (default skin) using the CSS class below:
<style type="text/css">
.RadWindow.RadWindow_Default.rwNormalWindow.rwTransparentWindow
{
z-index: 30000 !important;
}
</style>
All the best,
Rumen
the Telerik team

is there any way i can put my classes in radeditor styles drop down, i want to apply some of my classes to the text in rad editor.
thanks in advance,
Yes, it is possible by loading the classes through the CssFiles property. See this article for more information: External CSS Files.
Best regards,
Rumen
the Telerik team

is this possible using javascipt code. i am not using any css. i want to populate that using javascript.
The Apply Class dropdown could be populated only from the CSS classes that reside on the page or from the CSS classes specified in an external file loaded through the CssFiles property.
Kind regards,
Rumen
the Telerik team

From the link you provided by you i learned that this can be possible in css by adding the code given below:
RadEditor2.CssClasses.Clear();
RadEditor2.CssClasses.Add("Links Class", "a.link");
RadEditor2.CssClasses.Add("Images Class", ".img");
but it is not showing following classes in my drop down
correct me if anything is wrong.
The CssClasses collection is used to restrict the available classes in the ApplyClass dropdown, but not to add new ones. The existing classes in the dropdown are populated only from the CSS classes that reside on the page with RadEditor or from the CSS classes specified in an external file loaded through the CssFiles property.
Kind regards,
Rumen
the Telerik team

is there any way i can map style like
<link href="somecss.css"> and then can use that in radeditor
i want to generate some dynamic css clases and thats very important to me.
i dont have css file for that classes.
so please suggest me the way how i can get that.

is there any way where i can restrict radeditor to show classes from one css file.
i just want to use classes of current page and dont want to use classes of css i am using.
there are lot of classes in that css file. so cant restrict add all of them using cssclass attribute.
Yes, you can populate only the desired classes in the Apply Class dropdown by setting the CssClasses collection. See this article: Css Styles.
Best wishes,
Rumen
the Telerik team