Use Moono Lisa colorset if current settings is incompatible with CKEditor

xpresseditor를 사용하던 사이트에서 라이믹스로 업데이트하면 컬러셋이 white, black,
black_text_nohtml 등 CKEditor에서 지원하지 않는 것으로 설정되어 있어 에디터가 로딩되지 않는 문제 수정.
이런 경우 강제로 Moono Lisa 컬러셋을 사용하도록 함.
This commit is contained in:
Kijin Sung 2018-09-06 16:05:04 +09:00
parent 7c2b0b94a2
commit 0dd20267af

View file

@ -134,6 +134,10 @@ class editorModel extends editor
{
$option->editor_height = $option->height ?: $this->default_editor_config['editor_height'];
}
if ($option->editor_skin === 'ckeditor' && preg_match('/^(?:white|black)(_text_(?:use|no)html)?$/', $option->sel_editor_colorset))
{
$option->sel_editor_colorset = 'moono-lisa';
}
Context::set('skin', $option->editor_skin);
Context::set('editor_path', $this->module_path . 'skins/' . $option->editor_skin . '/');
Context::set('content_style', $option->content_style);