This is a migrated thread and some comments may be shown as answers.

Problem in html representation of font face

3 Answers 176 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Jyoti
Top achievements
Rank 1
Jyoti asked on 24 Apr 2008, 08:52 AM
Hi,

I am facing a problem in html representation of text in rad editor.

If I write word 'test' and changed its font face to verdana, then HTML getting displayed is '<font face=Verdana>Test</font>'.

But in case I choose font face as Times New Roman, it shows HTML as 'test'.

I need html to be in proper format for further processing.

Is it possible to remove 'Times new roman' from dropdown? If yes then how?

Please suggest.

Thanks & Regards,
Jyoti

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 25 Apr 2008, 09:45 AM
Hi Jyoti,

You can find detailed explanation of this browser behavior and how to fix it in the following KB article: No FONT tags are applied when I type text in the editor. If you want to remove the Times New Roman item from the Font Name dropdown check this help article: Fonts.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Jyoti
Top achievements
Rank 1
answered on 28 Apr 2008, 08:11 AM
Hi Rumen,

Thanks for your reply.

I have gone through both the documents.

It means that in rad editor I am not able to get html for default font.

But in my requirement I want that all fonts should show proper html, whether it is default or not.

In short I don't  want 'default font won't show html' concept.

Please suggest.

Thanks & Regards,
Jyoti
0
Rumen
Telerik team
answered on 30 Apr 2008, 04:21 PM
Hello Jyoti,

Please, note once again that this is a browser behavior which is not controlled by RadEditor.

What you can do is to set the default font-size property to 9pts and the font-family selector to some other font style in the external file loaded through the CssFiles property. As there is no 9pt size in the Font Size dropdown, when selecting size 2 (10pt), the needed tag will be present in the HTML. Same holds true for the font name.

Another approach is to wrap the editor's content when obtaining it on the server in a font / span tag which will have some font family and size already set, e.g.

string content = "<span style='font-family: Arial;font-size: 14px;'" + RadEditor1.Content + "</span>"

Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Editor
Asked by
Jyoti
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Jyoti
Top achievements
Rank 1
Share this question
or