Editor Font Size - Not applied automatically

4 posts, 1 answers
  1. Sameers
    Sameers avatar
    6 posts
    Member since:
    May 2017

    Posted 04 Oct 2018 Link to this post

    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

     

  2. Answer
    Rumen
    Admin
    Rumen avatar
    14459 posts

    Posted 04 Oct 2018 Link to this post

    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.
  3. Sameers
    Sameers avatar
    6 posts
    Member since:
    May 2017

    Posted 04 Oct 2018 in reply to Rumen Link to this post

    Thanks, that works great!
  4. Rumen
    Admin
    Rumen avatar
    14459 posts

    Posted 04 Oct 2018 Link to this post

    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.
Back to Top