Changes for page ContentEditable

Last modified by mflorea on 2010/07/06 16:39

From version 6.1
edited by mflorea
on 2010/07/06 17:53
Change comment: There is no comment for this version
To version 8.1
edited by mflorea
on 2010/07/06 17:55
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -4,7 +4,7 @@
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<button contentEditable="false" onmousedown="event.preventDefault()" onclick="event.preventDefault()">text</button>after</p>';
7 + iframe.contentWindow.document.body.innerHTML = '<p>before<button contentEditable="false" onmousedown="event.preventDefault(); console.log(event.name)" 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();