UNPKG

lexical-vue

Version:

An extensible Vue 3 web text-editor based on Lexical.

26 lines (25 loc) 860 B
import { defineComponent, watchEffect } from "vue"; import { registerTabIndentation } from "@lexical/extension"; import { useLexicalComposer } from "./LexicalComposer.vine.js"; const TabIndentationPlugin = (()=>{ const __vine = defineComponent({ name: 'TabIndentationPlugin', props: { maxIndent: {} }, setup (__props, param) { let { expose: __expose } = param; __expose(); const props = __props; const editor = useLexicalComposer(); watchEffect((onInvalidate)=>{ const unregister = registerTabIndentation(editor, props.maxIndent); onInvalidate(unregister); }); return (_ctx, _cache)=>null; } }); __vine.__vue_vine = true; return __vine; })(); export { TabIndentationPlugin };