Skip to main content

getExtensionField

@blockslides/core


@blockslides/core / getExtensionField

Function: getExtensionField()

getExtensionField<T, E>(extension, field, context?): RemoveThis<T>

Defined in: blockslides/packages/core/src/helpers/getExtensionField.ts:13

Returns a field from an extension

Type Parameters

T

T = any

E

E extends AnyExtension = any

Parameters

extension

E

The BlockSlides extension

field

The field, for example renderHTML or priority

"code" | "marks" | "content" | "addOptions" | "addStorage" | "addGlobalAttributes" | "addCommands" | "addKeyboardShortcuts" | "addInputRules" | "addPasteRules" | "addProseMirrorPlugins" | "addExtensions" | "extendNodeSchema" | "extendMarkSchema" | "onBeforeCreate" | "onCreate" | "onUpdate" | "onSelectionUpdate" | "onTransaction" | "onFocus" | "onBlur" | "onDestroy" | "name" | "priority" | "markdownTokenName" | "parseMarkdown" | "renderMarkdown" | "markdownTokenizer" | "markdownOptions" | "addMarkView" | "keepOnSplit" | "inclusive" | "excludes" | "exitable" | "group" | "spanning" | "parseHTML" | "renderHTML" | "addAttributes" | "addNodeView" | "topNode" | "inline" | "atom" | "selectable" | "draggable" | "whitespace" | "linebreakReplacement" | "defining" | "isolating" | "renderText"

context?

Omit<MaybeThisParameterType<T>, "parent">

The context object that should be passed as this into the function

Returns

RemoveThis<T>

The field value