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

Avoidin change on some part of the content ?

4 Answers 35 Views
Editor
This is a migrated thread and some comments may be shown as answers.
CSurieux
Top achievements
Rank 2
CSurieux asked on 28 Feb 2010, 04:05 PM
Hello,

I need to avoid the user to change the text content of some elements in the edited text, is there any soltion for this.

Thanks for help.
CS

4 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 01 Mar 2010, 03:44 PM
Hi Christian,

The following help article could be helpful for your scenario: Editable and Non-editable Areas.

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
CSurieux
Top achievements
Rank 2
answered on 02 Mar 2010, 09:51 AM
Hello Rumen,

Again thank you for answer.
If I follow the recommendation , using the style

<div style="BORDER: green 1px solid;-moz-user-select: none;" contentEditable="true" unselectable="off">txt</div>

would d the trick for IE and FF ?

And for chrome/Safari ?

Best regards
CS
0
Rumen
Telerik team
answered on 02 Mar 2010, 10:49 AM
Hello Christian,

If you want to disable the typing in the DIV element then the value of the tunselectable attribute should be "on" and the contentEditable attribute should be set to false, e.g.

<div style="BORDER: green 1px solid;-moz-user-select: none;" contentEditable="false" unselectable="on">txt</div>

Please, read carefully the information below: The content area of RadEditor is a standard editable IFRAME element which uses the Rich Text Editing engine of the browser under which it operates. The browsers offers a quite limited API and there is not a 100% well working and 100% cross browser  solution for implementing editable and non editable areas. Here are the articles that MSDN and Mozilla Development center offer for your scenario:
MSDN: Create and use editable regions with the CONTENTEDITABLE attribute.
Mozilla: https://developer.mozilla.org/en/CSS/-moz-user-select

If you experience any problems, my suggestion is to implement your scenario as a separate solution using an editable DIV element (<div contenteditable="true" style="1px solid red;width:300px;height:300px;">sample content</div> as the editor. If you succeed to implement a fully functional solution using a standard editable DIV, we will help you integrate it into the editor and use the editor content area as a source area.

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
CSurieux
Top achievements
Rank 2
answered on 02 Mar 2010, 11:49 AM
Yes for sure on/off was my understanding.
Concerning what you suggest it certainly will necessitate a long delay to read, understand, test and implement and I have to postpone it, opting for an easier temp solution.
And sharing on this forum is ok for fast information exchange but not for a more long term action.

When I look to ms crm which is our main target at ANT, as Microsoft has limited the browser usage to IE, they use intensively the IE behavior (htc) features to reach this non editable content in a limited editor.
But on our side, we must support also FF and Chrome/Safari, one of the good reasons for working tighly with Telerik.

Best regards
Christian

Tags
Editor
Asked by
CSurieux
Top achievements
Rank 2
Answers by
Rumen
Telerik team
CSurieux
Top achievements
Rank 2
Share this question
or