editlink.href = '';
editlink.onclick = undefined;
pagebody.setAttribute('contenteditable', true);
- pagebody.innerHTML = pagebody.innerHTML
- .replace(/<!--BLOCK:(.*?)-->[^]*?<!--\/-->/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;