prosekit/vue
Interfaces
Section titled “Interfaces”ProseKitProps
Section titled “ProseKitProps”Properties
Section titled “Properties”VueMarkViewProps
Section titled “VueMarkViewProps”Properties
Section titled “Properties”-
contentRef:VNodeRef
VueMarkViewOptions
Section titled “VueMarkViewOptions”Options for defineVueMarkView.
Properties
Section titled “Properties”-
name:string -
The name of the mark type.
-
as?:MarkViewDOMSpec
-
contentAs?:MarkViewDOMSpec
-
ignoreMutation?: (mutation:ViewMutationRecord) =>boolean|void
-
destroy?: () =>void
VueNodeViewProps
Section titled “VueNodeViewProps”Properties
Section titled “Properties”-
contentRef:VNodeRef
-
getPos: () =>number|undefined
-
node:ShallowRef<ProseMirrorNode>
-
selected:ShallowRef<boolean>
-
decorations:ShallowRef<readonlyDecoration[]>
-
innerDecorations:ShallowRef<DecorationSource>
VueNodeViewOptions
Section titled “VueNodeViewOptions”Options for defineVueNodeView.
Properties
Section titled “Properties”-
name:string -
The name of the node type.
-
as?:NodeViewDOMSpec
-
contentAs?:NodeViewDOMSpec
-
update?: (node:ProseMirrorNode,decorations: readonlyDecoration[],innerDecorations:DecorationSource) =>boolean|void
-
ignoreMutation?: (mutation:ViewMutationRecord) =>boolean|void
-
selectNode?: () =>void
-
deselectNode?: () =>void
-
setSelection?: (anchor:number,head:number,root:Document|ShadowRoot) =>void
-
destroy?: () =>void
-
onUpdate?: () =>void
UseExtensionOptions
Section titled “UseExtensionOptions”Properties
Section titled “Properties”-
The editor to add the extension to. If not provided, it will use the editor from the nearest
ProseKitcomponent.
Type Aliases
Section titled “Type Aliases”VueMarkViewComponent
Section titled “VueMarkViewComponent”-
type VueMarkViewComponent =DefineComponent<VueMarkViewProps,any,any>
VueNodeViewComponent
Section titled “VueNodeViewComponent”-
type VueNodeViewComponent =DefineComponent<VueNodeViewProps,any,any>
Variables
Section titled “Variables”ProseKit
Section titled “ProseKit”-
const ProseKit:DefineSetupFnComponent<ProseKitProps> -
The root component for a ProseKit editor.
Functions
Section titled “Functions”defineVueMarkView()
Section titled “defineVueMarkView()”-
function defineVueMarkView(options:VueMarkViewOptions):Extension -
Defines a mark view using a Vue component.
defineVueNodeView()
Section titled “defineVueNodeView()”-
function defineVueNodeView(options:VueNodeViewOptions):Extension -
Defines a node view using a Vue component.
useDocChange()
Section titled “useDocChange()”-
function useDocChange(handler: (doc:ProseMirrorNode) =>void,options?:UseExtensionOptions):void -
Calls the given handler whenever the editor document changes.
useEditor()
Section titled “useEditor()”-
function useEditor<E>(options?:object):ShallowRef<Editor<E>> -
Retrieves the editor instance from the nearest ProseKit component.
useExtension()
Section titled “useExtension()”-
function useExtension(extension:MaybeRefOrGetter<Extension<ExtensionTyping<any,any,any>> |null>,options?:UseExtensionOptions):void -
Add an extension to the editor.
useKeymap()
Section titled “useKeymap()”-
function useKeymap(keymap:MaybeRefOrGetter<Keymap>,options?:UseExtensionOptions):void
useStateUpdate()
Section titled “useStateUpdate()”-
function useStateUpdate(handler: (state:EditorState) =>void,options?:UseExtensionOptions):void -
Calls the given handler whenever the editor state changes.