balm-ui
Version:
A modular and customizable UI library based on Material Design and Vue 3
25 lines (20 loc) • 416 B
JavaScript
let Quill;
let quill;
let toolbarHandlers = {};
const name = 'UiEditor';
const setEditor = (options = {}) => {
if (Object.keys(options).length) {
if (options.quill) {
quill = options.quill;
} else {
Quill = options.Quill;
toolbarHandlers = options.toolbarHandlers;
}
}
};
const useEditor = () => ({
Quill,
quill,
toolbarHandlers
});
export { name, setEditor, useEditor };