由于缺少文档,我很难弄清楚如何像在演示中一样向“样式管理器”面板部分添加组件设置(特征)。
是否存在代码块?我花了2天的时间试图解决这个问题,但找不到任何东西
styleManager: {
sectors: [
{
name: "General",
open: !1,
buildProps: ["float", "display", "position", "top", "right", "left", "bottom"]
}, {
name: "Dimension",
open: !1,
buildProps: ["width", "height", "max-width", "min-height", "margin", "padding"]
},
我想在样式管理器中添加组件设置
答案 0 :(得分:0)
以下是如何将称为“垂直对齐”的功能添加到样式管理器的示例:
var StyleManager = editor.StyleManager;
StyleManager.addProperty("Typography", {
name: "Vertical Align",
property: "vertical-align",
type: "select",
default: "auto",
list: [{
value: "auto",
name: "auto"
}, {
value: "top !important",
name: "top"
},
{
value: "middle !important",
name: "middle"
},
{
value: "bottom !important",
name: "bottom"
}
]
});