Add editor config for mobile height and additional CSS

This commit is contained in:
Kijin Sung 2017-06-27 16:10:01 +09:00
parent f8cb162186
commit 8b9f6fb230
7 changed files with 46 additions and 10 deletions

View file

@ -148,8 +148,10 @@ class editorAdminController extends editor
$config = new stdClass;
$config->editor_skin = $configVars->editor_skin;
$config->editor_height = $configVars->editor_height;
$config->mobile_editor_height = $configVars->mobile_editor_height;
$config->comment_editor_skin = $configVars->comment_editor_skin;
$config->comment_editor_height = $configVars->comment_editor_height;
$config->mobile_comment_editor_height = $configVars->mobile_comment_editor_height;
$config->content_style = $configVars->content_style;
$config->sel_editor_colorset= $configVars->sel_editor_colorset;
$config->sel_comment_editor_colorset= $configVars->sel_comment_editor_colorset;
@ -176,6 +178,17 @@ class editorAdminController extends editor
$config->additional_css = array();
}
if ($configVars->additional_mobile_css)
{
$additional_mobile_css = array_map('trim', explode("\n", $configVars->additional_mobile_css));
$additional_mobile_css = array_filter($additional_mobile_css, function($str) { return !empty($str); });
$config->additional_mobile_css = $additional_mobile_css;
}
else
{
$config->additional_mobile_css = 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);