prosekit/vue
Interfaces
Section titled “Interfaces”ProseKitProps
Section titled “ProseKitProps”Properties
Section titled “Properties”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
ProseKit
component.
VueMarkViewOptions
Section titled “VueMarkViewOptions”Options for defineVueMarkView.
Extends
Section titled “Extends”CoreMarkViewUserOptions
<VueMarkViewComponent
>
Properties
Section titled “Properties”-
as?:
MarkViewDOMSpec
-
contentAs?:
MarkViewDOMSpec
-
destroy?: () =>
void
-
ignoreMutation?: (
mutation
:ViewMutationRecord
) =>boolean
|void
-
name:
string
-
The name of the mark type.
VueMarkViewProps
Section titled “VueMarkViewProps”Extends
Section titled “Extends”MarkViewContext
Properties
Section titled “Properties”-
contentRef:
VNodeRef
VueNodeViewOptions
Section titled “VueNodeViewOptions”Options for defineVueNodeView.
Extends
Section titled “Extends”CoreNodeViewUserOptions
<VueNodeViewComponent
>
Properties
Section titled “Properties”-
as?:
NodeViewDOMSpec
-
contentAs?:
NodeViewDOMSpec
-
deselectNode?: () =>
void
-
destroy?: () =>
void
-
ignoreMutation?: (
mutation
:ViewMutationRecord
) =>boolean
|void
-
name:
string
-
The name of the node type.
-
onUpdate?: () =>
void
-
selectNode?: () =>
void
-
setSelection?: (
anchor
:number
,head
:number
,root
:Document
|ShadowRoot
) =>void
-
update?: (
node
:ProseMirrorNode
,decorations
: readonlyDecoration
[],innerDecorations
:DecorationSource
) =>boolean
|void
VueNodeViewProps
Section titled “VueNodeViewProps”Extends
Section titled “Extends”NodeViewContext
Properties
Section titled “Properties”-
contentRef:
VNodeRef
-
decorations:
ShallowRef
<readonlyDecoration
[]>
-
getPos: () =>
undefined
|number
-
innerDecorations:
ShallowRef
<DecorationSource
>
-
node:
ShallowRef
<ProseMirrorNode
>
-
selected:
ShallowRef
<boolean
>
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
<null
|Extension
<ExtensionTyping
<any
,any
,any
>>>,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.