3

Due to the lack of documentation I have a hard time figuring out how to add component settings (traits) into the Style Manager panel section as it is in the demo.

Is there a block of code that exists? I spent 2 days trying to figure this out but I couldn't find anything

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"]
    },

I want to add the component settings inside the Style Manager

chazsolo
  • 7,873
  • 1
  • 20
  • 44
Brandon Yu
  • 49
  • 1
  • 1
  • 5

1 Answers1

0

Here is an example of how to add the feature called "Vertical Align" to the style manager:

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"
        }
    ]
});
Anas Abu Farraj
  • 1,540
  • 4
  • 23
  • 31