Documentation
¶
Index ¶
- Constants
- func Create(context *admin.Context)
- func GetContent(value string, detector interface{}) string
- func New(context *admin.Context)
- func RegisterElement(e *Element)
- func RegisterExternalStylePath(path string)
- func RegisterViewPath(p string)
- func SetAssetFS(assetFS assetfs.Interface)
- func Update(context *admin.Context)
- type BannerEditorConfig
- type Element
- type Platform
- type QorBannerEditorSetting
- type QorBannerEditorSettingInterface
- type Size
Constants ¶
View Source
const ( // Laptop default laptop platform name Laptop = "Laptop" // Mobile default mobile platform name Mobile = "Mobile" )
Variables ¶
This section is empty.
Functions ¶
func GetContent ¶
GetContent return HTML string by detector, detector could be a string (Platform, Mobile or other), http request and nil
func RegisterExternalStylePath ¶
func RegisterExternalStylePath(path string)
RegisterExternalStylePath register a asset path
Types ¶
type BannerEditorConfig ¶
type BannerEditorConfig struct {
MediaLibrary *admin.Resource
Elements []string
SettingResource *admin.Resource
Platforms []Platform
}
BannerEditorConfig configure display elements and setting model
func (*BannerEditorConfig) ConfigureQorMeta ¶
func (config *BannerEditorConfig) ConfigureQorMeta(metaor resource.Metaor)
ConfigureQorMeta configure route and funcmap for banner_editor meta
type Element ¶
type Element struct {
Icon string
Name string
Label string
Template string
Resource *admin.Resource
Context func(context *admin.Context, setting interface{}) interface{}
}
Element represent a button/element in banner_editor toolbar
type QorBannerEditorSetting ¶
type QorBannerEditorSetting struct {
gorm.Model
serializable_meta.SerializableMeta
}
QorBannerEditorSetting default setting model
func (QorBannerEditorSetting) GetID ¶
func (setting QorBannerEditorSetting) GetID() int64
GetID return setting ID
func (QorBannerEditorSetting) GetSerializableArgumentResource ¶
func (setting QorBannerEditorSetting) GetSerializableArgumentResource() *admin.Resource
GetSerializableArgumentResource return setting's resource
type QorBannerEditorSettingInterface ¶
type QorBannerEditorSettingInterface interface {
GetID() uint
serializable_meta.SerializableMetaInterface
}
QorBannerEditorSettingInterface interface to support customize setting model
Click to show internal directories.
Click to hide internal directories.