【问题标题】:Inserting component Setting into Style Manager将组件设置插入样式管理器
【发布时间】:2019-05-18 00:52:22
【问题描述】:

由于缺乏文档,我很难弄清楚如何将组件设置(特征)添加到演示中的样式管理器面板部分。

是否存在代码块?我花了 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"]
    },

我想在样式管理器中添加组件设置

【问题讨论】:

    标签: javascript html css angularjs grapesjs


    【解决方案1】:

    以下是如何将名为“垂直对齐”的功能添加到样式管理器的示例:

    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"
            }
        ]
    });
    

    【讨论】:

      猜你喜欢
      • 2018-08-05
      • 1970-01-01
      • 2016-04-10
      • 2017-09-19
      • 2015-01-24
      • 2010-10-17
      • 1970-01-01
      • 2019-02-07
      • 2018-07-30
      相关资源
      最近更新 更多