From 1d3b50124cce0e208813573cf8e5ef8516f1fe12 Mon Sep 17 00:00:00 2001 From: deatil <2217957370@qq.com> Date: Fri, 14 Jun 2024 12:18:36 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8DCMS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 2 +- src/Service.php | 19 ++++++++++++++----- src/helper.php | 6 +++--- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 2934de4..fe8e0fd 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ }, "laket" : { "title": "百度编辑器", - "version": "1.2.2", + "version": "1.2.3", "adaptation": "1.2.*" }, "extra": { diff --git a/src/Service.php b/src/Service.php index 0e05962..d41aaa6 100644 --- a/src/Service.php +++ b/src/Service.php @@ -53,14 +53,14 @@ public function start() protected function getInputItemJS($item) { $html = ' - - + + - + '; return $html; @@ -105,7 +105,7 @@ protected function getInputItem($item) */ protected function loadEvent() { - // 系统闪存插件设置 + // 系统插件设置 $this->app->event->listen('laket_admin_input_item_js_before', function($item) { return $this->getInputItemJS($item); }); @@ -114,7 +114,7 @@ protected function loadEvent() return $this->getInputItem($item); }); - // 设置闪存插件 + // 设置插件 $this->app->event->listen('laket_settings_input_item_js_before', function($item) { return $this->getInputItemJS($item); }); @@ -123,6 +123,15 @@ protected function loadEvent() return $this->getInputItem($item); }); + // CMS + $this->app->event->listen('cms_input_item_js', function($item) { + return $this->getInputItemJS($item); + }); + + $this->app->event->listen('cms_input_item_editor', function($item) { + return laket_ueditor_bind("js-ueditor"); + }); + // 事件 if (class_exists(SettingsEvent\ConfigModelGetFieldType::class)) { $this->app->event->listen( diff --git a/src/helper.php b/src/helper.php index 49d66ce..7496051 100644 --- a/src/helper.php +++ b/src/helper.php @@ -20,15 +20,15 @@ function laket_ueditor_config(string $key = null, $default = null) { */ function laket_ueditor_bind($id = '') { $html = ' - - + + - + '; return $html;