mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Fix type error when editor add/remove plugins variable contains an empty string
This commit is contained in:
parent
e57c6c5c25
commit
24a6f0e615
2 changed files with 5 additions and 5 deletions
|
|
@ -189,9 +189,9 @@ class EditorModel extends Editor
|
|||
Context::set('content_word_break', $option->content_word_break ?? null);
|
||||
Context::set('editor_autoinsert_types', $option->autoinsert_types ?? (($option->autoinsert_image ?? null) !== 'none' ? self::$default_editor_config['autoinsert_types'] : []));
|
||||
Context::set('editor_autoinsert_position', $option->autoinsert_position ?? ($option->autoinsert_image ?? null));
|
||||
Context::set('editor_additional_css', $option->additional_css ?? '');
|
||||
Context::set('editor_additional_plugins', $option->additional_plugins ?? '');
|
||||
Context::set('editor_remove_plugins', $option->remove_plugins ?? '');
|
||||
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,8 +13,8 @@ $ckconfig->focus = $editor_focus ?? false;
|
|||
$ckconfig->ios_patch = (bool)preg_match('/i(Phone|Pad|Pod)/', $_SERVER['HTTP_USER_AGENT'] ?? '');
|
||||
|
||||
// Plugin configuration
|
||||
$ckconfig->add_plugins = $editor_additional_plugins ?? [];
|
||||
$ckconfig->remove_plugins = $editor_remove_plugins ?? [];
|
||||
$ckconfig->add_plugins = $editor_additional_plugins ?: [];
|
||||
$ckconfig->remove_plugins = $editor_remove_plugins ?: [];
|
||||
if (!in_array('clipboard', $ckconfig->remove_plugins)) {
|
||||
$ckconfig->add_plugins[] = 'rx_paste';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue