Store the customized Shopro mall so it can be kept on the remote.

Co-authored-by: Cursor <cursoragent@cursor.com>
这个提交包含在:
wikiboss
2026-09-22 13:55:12 +08:00
当前提交 b87880e247
共有 2547 个文件被更改,包括 423496 次插入 和 0 次删除

查看文件

@@ -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'] ?? []
];
}
}