Store the customized Shopro mall so it can be kept on the remote.
Co-authored-by: Cursor <cursoragent@cursor.com>
这个提交包含在:
54
addons/summernote/Summernote.php
普通文件
54
addons/summernote/Summernote.php
普通文件
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace addons\summernote;
|
||||
|
||||
use think\Addons;
|
||||
|
||||
/**
|
||||
* Summernote富文本编辑器
|
||||
*/
|
||||
class Summernote extends Addons
|
||||
{
|
||||
|
||||
/**
|
||||
* 插件安装方法
|
||||
* @return bool
|
||||
*/
|
||||
public function install()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 插件卸载方法
|
||||
* @return bool
|
||||
*/
|
||||
public function uninstall()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
*/
|
||||
public function configInit(&$params)
|
||||
{
|
||||
$config = $this->getConfig();
|
||||
$fontNames = explode(',', $config['fontNames'] ?? '') ?? [];
|
||||
$fontNames = array_map('trim', $fontNames);
|
||||
$params['summernote'] = [
|
||||
'classname' => $config['classname'] ?? '.editor',
|
||||
'height' => $config['height'] ?? 250,
|
||||
'minHeight' => $config['minHeight'] ?? 250,
|
||||
'placeholder' => $config['placeholder'] ?? '',
|
||||
'followingToolbar' => intval($config['followingToolbar'] ?? 0),
|
||||
'fontNames' => $fontNames,
|
||||
'airMode' => intval($config['airMode'] ?? 0),
|
||||
'pasteAsPlainText' => intval($config['pasteAsPlainText'] ?? 0),
|
||||
'toolbar' => (array)json_decode($config['toolbar'] ?? '', true),
|
||||
'isdompurify' => !!($config['isdompurify'] ?? '0'),
|
||||
'allowiframeprefixs' => $config['allowiframeprefixs'] ?? []
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
在新工单中引用
屏蔽一个用户