From 33ac6d1d20c9834ea1309f15d2baf32eb4b85ef0 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Fri, 13 Jul 2018 21:28:40 +0200 Subject: [PATCH] edit: optionally load ckeditor from local install Custom build can include used plugins and languages, saving deferred loads. --- page.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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"; } -- 2.30.0