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

disable edit html elements in design view

3 Answers 57 Views
Editor
This is a migrated thread and some comments may be shown as answers.
gerco Koks
Top achievements
Rank 1
gerco Koks asked on 16 Jul 2010, 08:46 AM
hi,

I need to disable the functionality to edit html elements in desing modus. Is there a way to do that.
for example.

I have added a textarea to the editor, users can now enter text into the textarea by double clicking it and edit the value.
other example.

I have added a radio button to the editor. Users can now alter the selected state.

I want to disable this behaviour.

thx

gerco

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 16 Jul 2010, 10:11 AM
Hi Gerco,

You can make all elements in IE unselectable by applying the unselectable="on" attribute to them:

<input style="width: 100px; height: 22px;" type="text" unselectable="on" />
<input type="radio" value="on" unselectable="on"  />

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
0
gerco Koks
Top achievements
Rank 1
answered on 16 Jul 2010, 10:23 AM
thx for the quick reply but this is not a solution for us.
We use the editor as a formbuilder for our customers. We dont want to enable the modification of the default value (textarea, input field) or seleted state (radio buttons) in the editors desing view. But when the form, designed in the editor is beeing publiched on a webpage, respondents must be able to do so.

I hope i made myself clear.

thx for the help.
0
Rumen
Telerik team
answered on 16 Jul 2010, 12:53 PM
Hello gerco Koks,

All you need to do is to set unselectable="on" to all input elements that you want to make disabled in Design mode of RadEditor. After that when submitting the content you can strip the unselectable attributes in the OnClientSubmit Client-side event of the control and they will become editable when publiched on a webpage.

Sincerely yours,
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
gerco Koks
Top achievements
Rank 1
Answers by
Rumen
Telerik team
gerco Koks
Top achievements
Rank 1
Share this question
or