balm-ui
Version:
A modular and customizable UI library based on Material Design and Vue 3
18 lines (13 loc) • 341 B
JavaScript
import { useEditor } from '../core/quill';
function useHistory() {
const { toolbarHandlers } = useEditor();
toolbarHandlers.undo = () => {
const { quill } = useEditor();
quill.history.undo();
};
toolbarHandlers.redo = () => {
const { quill } = useEditor();
quill.history.redo();
};
}
export default useHistory;