2
votes

I try to edit the SharePoint Rich Text Editor box using IE11, But IE is automatically group the Div using RTE.Canvas based on the CSS. But RTE.Canvas grouping is not working in chrome. Please check the image below.

enter image description here

I don't want this box canvas in IE when i edit the SharePoint RTE, compare to chrome it doesn't shown.

I try to hide this box in IE but it doesn't work, The Methods i follow.

<script>
        //<![CDATA[
            $(document).ready(function() {
                $(".ms-rtestate-write").bind('paste', function(e) {
                    var text = $(this).html();
                    $(this).html(text.replace( /<\s*span.*?>/gi,"").replace( /<\s*\/\s*span\s*.*?>/gi,""));
                });
            });
        //]]>
        </script>

After using the above script, it doesn't affect the RTE.Canvas

RTE.Canvas = null 

It's affecting entire canvas.

I don't want the highlighted box in IE when edit the SharePoint RTE, please help me to resolve canvas issue.

1

1 Answers

0
votes

By placing a contenteditable DIV within a non contenteditable DIV the handles do not appear in IE or FF but you can still edit the content

Ex.

<div class="outerContainer" contenteditable="false">
    <div class="innerContainer" contenteditable="true">
    </div>
</div>

Your can read further here: How to Remove Resize handles and border of div with contentEditable and size style