0
我试图创建more
自定义下拉菜单,在toolbarXS被激活时添加下面的所有工具栏按钮(XS中所有丢失的图标应该位于more
之下下拉菜单。 不幸的是,文档是不是清晰,只输出文本选项,这些选项不做任何事,除了展示。Froala Wysiwyg - 在自定义下拉列表中添加自定义和工具栏按钮
我想知道如果任何人都可以在如何做到这一点帮助。
即
// define annotation button for imagePopup
$.FroalaEditor.DefineIcon('annotationIcon', { NAME: 'pencil'}); // the icon
$.FroalaEditor.RegisterCommand('annotation', { // the button
title: 'Annotation',
icon: 'annotationIcon',
undo: true, // Save the button action into undo stack.
focus: true, // Focus inside the editor before the callback.
showOnMobile: true, // Show the button on mobile or not.
refreshAfterCallback: true, // Refresh the buttons state after the callback.
// Called when the button is hit.
callback: function() {
annotateImage(this);
}
})
// Define `more` dropdown button.
$.FroalaEditor.RegisterCommand('moreDropdown', {
title: 'More',
icon: 'More',
undo: true,
focus: true,
type: 'dropdown',
options: {
"annotation": 'annotation'
},
});
在此先感谢
编辑: 现在我能想出的唯一办法就是使用
html: function() {
return 'HTML_CODE'
}
,只是写的所有UL由我自己这是令人厌恶的,似乎不喜欢有道做到这一点。
任何帮助将不胜感激。