From: Mischa POSLAWSKY Date: Fri, 13 Jul 2018 19:28:40 +0000 (+0200) Subject: edit: optionally load ckeditor from local install X-Git-Tag: v3.6~30 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/33ac6d1d20c9834ea1309f15d2baf32eb4b85ef0 edit: optionally load ckeditor from local install Custom build can include used plugins and languages, saving deferred loads. --- diff --git a/page.inc.php b/page.inc.php index 80f773d..7d93a22 100644 --- a/page.inc.php +++ b/page.inc.php @@ -51,7 +51,11 @@ register_shutdown_function(function () { global $User; if (!empty($User['admin'])) { - print ''."\n"; + $ckesrc = '/lib/ckeditor'; # local install + if (!file_exists(DOCROOT . $ckesrc)) { + $ckesrc = '//cdn.ckeditor.com/4.7.3/full-all'; # remote fallback + } + printf(''."\n", "$ckesrc/ckeditor.js"); print ''."\n"; }