From: Mischa POSLAWSKY Date: Sun, 20 Dec 2020 01:16:19 +0000 (+0100) Subject: edit/head: ckeditor script url in data attribute X-Git-Tag: v5.0~1 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/ac0eaa8a44ed4336c7405c737675cc8d5cb11252 edit/head: ckeditor script url in data attribute --- diff --git a/edit/head.inc.php b/edit/head.inc.php index a12c54b..76d9ea4 100644 --- a/edit/head.inc.php +++ b/edit/head.inc.php @@ -30,7 +30,6 @@ if (!file_exists(DOCROOT . $ckesrc)) { $ckesrc = '//cdn.ckeditor.com/4.15.1/full-all'; # remote fallback } ob_start(); -printf("\n", "$ckesrc/ckeditor.js"); -print ''."\n"; +printf(''."\n", "$ckesrc/ckeditor.js"); $Page->head = ob_get_clean(); diff --git a/edit/page.js b/edit/page.js index 7d20c65..1896c05 100644 --- a/edit/page.js +++ b/edit/page.js @@ -206,6 +206,7 @@ if (pagebody) { } +var ckesrc = document.currentScript.getAttribute('data-ckesrc'); document.addEventListener('DOMContentLoaded', function (e) { pagebody = editorcontents().cloneNode(true); var editorinc = document.createElement('script');