mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix CKEditor extraPlugins and removePlugins support
This commit is contained in:
parent
e1846a4b6d
commit
aed5c0fc6a
7 changed files with 30 additions and 2 deletions
|
|
@ -208,6 +208,17 @@ class editorAdminController extends editor
|
|||
$config->additional_plugins = array();
|
||||
}
|
||||
|
||||
if ($configVars->remove_plugins)
|
||||
{
|
||||
$remove_plugins = array_map('trim', explode(',', $configVars->remove_plugins));
|
||||
$remove_plugins = array_filter($remove_plugins, function($str) { return !empty($str); });
|
||||
$config->remove_plugins = $remove_plugins;
|
||||
}
|
||||
else
|
||||
{
|
||||
$config->remove_plugins = array();
|
||||
}
|
||||
|
||||
$config->content_font_size = trim($configVars->content_font_size);
|
||||
$config->content_font_size = ctype_digit($config->content_font_size) ? ($config->content_font_size . 'px') : $config->content_font_size;
|
||||
$config->content_line_height = trim($configVars->content_line_height);
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ class editor extends ModuleObject
|
|||
'additional_css' => array(),
|
||||
'additional_mobile_css' => array(),
|
||||
'additional_plugins' => array(),
|
||||
'remove_plugins' => array(),
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -236,6 +236,7 @@ class editorModel extends editor
|
|||
Context::set('editor_autoinsert_image', $option->autoinsert_image);
|
||||
Context::set('editor_additional_css', $option->additional_css);
|
||||
Context::set('editor_additional_plugins', $option->additional_plugins);
|
||||
Context::set('editor_remove_plugins', $option->remove_plugins);
|
||||
|
||||
// Set the primary key valueof the document or comments
|
||||
Context::set('editor_primary_key_name', $option->primary_key_name);
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ $lang->guide_additional_css = 'Additional CSS Files';
|
|||
$lang->about_additional_css = 'To load additional CSS files inside the editor, such as web fonts, please enter one URL per line.';
|
||||
$lang->guide_additional_mobile_css = 'Additional CSS Files for Mobile';
|
||||
$lang->guide_additional_plugins = 'Load additional plugins';
|
||||
$lang->guide_remove_plugins = 'Remove plugins';
|
||||
$lang->guide_choose_text_formatting = 'Text formatting style';
|
||||
$lang->guide_choose_font_preview = 'Preview';
|
||||
$lang->guide_choose_font_body = 'Default font';
|
||||
|
|
@ -29,6 +30,7 @@ $lang->autoinsert_image_paragraph = 'Automatically insert images into editor (af
|
|||
$lang->autoinsert_image_inline = 'Automatically insert images into editor (directly at cursor position)';
|
||||
$lang->autoinsert_image_none = 'Do not auto-insert images into editor';
|
||||
$lang->about_additional_plugins = 'This setting is only effective in editors that support additional plugins.';
|
||||
$lang->about_remove_plugins = 'This setting is only effective in editors that support removing plugins.';
|
||||
$lang->about_unit_default_px = 'The unit is px unless otherwise specified.';
|
||||
$lang->about_unit_default_percent = 'The unit is % unless otherwise specified.';
|
||||
$lang->font_preview = 'The quick brown fox jumps over the lazy dog.
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ $lang->guide_additional_css = 'CSS 파일 추가';
|
|||
$lang->about_additional_css = '웹폰트 등의 CSS를 에디터 내부에서 추가로 로딩하려면 한 줄에 하나씩 URL을 입력해 주십시오.';
|
||||
$lang->guide_additional_mobile_css = '모바일 CSS 파일 추가';
|
||||
$lang->guide_additional_plugins = '추가 플러그인 로드';
|
||||
$lang->guide_remove_plugins = '플러그인 제거';
|
||||
$lang->guide_choose_text_formatting = '본문 서식';
|
||||
$lang->guide_choose_font_preview = '미리보기';
|
||||
$lang->guide_choose_font_body = '본문 글꼴';
|
||||
|
|
@ -32,7 +33,8 @@ $lang->guide_choose_autoinsert_image = '이미지 자동 삽입';
|
|||
$lang->autoinsert_image_paragraph = '이미지 첨부시 본문에 자동 삽입 (커서 위치에서 줄을 바꾸고 삽입)';
|
||||
$lang->autoinsert_image_inline = '이미지 첨부시 본문에 자동 삽입 (커서 위치에 직접 삽입)';
|
||||
$lang->autoinsert_image_none = '이미지 첨부시 본문에 자동 삽입하지 않음';
|
||||
$lang->about_additional_plugins = '추가 플러그인을 지원하는 에디터에서만 적용됩니다.';
|
||||
$lang->about_additional_plugins = '추가 플러그인 로딩을 지원하는 에디터에서만 적용됩니다.';
|
||||
$lang->about_remove_plugins = '플러그인 제거를 지원하는 에디터에서만 적용됩니다.';
|
||||
$lang->about_unit_default_px = '단위를 지정하지 않을 경우 px 단위를 사용합니다.';
|
||||
$lang->about_unit_default_percent = '단위를 지정하지 않을 경우 % 단위를 사용합니다.';
|
||||
$lang->font_preview = 'The quick brown fox jumps over the lazy dog.
|
||||
|
|
|
|||
|
|
@ -141,7 +141,11 @@ var auto_saved_msg = "{$lang->msg_auto_saved}";
|
|||
settings.ckeconfig.toolbarStartupExpanded = {$editor_toolbar_hide ? 'false' : 'true'};
|
||||
|
||||
<!--@if($editor_additional_plugins)-->
|
||||
settings.extraPlugins = {json_encode(implode(',', $editor_additional_plugins))};
|
||||
settings.ckeconfig.extraPlugins = {json_encode(implode(',', $editor_additional_plugins))};
|
||||
<!--@endif-->
|
||||
|
||||
<!--@if($editor_remove_plugins)-->
|
||||
settings.ckeconfig.removePlugins = {json_encode(implode(',', $editor_remove_plugins))};
|
||||
<!--@endif-->
|
||||
|
||||
<!--@if($editor_toolbar === 'simple')-->
|
||||
|
|
|
|||
|
|
@ -167,6 +167,13 @@
|
|||
<p class="x_help-block">{$lang->about_additional_plugins}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="font_size">{$lang->guide_remove_plugins}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" id="remove_plugins" name="remove_plugins" value="{implode(', ', $editor_config->remove_plugins)}" />
|
||||
<p class="x_help-block">{$lang->about_remove_plugins}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="font_size">{$lang->guide_choose_font_size_body}</label>
|
||||
<div class="x_controls">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue