@kademi/keditor
Version:
KEditor is a jQuery plugin which provides a content editor with drag n drop, configurable contents
14 lines (11 loc) • 444 B
JavaScript
export default function () {
let self = this;
let options = self.options;
let topbarRight = self.topbarRight;
$.isPlainObject(options.extraTopbarItems) && $.each(options.extraTopbarItems, (name, item) => {
let btn = $(item.html);
btn.addClass(`keditor-ui keditor-topbar-btn keditor-topbar-btn-${name}`);
btn.on('click', item.click);
topbarRight.append(btn);
});
};