From 88035326a4aaa559d704fb56ae71a310833bc7ce Mon Sep 17 00:00:00 2001 From: wolfcode <37436228+wolf-leo@users.noreply.github.com> Date: Wed, 19 Jun 2024 15:30:03 +0800 Subject: [PATCH] refactor(admin): change default editor from ueditor to wangEditor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Due to the recommendation for better performance and user experience, the default editor in both configuration files and view templates has been switched from ueditor to wangEditor. The code changes reflect this update by marking ueditor as '(不建议使用)' (not recommended) and WangEditor as '(推荐使用)' (recommended). Additionally, the relevant controller file has been updated to ensure that the correct default editor is loaded based on the new configuration setting. --- app/admin/config/admin.php | 4 ++-- app/admin/view/system/config/site.html | 2 +- app/common/controller/AdminController.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/admin/config/admin.php b/app/admin/config/admin.php index 6ade7f9..a194a92 100644 --- a/app/admin/config/admin.php +++ b/app/admin/config/admin.php @@ -27,9 +27,9 @@ return [ // 默认编辑器 'editor_types' => [ - 'ueditor' => '百度编辑器', + 'ueditor' => '百度编辑器(不建议使用)', 'ckeditor' => 'CK编辑器', - 'wangEditor' => 'wangEditor', + 'wangEditor' => 'wangEditor(推荐使用)', ], ]; \ No newline at end of file diff --git a/app/admin/view/system/config/site.html b/app/admin/view/system/config/site.html index 4f5a13d..185fec5 100644 --- a/app/admin/view/system/config/site.html +++ b/app/admin/view/system/config/site.html @@ -62,7 +62,7 @@ {/foreach}
- 默认百度编辑器。 + 默认推荐编辑器。 diff --git a/app/common/controller/AdminController.php b/app/common/controller/AdminController.php index 1d4ddc0..cc34e28 100644 --- a/app/common/controller/AdminController.php +++ b/app/common/controller/AdminController.php @@ -224,7 +224,7 @@ class AdminController extends BaseController 'isSuperAdmin' => $isSuperAdmin, 'version' => env('APP_DEBUG') ? time() : ConfigService::getVersion(), 'adminUploadUrl' => url('ajax/upload', [], false), - 'adminEditor' => sysConfig('site', 'editor_type') ?: 'ueditor', + 'adminEditor' => sysConfig('site', 'editor_type') ?: 'wangEditor', ]; View::assign($data); }