2014-01-06 1 views
0

RadEditor версия 7.3.3.0опция Отключить изменение размера для дивы в Radeditor (WYSWYG)

Я использую radeditor от Telerik дать опцию редактирования для создания и редактирования сообщений электронной почты.

содержание редактора создается в <tr> и <td> форматах. каждый тд может иметь div и другой дом внутри него.

Нам представляется, что параметры изменения размера предоставляются для всех div в редакторе wyswyg, когда редактирование выполняется в firefox. тогда как его нет в других браузерах. Как отключить параметр изменения размера для Firefox.

В Firefox:

enter image description here

В Chrome:

enter image description here

ответ

0

Это происходит из богатого редактирования текста двигателя браузера, и я не думаю, что вы можете остановить его ,

Попробуйте добавить один и тот же HTML в простой редактируемый iframe для его проверки. Вот простая страница, которую вы можете использовать для этого:

<body onload="SetEditable()"> 
<b>Set your original HTML content here:</b><br /> 
<textarea id="htmlArea" style="width: 783px; height: 189px"></textarea> 
<br /> 
<input type="button" onclick="CreateHtml();return false;" value="Set Content in the IFRAME"> 
<br /> 

<b>Editable IFRAME element:</b> 
<br /> 
<iframe 
src="javascript:void(0)" 
id="editor" style="width: 774px; height: 489px;border: 3px solid red;"></iframe> 
<input type="button" onclick="ShowIFRAMEHTML();return false;" value="Show IFRAME HTML"> 
<br /> 

<b>HTML Mode of the IFRAME:</b> 
<br /> 
<textarea id="htmlMode" style="width: 783px; height: 313px"></textarea> 


    <script type="text/javascript"> 
var editor1 = document.getElementById("editor"); //reference to the IFRAME element 
var htmlArea1 = document.getElementById("htmlArea"); //reference to the HTML area in which we put the content 
var htmlMode = document.getElementById("htmlMode"); //reference to the HTML area that displays the IFRAME content 
var oDocument = editor1.contentWindow.document; 

var sMarkup = "<html><head><title>New Document</title></head>" + 
       "<body contenteditable=true style='overflow:scroll;margin:0px;padding:0px;height:100%'>" + 
       "&nbsp;</body></html>"; 

function SetEditable() 
{ 
    oDocument.open(); 
    oDocument.write(sMarkup); 
    oDocument.close();  
    oDocument["designMode"] = "on";  
} 
function CreateHtml() 
{ 
    oDocument.body.innerHTML = htmlArea1.value; 
    htmlMode.value = oDocument.body.innerHTML; 
} 
function ShowIFRAMEHTML() 
{ 
    alert(oDocument.body.innerHTML); 
} 

</script> 

 Смежные вопросы

  • Нет связанных вопросов^_^