git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
edit/page: indicate edit replacements in data-dyn attributes
[minimedit.git]
/
edit
/
page.js
diff --git
a/edit/page.js
b/edit/page.js
index 9997e293c7615a3af4c6b29945f56583503a49e5..3071844a96e685c64d8ae6328e81af773e940bc2 100644
(file)
--- a/
edit/page.js
+++ b/
edit/page.js
@@
-161,8
+161,9
@@
if (pagebody) {
editlink.href = '';
editlink.onclick = undefined;
pagebody.setAttribute('contenteditable', true);
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;
CKEDITOR.inline(pagebody, { customConfig: '' });
document.body.className = 'edit';
return false;