mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Add option to control focus on CKEditor
https://www.xetown.com/qna/801549
This commit is contained in:
parent
cb2920bc99
commit
9ba0b1e3e6
4 changed files with 5 additions and 1 deletions
|
|
@ -253,6 +253,7 @@ class communicationView extends communication
|
|||
$option->height = 300;
|
||||
$option->skin = $this->config->editor_skin;
|
||||
$option->colorset = $this->config->editor_colorset;
|
||||
$option->editor_focus = Context::get('source_message') ? 'Y' : 'N';
|
||||
$editor = $oEditorModel->getEditor($logged_info->member_srl, $option);
|
||||
Context::set('editor', $editor);
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ class editor extends ModuleObject
|
|||
'content_word_break' => 'normal',
|
||||
'enable_autosave' => 'Y',
|
||||
'allow_html' => 'Y',
|
||||
'editor_focus' => 'N',
|
||||
'autoinsert_image' => 'paragraph',
|
||||
'additional_css' => array(),
|
||||
'additional_mobile_css' => array(),
|
||||
|
|
|
|||
|
|
@ -169,8 +169,9 @@ class editorModel extends editor
|
|||
}
|
||||
Context::set('enable_autosave', $option->enable_autosave);
|
||||
|
||||
// Set allow html
|
||||
// Set allow html and focus
|
||||
Context::set('allow_html', ($option->allow_html === false || $option->allow_html === 'N') ? false : true);
|
||||
Context::set('editor_focus', toBool($option->editor_focus));
|
||||
|
||||
// Load editor components.
|
||||
$site_srl = Context::get('site_module_info')->site_srl ?: 0;
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ var auto_saved_msg = "{$lang->msg_auto_saved}";
|
|||
fontSize_sizes: font_sizes,
|
||||
toolbarCanCollapse: true,
|
||||
allowedContent: true,
|
||||
startupFocus: {json_encode($editor_focus)},
|
||||
language: "{str_replace('jp','ja',$lang_type)}"
|
||||
},
|
||||
loadXeComponent: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue