2014-01-06 87 views
0

RadEditor版本7.3.3.0在Radeditor(所見即所得)的div禁用大小的選項

我使用radeditor從Telerik的給編輯選項,用於創建和修改郵件。

編輯內容創建爲<tr><td>格式。每個td都可以有div和其他dom。

在firefox中完成編輯時,我們覺得在wyswyg編輯器中爲所有div提供了調整大小選項。而在其他瀏覽器中則不存在。我如何禁用Firefox的調整大小選項。

在Firefox:

enter image description here

在Chrome中:

enter image description here

回答

0

這來自瀏覽器的富文本編輯引擎,我不認爲你可以阻止它。

嘗試在簡單的可編輯iframe中添加相同的HTML以進行測試。下面是一個簡單的頁面,您可以使用爲:

<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>