Uneditable fields support

2 posts, 0 answers
  1. Aleksey
    Aleksey avatar
    3 posts
    Member since:
    Aug 2012

    Posted 03 Aug 2012 Link to this post

    Hi everyone,

    I am working on the page that allows a user to edit text. Everything appear to be fine except that this text has to support fields (that's how they call it in MS word). Basically this text is a template where user can insert fields or variables which will be replaced with actual values when some event occurs. I am able to implement it using contenteditable="false" and unselectable="on". However there some cases when the html i am inserting is modified and I am loosing those attributes. One of such cases is when I try to insert the html code below into empty table cell. Once I do that field seem to appear in the editor, but once I switch to HTML or submit a form i am loosing contenteditable and unselectable attributes 
    <span class="editorField" contenteditable="false" unselectable="on" variable="FieldName">Field Text</span>

    I am not sure if this is browser issue or telerik specific. Does anyone have any experience with this or anyone knows a control that natively supports such functionality.

    Thank you!
    Aleksey
  2. Rumen
    Admin
    Rumen avatar
    14419 posts

    Posted 07 Aug 2012 Link to this post

    Hi,

    The different browsers offer different level of support for non editable elements / areas and it is hard to implement a 100% reliable working cross browser solution for editable iframe/div elements such as the content area of RadEditor.

    I performed a test in IE9 and Firefox 14.0.1 but I was unable to reproduce the stripping problem as shown in the following video: http://screencast.com/t/7vcWhfj3W2. What you can try is to disable the built-in filters of RadEditor by setting ContentFilters="None", which will ensure that the content is not stripped by RadEditor.

    Greetings,
    Rumen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top