Skip to main content

AtomBlockMarkdownSpecOptions

@blockslides/core


@blockslides/core / AtomBlockMarkdownSpecOptions

Interface: AtomBlockMarkdownSpecOptions

Defined in: blockslides/packages/core/src/utilities/markdown/createAtomBlockMarkdownSpec.ts:13

Properties

nodeName

nodeName: string

Defined in: blockslides/packages/core/src/utilities/markdown/createAtomBlockMarkdownSpec.ts:15

The Tiptap node name this spec is for


name?

optional name: string

Defined in: blockslides/packages/core/src/utilities/markdown/createAtomBlockMarkdownSpec.ts:17

The markdown syntax name (defaults to nodeName if not provided)


parseAttributes()?

optional parseAttributes: (attrString) => Record<string, any>

Defined in: blockslides/packages/core/src/utilities/markdown/createAtomBlockMarkdownSpec.ts:19

Function to parse attributes from token attribute string

Parameters

attrString

string

Returns

Record<string, any>


serializeAttributes()?

optional serializeAttributes: (attrs) => string

Defined in: blockslides/packages/core/src/utilities/markdown/createAtomBlockMarkdownSpec.ts:21

Function to serialize attributes back to string for rendering

Parameters

attrs

Record<string, any>

Returns

string


defaultAttributes?

optional defaultAttributes: Record<string, any>

Defined in: blockslides/packages/core/src/utilities/markdown/createAtomBlockMarkdownSpec.ts:23

Default attributes to apply when parsing


requiredAttributes?

optional requiredAttributes: string[]

Defined in: blockslides/packages/core/src/utilities/markdown/createAtomBlockMarkdownSpec.ts:25

Required attributes that must be present for successful parsing


allowedAttributes?

optional allowedAttributes: string[]

Defined in: blockslides/packages/core/src/utilities/markdown/createAtomBlockMarkdownSpec.ts:27

Attributes that are allowed to be rendered back to markdown (whitelist)