A visual editor to design a banner with customize elements, e.g. Text, Button, etc. You could drag element and edit element attributes (font, color and more).



How to configure meta as banner_editor

    // Main resource that will has a banner_editor meta
    type HomePage struct {
        BannerHTML string

    // Define element's attributes
    type buttonSetting struct {
        Text  string
        Link  string
        Color string

    type subHeaderSetting struct {
        Text  string
        Color string

    buttonRes := Admin.NewResource(&buttonSetting{})
    buttonRes.Meta(&admin.Meta{Name: "Text"})
    buttonRes.Meta(&admin.Meta{Name: "Link"})

    subHeaderRes := Admin.NewResource(&subHeaderSetting{})
    subHeaderRes.Meta(&admin.Meta{Name: "Text"})
    subHeaderRes.Meta(&admin.Meta{Name: "Color"})

    // Important: configure element's template path

        Name:     "Button",
        Template: "button", // Looking:
        Resource: buttonRes,
        Context: func(c *admin.Context, r interface{}) interface{} {
            setting := r.(QorBannerEditorSettingInterface).GetSerializableArgument(r.(QorBannerEditorSettingInterface)).(*buttonSetting)
            return setting

    homePageResource := Admin.AddResource(&HomePage{})
    homePageResource.Meta(&admin.Meta{Name: "BannerHTML", Config: &banner_editor.BannerEditorConfig{}})

How to specified elements in banner_editor's toolbar

    homePageResource.Meta(&admin.Meta{Name: "BannerHTML", Config: &banner_editor.BannerEditorConfig{
        Elements: []string{"Button"}, // elements you would like to display

results matching ""

    No results matching ""