Avoidin change on some part of the content ?

5 posts, 0 answers
  1. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 28 Feb 2010 Link to this post

    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
  2. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 01 Mar 2010 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 02 Mar 2010 Link to this post

    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
  5. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 02 Mar 2010 Link to this post

    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.
  6. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 02 Mar 2010 Link to this post

    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

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017