简体   繁体   中英

trying to disable the telerik editor control in asp

I was thinking to do this server side, but what i was wanting to do was disable the telerik control called the "Editor." Located at the site: telerick editor control .

My reasoning behind this was that I wanted to give a user the exact look and feel of the object while having everything disabled. I didnt want to use an image at all because it would be stretched, shrank, clicked, etc and wanted to maintain how the editor would look. I had an alternate option i COULD do but not only it would be ineffecient, but have holes to open up for injection.

Looking through the API for that i didnt see which way to accomplish that.

I was thinking to do jquery maybe on the client side to disable, but why do that when you can set the item itself be flagged as disabled and never be entirely sent to the client.

Thoughts? Ideas? How would you go about it? I didnt see methods or attributes that really led to what i was doing.

You can just set enabled="false" on the radEditor declaration in your aspx page:

http://www.telerik.com/help/aspnet-ajax/editor-disabling-radeditor.html

<telerik:RadEditor runat="server" ID="RadEditor1" Enabled="false">
    <Content>       
        <strong>sample content</strong>    
    </Content>
</telerik:RadEditor>

On the Server Side you can do

      RadEditor1.Enabled = false;

In jquery,

try

$("#RadEditor1").prop('disabled', true);

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