diff --git a/composer.json b/composer.json index 0820b83..004ce68 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ }, "laket" : { "title": "百度编辑器", - "version": "1.2.8", + "version": "1.2.9", "adaptation": "1.3.*" }, "extra": { diff --git a/src/Service.php b/src/Service.php index 43840cb..a7e0d46 100644 --- a/src/Service.php +++ b/src/Service.php @@ -55,6 +55,15 @@ public function start() */ protected function loadEvent() { + // 通用事件 + add_action('ueditor_js', function() { + echo $this->getInputItemJS(); + }); + + add_action('ueditor_init', function($item) { + echo laket_ueditor_bind("js-ueditor"); + }); + // 系统插件设置 add_action('laket_admin_input_item_js_before', function() { echo $this->getInputItemJS(); @@ -64,7 +73,7 @@ protected function loadEvent() echo $this->getInputItem($item); }); - // 设置插件 + // 设置 add_action('laket_settings_input_item_js_before', function() { echo $this->getInputItemJS(); }); @@ -83,7 +92,7 @@ protected function loadEvent() }); // 事件 - add_filter('ConfigModelGetFieldType', function($fieldType) { + add_filter('config_model_get_field_type', function($fieldType) { $fieldType[] = [ "name" => "ueditor", "title" => "百度编辑器", @@ -93,7 +102,7 @@ protected function loadEvent() return $fieldType; }); - add_filter('ConfigModelGetConfigs', function($newConfigs, $configs) { + add_filter('config_model_get_configs', function($newConfigs, $configs) { foreach ($configs as $key => $value) { if ($value['type'] == 'ueditor') { $newConfigs[$value['name']] = htmlspecialchars_decode($value['value']); @@ -104,7 +113,7 @@ protected function loadEvent() }); // 系统闪存插件 - add_filter('FlashModelGetConfigs', function($settingDatalist, $settinglist) { + add_filter('flash_model_get_configs', function($settingDatalist, $settinglist) { foreach ($settinglist as $value) { if ($value['type'] == 'ueditor') { $settingDatalist[$value['name']] = htmlspecialchars_decode($value['value']);