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

[Solved] Rad Editor resets font

7 Answers 165 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Rafal
Top achievements
Rank 1
Rafal asked on 09 Nov 2009, 08:16 PM
Hi, I've encountered a problem with the rad editor. Whenever i click the end of text or enter <br/>'s into the content field it resets the font to Times New Roman 3... Any idea what could be causing that and/or how i could prevent that from happening?

Thanks!

7 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 12 Nov 2009, 11:32 AM
Hi Rafal,

Times New Roman 3 is the default browser font of Internet Explorer. The FontName and FontSize dropdown headers are adaptive / sensitive on selection and they are updated depending on the information returned by the browser's queryCommandValue method.

You can see how to update the default font of RadEditor in this article: Default Font for Editable Content.

Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Rafal
Top achievements
Rank 1
answered on 12 Nov 2009, 07:05 PM
Hi Rumen,

Thank you for your anwser hovever, it doesnt really solve the issue. What happens is when i have a font selected in the editor as lets say courier new after type some text, hit enter a couple of times(to go to next line) and then click on the body of the editor the font will change to times new roman. This will happen as long as i click any part pf the content field that does not contain text in the courier new font.

Any suggestions?
Thanks,
Rafal
0
Rumen
Telerik team
answered on 17 Nov 2009, 01:37 PM
Hi Rafal,

When you click any part of the content area that does not contain text with applied font then the browser returns the font of the body element of the content area and the Font Name dropdown header displays it. In your case this font is Times New Roman.

For your convenience I have captured a video demonstrating the reported scenario and how to change the default body font.

This is a standard behavior for the IFRAME / DIV based web editors.

All the best,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Rafal
Top achievements
Rank 1
answered on 08 Dec 2009, 08:58 PM
Thank you for your reply,

Would you happen to know of a way to circumvent that so that the font selection does not change?

Thanks,
Rafal
0
Rumen
Telerik team
answered on 10 Dec 2009, 03:32 PM
Hello Rafal,

The only thing you could do is to set the desired default font for the content area using the information provided in this article: Default Font for Editable Content.

If your scenario is more complex, please try to implement it with a standard editable DIV (<div contenteditable="true" style="1px solid red;width:300px;height:300px;">sample content</div>) or IFRAME element and send us the code. The content area of RadEditor is an editable IFRAME element. We will replace the DIV with RadEditor and integrate the code to work with the editor control.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Rafal
Top achievements
Rank 1
answered on 14 Dec 2009, 07:59 PM
Well what happens is: i select a font in the rad editor and then decide to paste some code into the rad editor (font stripping is turned on) and what happens is that unless i type in something first it will choose times new roman and convert the pasted font into TNR instead of converting the pasted text into the font that i selected originally. What i am trying to do is have it paste into the font that i have selected in the rad editor not into the default font of the browser nor the default font of the rad editor. Nor do i want it to change the font selection from the font i have selected into the default font of the rad editor/browser.

Thanks,
Rafal
0
Rumen
Telerik team
answered on 17 Dec 2009, 10:49 AM
Hi Rafal,

Thank you for the detailed explanation.

For the time being the Font Name dropdown does not handle the Paste operation.

If you click on some font item in the Font Name dropdown and then type in the editor then the selected font family will be applied to the typed text.

However, if you choose a font name and paste some content, the selected font from the dropdown is not applied. This is how the Font Name dropdown works.

I logged your request as a feature request in our ToDo list and we will try to implement it in one of the next major releases of RadEditor for ASP.NET AJAX. I also added 500 Telerik points to your account for your feature request.


Best regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Editor
Asked by
Rafal
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Rafal
Top achievements
Rank 1
Share this question
or