ContentEditable

Version 19.1 by mflorea on 2010/07/06 18:33
Warning: For security reasons, the document is displayed in restricted mode as it is not the current version. There may be differences and errors due to this.

Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed in [incubator:Test.ContentEditable]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.

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); }