Changes for page ContentEditable
Last modified by mflorea on 2010/07/06 16:39
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,10 +1,10 @@ 1 -{{html clean="false"}}1 +{{html}} 2 2 <script type="text/javascript"> 3 3 function onAction(hook){ 4 4 var iframe = document.createElement('iframe'); 5 5 iframe.style.border = '1px solid black'; 6 6 iframe.addEventListener('load', function() { 7 - iframe.contentWindow.document.body.innerHTML = '<p>before< span contentEditable="false"class="readOnly" onclick="this.className=\'readOnly readOnly-selected\'">text</span>after</p>';7 + iframe.contentWindow.document.body.innerHTML = '<p>before<button contentEditable="false" onmousedown="event.preventDefault()" onmouseup="event.preventDefault()" onclick="event.preventDefault()">text</button>after</p>'; 8 8 //iframe.contentWindow.document.designMode = 'on'; 9 9 iframe.contentWindow.document.body.contentEditable = true; 10 10 iframe.focus();