internet-explorerattributescontenteditableversions

radeditor contenteditable anchor tags not selected in ie11


Am using radeditor. User will be inserting links (anchor tags) into it. And the anchor tags will have contenteditable="false" just so the link text is not changeable. But, the problem is when I click on the link the entire link text is supposed to show as selected.

First Image

This is working fine on IE7 and in compatibility mode with higher version browsers. But, in standard mode of IE 8, 9, 10 and 11 it does not.

Second Image

This gives an impression that its purely related to browser engine. But, I would like to know if there is any alternative approach for this issue to show the links as selected.

Appreciate any suggestions. Thanks.


Solution

  • I couldn't bring the same appearance like the first screenshot. But, I was able to select the element as a whole using some custom script which is fine for the end user in my case. Below is the script if some is looking for.

    function OnClientLoad(editor, args) {
        editor.attachEventHandler("onmouseup", function (e) {
            var selectedElm = e.srcElement;
            if (selectedElm.tagName && selectedElm.tagName.toLowerCase() == 'a') {
                editor.selectElement(selectedElm);
                if (e.preventDefault) {
                    e.preventDefault();
                }
            }
        });
    }