Completed
Last Updated: 01 Jun 2021 13:29 by ADMIN
Release Q2 2014
ADMIN
Ianko
Created on: 19 May 2014 07:02
Category: Editor
Type: Bug Report
0
Deleting text is incorect when Track Changes is enabled under IE10 when the conent consist of /r/n charachters
Setting escaped symbols in the text nodes of the content breaks cursor navigation and word deleting.

This is due to IE10 and less browser versions native behavior to interact with escaped symbols as normal ones. 

A possible resolutions is implementing a filter that strips the undesired characters and disable the IndentHTMLContent:

ASP.NET
________________________________________________________________________________
<telerik:RadEditor ID="radEditMain" runat="server"
     EnableTrackChanges="true"
    OnClientLoad="OnClientLoad">
</telerik:RadEditor>

<script type="text/javascript">
    function OnClientLoad(editor, args) {
        editor.get_filtersManager().add(new MyFilter());

        var cleanHtml = editor.get_html(true);
        editor.set_html(cleanHtml);
    }

    MyFilter = function () {
        MyFilter.initializeBase(this);
        this.set_isDom(false);
        this.set_enabled(true);
        this.set_name("MyFilter");
        this.set_description("RadEditor filter description");
    }

    MyFilter.prototype = {
        getHtmlContent: function (content) {
            var newContent = content;
            //Make changes to the content and return it
            newContent = newContent.replace(/(\r\n|\n|\r)/gm, " ");
            newContent = newContent.replace(/(\t)/gm, " ");
            return newContent;
        }
    }
    MyFilter.registerClass('MyFilter', Telerik.Web.UI.Editor.Filter);
</script>
________________________________________________________________________________


C#
________________________________________________________________________________
protected void Page_Load(object sender, EventArgs e)
{
	radEditMain.DisableFilter(EditorFilters.IndentHTMLContent);
}
________________________________________________________________________________
0 comments