新增HTML编辑器,优化编辑器调用

This commit is contained in:
wolfcode
2024-04-15 18:25:13 +08:00
parent 796c3155c0
commit 1d0b94009f
11 changed files with 24282 additions and 60 deletions

View File

@@ -132,6 +132,7 @@ if (!function_exists('auth')) {
$editor_type = sysconfig('site', 'editor_type');
return match ($editor_type) {
'ckeditor' => "<textarea name='{$name}' rows='20' class='layui-textarea editor' placeholder='{$placeholder}'>{$detail}</textarea>",
'wangEditor' => "<div class='wangEditor_div'><textarea name='{$name}' rows='20' class='layui-textarea editor layui-hide'>{$detail}</textarea><div id='editor_toolbar_{$name}'></div><div id='editor_{$name}' style='height: 300px'></div></div>",
default => "<script type='text/plain' id='{$name}' name='{$name}' class='editor' data-content='{$detail}'></script>",
};
}