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

[Solved] Readonly sections in Editor?

1 Answer 131 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Chris Mitchell
Top achievements
Rank 1
Chris Mitchell asked on 16 Mar 2010, 04:56 PM
Hi,

For the application I am working on, it would be very helpful if I could give my users a sort of 'limited' HTML editor to serve as a presentation template editor. What I would like them to be able to do is edit HTML and drag in database 'tokens' in a manner sort of like how images are dragged in in the example shown at: http://demos.telerik.com/aspnet-ajax/editor/examples/treeviewandeditor/defaultcs.aspx .. 

These tokens would correspond to field names that would act as placeholders. As a result, once a 'token' has been inserted, I don't want the user to be able to alter it since the user changing a character to the wrong thing could result in a mismatch where the intended database field is not found.

I wondered if anything like this is possible or you had come across any similar scenario. The only thing that I could think of doing would be to somehow track the start/stop positions of each token that had been placed in the editor, then track the cursor location when the user is using the editor and make the editor readonly when the cursor is 'inside' a token. However, I'm not quite sure how I would accomplish that, and I would still want to retain the ability to delete a token itself.

I hope that description makes sense.. Any help appreciated..

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 17 Mar 2010, 08:13 AM
Hi Chris,

Please, see the following forum thread on the subject: Non editable region.


Best regards,
Rumen
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Editor
Asked by
Chris Mitchell
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or