Toobar is the collection of ToolbarItem to interact with SubEditor.
var subeditor = new SubEditor(elm, { toolbarList : ["undo","redo","seperator","text","format","link","remove_format","nextline","indent","outdent","spacer","color","backgroundcolor","|","align","ol","ul","image", "library","table","hr","source","fullscreen"] }); //dom element of toolbar: console.log(subeditor.refToolbar); //toolbar class for features and methods: console.log(subeditor.toolbar);
ToolbarItem rendered in the same order as declared in toolbarList.
<div class="SubEditorToolbar"></div>
Add an item into toolbar during runtime. If a function is provide, it should return a ToolbarItem object.
Overlay a shadow on toolbar and only show items that are allowed. For example, in source code mode, only source code icon is enabled.
Hide the shadow.
return true if the shadow is visible.
Hide the dropdown content.
Insert close button on top right corner to the toobar item dropdown content.
Remove the inserted close button.
If the toobar item has custom dropdown content enabled. This function will center the dropdown content to the toobar icon.