X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/34ab86865e39ec1a2e50878f453722d8ea19a6d6..d3ed59c2753c2babd5aa9a1c5e0109c644904ba8:/edit/page.js diff --git a/edit/page.js b/edit/page.js index 9997e29..3071844 100644 --- a/edit/page.js +++ b/edit/page.js @@ -161,8 +161,9 @@ if (pagebody) { editlink.href = ''; editlink.onclick = undefined; pagebody.setAttribute('contenteditable', true); - pagebody.innerHTML = pagebody.innerHTML - .replace(/[^]*?/g, '$1'); + pagebody.querySelectorAll('[data-dyn]').forEach(function (el) { + el.outerHTML = '[[' + el.getAttribute('data-dyn') + ']]'; + }); CKEDITOR.inline(pagebody, { customConfig: '' }); document.body.className = 'edit'; return false;