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

Font Selection reverts when you use any other control

1 Answer 36 Views
Editor
This is a migrated thread and some comments may be shown as answers.
IT
Top achievements
Rank 1
IT asked on 04 Apr 2014, 12:52 PM

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.

Help?

 

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 09 Apr 2014, 09:42 AM
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,

Regards,
Ianko
Telerik
 

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.

 
Tags
Editor
Asked by
IT
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or