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

Editor Font Size - Not applied automatically

3 Answers 79 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Sameers
Top achievements
Rank 1
Sameers asked on 04 Oct 2018, 10:12 AM

I have an issue that when editor loads in first, it shows the default font-size = 3. That seems nice.
But when you start typing, it will will include in html the selected font size.

only if you select some text, change the font size from 3 to something else, and then change back to 3, it will include the contents in html

Is there anyway that it shows the default font size = 3, so it should auto append HTML for that font size=3 in the html?

 

thank you

 

3 Answers, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 04 Oct 2018, 10:52 AM
Hello Sameers,

The described browser behavior is documented and explained in the following KB article: No FONT tags are applied when I type text in the editor.

You may also want to try the solution provided here, i.e.

<script>
function OnClientLoad(editor) {
   setTimeout(function () {
       editor.fire('FontName', { value: 'Courier New' });
       editor.fire('RealFontSize', { value: '12px' });
   }, 300);
}
</script>
<telerik:RadEditor OnClientLoad="OnClientLoad" ...


Regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Sameers
Top achievements
Rank 1
answered on 04 Oct 2018, 11:04 AM
Thanks, that works great!
0
Rumen
Telerik team
answered on 04 Oct 2018, 11:49 AM
Perfect! I've also updated the article with information on the FontName and RealFontSize related workaround.

Regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Editor
Asked by
Sameers
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Sameers
Top achievements
Rank 1
Share this question
or