Skip to content

Commit

Permalink
更新
Browse files Browse the repository at this point in the history
  • Loading branch information
deatil committed Jul 7, 2024
1 parent ccb92c5 commit 15da7dd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"laket" : {
"title": "百度编辑器",
"version": "1.2.8",
"version": "1.2.9",
"adaptation": "1.3.*"
},
"extra": {
Expand Down
17 changes: 13 additions & 4 deletions src/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -64,7 +73,7 @@ protected function loadEvent()
echo $this->getInputItem($item);
});

// 设置插件
// 设置
add_action('laket_settings_input_item_js_before', function() {
echo $this->getInputItemJS();
});
Expand All @@ -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" => "百度编辑器",
Expand All @@ -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']);
Expand All @@ -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']);
Expand Down

0 comments on commit 15da7dd

Please sign in to comment.