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

how to select the code when swaping the mode in RadEditor

3 Answers 50 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Jack
Top achievements
Rank 1
Jack asked on 28 Aug 2012, 09:29 AM
Hi, guys,

I selected some code in RadEditor's "Design" mode.
Then,I changed the mode to "Html" for editing,but the part which I selected in "Design" mode was onblur.

Can I keep the selected part in previous mode being selected after I swap the RadEditor's mode?


Best Regards,
Jack

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 28 Aug 2012, 09:40 AM
Hello,

Unfortunately, this user friendly feature could not be implemented in RadEditor, because the Html and Design modes are two different IFRAME elements (documents) and during the switch from Design to Html mode the selection is automatically lost.
In addition, the content is parsed by the editor's content filters to make it valid XHTML. This process modifies the content and it is not possible to programmatically restore the selection.

By the way, have you by any chance seen a DHTML web (not desktop based) editor that supports this feature?

Best regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jack
Top achievements
Rank 1
answered on 29 Aug 2012, 01:53 AM
Hi ,Rumen

Thanks alot for your answer.
I really do not know if any other web editor could do what I say.
Anyway,If this could be done,it would help me a lot in my CMS project.

By the way,could RadEditor restore the selection in the same mode(no swaping)?


Best regards,
Jack
0
Rumen
Telerik team
answered on 29 Aug 2012, 03:09 PM
Hello,

Check this article for information on the requested feature: http://www.telerik.com/help/aspnet-ajax/editor-getrange.html.

Kind regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Editor
Asked by
Jack
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Jack
Top achievements
Rank 1
Share this question
or