ContentEditable
Version 13.1 by mflorea on 2010/07/06 18:19
span.readOnly-selected::selection { background: #AAA; } span.readOnly-selected::-moz-selection { background: #AAA; } span.readOnly { border: 1px dashed #777; padding: 3px; }
function onAction(hook){ var iframe = document.createElement('iframe'); iframe.style.border = '1px solid black'; iframe.addEventListener('load', function() { iframe.contentWindow.document.body.innerHTML = 'beforetextafter
'; //iframe.contentWindow.document.designMode = 'on'; iframe.contentWindow.document.body.contentEditable = true; iframe.focus(); }, false); hook.parentNode.insertBefore(iframe, hook); }