插入选框
插入选框
/*********************************
* 通过checkFigureStyle设置选框样式
* ********************************/
thinkEditor.InsertCheckBox({ id: "", weight: 1.0, content: "单选框样式", checkFigureStyle: E_CHECK_FIGURE_STYLE.Style_0 });
thinkEditor.InsertCheckBox({ id: "", weight: 1.0, content: "复选框样式", checkFigureStyle: E_CHECK_FIGURE_STYLE.Style_1 });
插入选集
插入选集
/*********************************
* step1:给文档设置可使用的选项
* 方式一:调用接口SetOptions。打开文档后调用1次即可
* 方式二:右键菜单-知识库-选项 编辑可选项
* ********************************/
thinkEditor.SetOptions([
{
optionClass: "系统",
optionId: "性别",
items: [
{
id: "man",
groupId: "",
weight: 1.0,
content: "男性",
},
{
id: "woman",
groupId: "",
weight: 1.0,
content: "女性",
},
{
id: "unkown",
groupId: "",
weight: 1.0,
content: "未知性别",
},
],
}
]);
/*********************************
* step2:插入选集
* multipleChoice=0 单选
* multipleChoice=1 多选
* ********************************/
thinkEditor.InsertCheckBoxGroup({
checkFigureStyle: checkFigureStyle,
option: {
multipleChoice: multipleChoice,
optionClass: "系统",
optionId: "性别",
},
});
文档更新时间: 2025-04-23 21:35 作者:admin