From e262836d57ec57a65aeaa3378fc53ea23131c0b7 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Tue, 27 Jun 2017 15:30:10 +0900 Subject: [PATCH] Fall back to default content style if the configured style does not exist --- modules/editor/editor.model.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/editor/editor.model.php b/modules/editor/editor.model.php index 019f602e7..0a695508d 100644 --- a/modules/editor/editor.model.php +++ b/modules/editor/editor.model.php @@ -234,7 +234,10 @@ class editorModel extends editor if(!$option->allow_fileupload) $allow_fileupload = false; else $allow_fileupload = true; // content_style setting - if(!$option->content_style) $option->content_style = 'ckeditor_light'; + if(!$option->content_style || !file_exists($this->module_path . 'styles/' . $option->content_style)) + { + $option->content_style = 'ckeditor_light'; + } Context::set('content_style', $option->content_style); Context::set('content_style_path', $this->module_path . 'styles/' . $option->content_style); // Default font setting