代码拉取完成,页面将自动刷新
# 运行环境要求 PHP8+
composer require iszsw/editor
use surface\components\Form;
use surface\editor\Editor;
use surface\Surface;
$surface = new Surface();
// 注册组件
Editor::register($surface);
$form = (new Form())
->props(
[
"columns" => [
(new Editor())
->name('editor')->label("详情")
->value("<h1>Hello</h1>")
->props(
[
"editorStyle" => [
"minHeight" => "150px",
]
]
)
,
],
]
);
echo $form->view($surface);
属性名 | 说明 | 类型 | 默认值 |
---|---|---|---|
editorConfig | 编辑器配置 | Array | [] |
toolbarConfig | 工具栏配置 | Array | [] |
editorStyle | 编辑器样式 | Array | [] |
mode | 富文本模式 | string | default |
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。