X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/a66a71bc45f176c549f227ee843875f23b71e5e4..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;