Font Selection reverts when you use any other control

2 posts, 0 answers
  1. Peter
    Peter avatar
    4 posts
    Member since:
    Aug 2005

    Posted 04 Apr 2014 Link to this post

    It seems that the Font Face command does not actually fire, or at least does not insert its span with a font-family style, into the Content area of the RAD Editor until you actually start typing.  Therefore, if you select a font, then immediately use another command, such as Bold, the selected font is "forgotten".  When you  start typing, you will see that a <strong></strong> tag has been inserted, but the "font span" that should have been inserted when you selected a font is missing.

    To reproduce the problem:

    Select a font
    Use any other control, such as Font Size or Bold
    Notice the Font You chose has been reset
    Begin Typing
    Notice you are not typing in the font you selected.
    Switch to HTML view, and notice that there is no <span style="font-family"> tag

    I have tried injecting that "font span" immediately into the content area during the "OnClientCommandExecuting" event, when the command is "FontName".  Unfortunately, while this does insert the font span, it also puts the cursor AFTER the injected span, so when the user executes another command, such as Bold, the font selection still appears not to be effective.  To remedy THAT problem, I attempted to get a Range object from the current selection, manipulate its start/end, and then select it.  However, I could not make that strategy work reliably.



  2. Ianko
    Ianko avatar
    1729 posts

    Posted 09 Apr 2014 Link to this post

    Hi Peter,

    I tried to reproduce the problem in this online demo, but to no avail. Please examine this screencast and let me know if I am missing something important. 

    From the provided information I am left with the impression that the Font-family is triggered programmatically. If this is so, please get back to me with the details about this matter: sample code, project etc. Also it would be helpful if you could verify the version of the used Telerik control for ASP.NET AJAX,


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top