prosekit/solid
Interfaces
Section titled “Interfaces”SolidMarkViewOptions
Section titled “SolidMarkViewOptions”Options for defineSolidMarkView.
Extends
Section titled “Extends”CoreMarkViewUserOptions
<SolidMarkViewComponent
>
Properties
Section titled “Properties”-
as?:
MarkViewDOMSpec
-
contentAs?:
MarkViewDOMSpec
-
destroy?: () =>
void
-
ignoreMutation?: (
mutation
:ViewMutationRecord
) =>boolean
|void
-
name:
string
-
The name of the mark type.
SolidMarkViewProps
Section titled “SolidMarkViewProps”Extends
Section titled “Extends”MarkViewContextProps
Properties
Section titled “Properties”-
contentRef:
MarkViewContentRef
SolidNodeViewOptions
Section titled “SolidNodeViewOptions”Options for defineSolidNodeView.
Extends
Section titled “Extends”CoreNodeViewUserOptions
<SolidNodeViewComponent
>
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
SolidNodeViewProps
Section titled “SolidNodeViewProps”Extends
Section titled “Extends”NodeViewContextProps
Properties
Section titled “Properties”-
contentRef:
NodeViewContentRef
-
decorations: readonly
Decoration
[]
-
getPos: () =>
undefined
|number
-
selected:
boolean
UseExtensionOptions
Section titled “UseExtensionOptions”Properties
Section titled “Properties”-
editor?:
MaybeAccessor
<Editor
<any
>> -
The editor to add the extension to. If not provided, it will use the editor from the nearest
ProseKit
component.
Type Aliases
Section titled “Type Aliases”MaybeAccessor<T>
Section titled “MaybeAccessor<T>”-
type MaybeAccessor<T> =
T
|Accessor
<T
> -
T or a reactive/non-reactive function returning T
Type Parameters
Section titled “Type Parameters”Type Parameter T
ProseKitProps
Section titled “ProseKitProps”-
type ProseKitProps =
ParentProps
<{editor
:Editor
; }>
SolidMarkViewComponent
Section titled “SolidMarkViewComponent”-
type SolidMarkViewComponent =
Component
<SolidMarkViewProps
>
SolidNodeViewComponent
Section titled “SolidNodeViewComponent”-
type SolidNodeViewComponent =
Component
<SolidNodeViewProps
>
Variables
Section titled “Variables”ProseKit
Section titled “ProseKit”-
const ProseKit:
Component
<ProseKitProps
> -
The root component for a ProseKit editor.
Functions
Section titled “Functions”defineSolidMarkView()
Section titled “defineSolidMarkView()”-
function defineSolidMarkView(
options
:SolidMarkViewOptions
):Extension
-
Defines a mark view using a Solid component.
defineSolidNodeView()
Section titled “defineSolidNodeView()”-
function defineSolidNodeView(
options
:SolidNodeViewOptions
):Extension
-
Defines a node view using a Solid 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()”-
Retrieves the editor instance from the nearest ProseKit component.
useExtension()
Section titled “useExtension()”-
function useExtension(
extension
:Accessor
<null
|Extension
<ExtensionTyping
<any
,any
,any
>>>,options?
:UseExtensionOptions
):void
-
Add an extension to the editor.
useKeymap()
Section titled “useKeymap()”-
function useKeymap(
keymap
: () =>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.