简体   繁体   中英

Is there any way to make some words (only some words not whole editor) in Rad editor for Ajax read only?

I am using Telerik Rad Editor for Ajax in my project,I want to make some fields/words read only. I tried couple of things and it's working for whole editor.. meaning whole editor becomes read only. I just want some words and rest of the editor as it is to edit for users. Is it possible ? which property to set ?

Thanks in advance.

In order to define editable and non-editable regions in RadEditor, you should place several DIV or SPAN element containers in the editor content area. After that, set the unselectable="on" attribute to their tags in order to prohibit selection of these elements. You should also set the contentEditable attribute to "false" to put these elements in non-editable mode.

Example: Adding editable and non-editable areas in RadEditor.

<div style="border: red 1px solid;" contenteditable="false" unselectable="on">
    Non Editable AREA
    <div style="border: green 1px solid;" contenteditable="true" unselectable="off">
        <!--Content name="info" -->
        Editable REGION...
        <!--/Content -->
    </div>
    Non Editable AREA
</div>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM