Restored as empty [[]] placeholders since previous commit.
editlink.onclick = undefined;
pagebody.setAttribute('contenteditable', true);
pagebody.querySelectorAll('[data-dyn]').forEach(function (el) {
editlink.onclick = undefined;
pagebody.setAttribute('contenteditable', true);
pagebody.querySelectorAll('[data-dyn]').forEach(function (el) {
- el.outerHTML = '[[' + el.getAttribute('data-dyn') + ']]';
+ let blockname = el.getAttribute('data-dyn');
+ if (!blockname) {
+ el.remove();
+ return;
+ }
+ el.outerHTML = '[[' + blockname + ']]';
});
CKEDITOR.inline(pagebody, { customConfig: '' });
document.body.className = 'edit';
});
CKEDITOR.inline(pagebody, { customConfig: '' });
document.body.className = 'edit';
if ($Article->dateparts) {
$Place[1] = ' <small class="date">'.$Article->date.'</small>';
}
if ($Article->dateparts) {
$Place[1] = ' <small class="date">'.$Article->date.'</small>';
}
+ else {
+ $Place[1] = '';
+ }
print preg_replace('{(?<=<h2>)(.*?)(?=</h2>)}', ($edit ?: '\1').' [[1]]', $Article->raw);
if ($User->admin("edit $Page$Args")) {
$taglist = [];
print preg_replace('{(?<=<h2>)(.*?)(?=</h2>)}', ($edit ?: '\1').' [[1]]', $Article->raw);
if ($User->admin("edit $Page$Args")) {
$taglist = [];