+1-888-365-2779
Try Now
More in this section

Forums / Designing with Sitefinity / Block of Non-Editable Text

Block of Non-Editable Text

4 posts, 0 answered
  1. Joey
    Joey avatar
    2 posts
    Registered:
    15 Dec 2006
    14 Sep 2010
    Link to this post
    I want to insert a block of non-editable text.

    For instance I have a DNN module that shows the RadEditor.  I have a list of items on the right in a list box and I want to double click an item in the list box and have it inserted into the rad editor text box but make it so they can't edit the text.  So if they insert:

    <<test string>>

    They can only delete it and move it around.  I want to it highlight the entire string when selected but they can't edit it.

    Is this possible?

    Thanks!
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    14 Sep 2010
    Link to this post
    Hi Joey,

    You can disable the entire content area, but I do not believe that there is a way to prevent certain piece of code from editing in HTML editor except from using unselectable="on" attribute as described in this article Editable and Non-editable Areas

    Kind regards,
    Ivan Dimitrov
    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
  3. Joey
    Joey avatar
    2 posts
    Registered:
    15 Dec 2006
    15 Sep 2010
    Link to this post
    That might be the perfect solution.  When I do this the text is non-editable which is great but I can't drag the red box of non editable text any where in the editor.

    I can edit this text  <span style="border: red 1px solid;" contenteditable="false" unselectable="on">Non Editable </spanand Can edit this text

    When I do this and turn the unselectable=off I can move it around but I can also double click on it and edit the text.  Any way to turn that off?

    I can edit this text  <span style="border: red 1px solid;" contenteditable="false" unselectable="off">Non Editable </span>   and Can edit this text

    Also if I do this for firefox I can't drag it around at all.  I can highlight it from left to right and then drag it but most end users wont' know how to handle that.

    I can edit this text   <span style="border: red 1px solid;" contenteditable="false" unselectable="off">Non Editable </span>  and Can  edit this text

    Thanks again!
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    15 Sep 2010
    Link to this post
    Hi Joey,

    You can create a custom button or drop down that will add HTML -red box to the RadEditor content.  unselectable attribute does not disable clicks and in FF browser you could try usingmoz-user-select css

    Setting the span as below will not allow you to edit the text inside it

    <span contenteditable="true" style="border: 1px solid red;" unselectable="off">Non Editable text </span>

    All the best,
    Ivan Dimitrov
    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
Register for webinar
4 posts, 0 answered