+var pagebody;
+
+function editorcontents() {
+ return document.getElementsByClassName('static')[0];
+}
+
function editorsetup() {
CKEDITOR.disableAutoInline = true;
};
});
-var pagebody = document.getElementsByClassName('static')[0];
if (pagebody) {
// add edit link to menu
var editlink = document.querySelector('a[href="#edit"]');
editlink.style.fontWeight = 'bold';
editlink.href = '';
editlink.onclick = undefined;
+ document.body.replaceChild(pagebody, editorcontents());
pagebody.setAttribute('contenteditable', true);
pagebody.querySelectorAll('[data-dyn]').forEach(function (el) {
let blockname = el.getAttribute('data-dyn');
}
document.addEventListener('DOMContentLoaded', function (e) {
+ pagebody = editorcontents().cloneNode(true);
var editorinc = document.createElement('script');
editorinc.addEventListener('load', editorsetup);
editorinc.src = ckesrc;