Hi,
This is for IE11 on Widnows 7 with <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
I have multiple rad editors on a page. For each of them the EditMode is set to Preview. The first editor shows correctly (cannot edit contents), all the rest of them are editable. The problem being the iframe body has contenteditable set to true for all of them except the first.
I am ina fix over this. I reaallly need help urgently
5 Answers, 1 is accepted
Hello Amarbir,
My first advice is to ensure that you IE is not running in Compatibility Mode which is not supported. This meta tag does not guarantee the browser will run in standards mode.
Since this works fine for me I can also suggest the following ideas:
- consider setting the Enabled property to false in order to disable editing in RadEditor. This will greatly reduce the HTML footprint and the scripts/styles that need to be loaded, and will also remove unnecessary elements (the toolbars). The end result is the same - non-editable content
- ensure you are using the latest version of the controls
- use the OnClientLoad event to change the desired attribute and change it. For example:
<script>
function
OnClientLoad(sender, args) {
setTimeout(
function
() {
sender.get_contentArea().setAttribute(
"contenteditable"
,
"false"
);
}, 0);
}
</script>
<telerik:RadEditor ID=
"RadEditor1"
runat=
"server"
EditModes=
"Preview"
OnClientLoad=
"OnClientLoad"
>
</telerik:RadEditor>
Regards,
Marin BratanovTelerik by Progress
Hi,
First of all Thank You for the detailed reply. For the benefit of others here is what I observed.
1. The problem happens only for editor which are part of hidden content (containing div is display:none, visibility:hidden). When I click a tab to display content via javascript something makes those editors editable even when they were actually not editable
2. Cannot set ENABLED to false because then content (bullets especially) is not rendered correctly. The bullets are gone and other things. also no borders etc.
3.Compatibility mode was off and made no difference
4. at the end of the day I had to do brute force as follows whenever I hide/show content on page
$(
'.RadEditor'
).each(
function
() {
var
id =
this
.id;
var
editor = $find(id); editor.get_contentArea().setAttribute(
"contenteditable"
,
"false"
); });
Hello Amarbir,
If the issue happens only with hidden editors, you should just repaint() them when you show them, as explained here: http://docs.telerik.com/devtools/aspnet-ajax/controls/editor/troubleshooting/appearance-issues-with-initially-hidden-editor#initially-hidden-wrapper-made-visible-via-javascript.
On a side note, you may find interesting the following article on accessing the controls, because you can skip $find() and use the .control field of the DOM object: http://docs.telerik.com/devtools/aspnet-ajax/general-information/get-client-side-reference#using-plain-javascript-methods.
Regards,
Telerik by Progress
Team,
I was using 2015.3.1111.40 version and radeditor was working fine when compatibility mode was on. Now with the latest version it is not working fine 2016.3.1027.
Can you please confirm from which version you are not supporting IE 11 compatibility mode on setting. Please reply ASAP.
Hi Sandhya,
We do not support IE7 (and, therefore, Compatibility Mode) as of Q3 2015 (a year ago at the time of writing): http://www.telerik.com/blogs/better-ux-and-performance-in-q3-2015-courtesy-of-ie7-support-or-the-lack-thereof.
Regards,
Telerik by Progress