BlockMarkdownSpecOptions
@blockslides/core / BlockMarkdownSpecOptions
Interface: BlockMarkdownSpecOptions
Defined in: blockslides/packages/core/src/utilities/markdown/createBlockMarkdownSpec.ts:14
Properties
nodeName
nodeName:
string
Defined in: blockslides/packages/core/src/utilities/markdown/createBlockMarkdownSpec.ts:16
The Tiptap node name this spec is for
name?
optionalname:string
Defined in: blockslides/packages/core/src/utilities/markdown/createBlockMarkdownSpec.ts:18
The markdown syntax name (defaults to nodeName if not provided)
getContent()?
optionalgetContent: (token) =>string
Defined in: blockslides/packages/core/src/utilities/markdown/createBlockMarkdownSpec.ts:20
Function to extract content from the node for serialization
Parameters
token
Returns
string
parseAttributes()?
optionalparseAttributes: (attrString) =>Record<string,any>
Defined in: blockslides/packages/core/src/utilities/markdown/createBlockMarkdownSpec.ts:22
Function to parse attributes from the attribute string
Parameters
attrString
string
Returns
Record<string, any>
serializeAttributes()?
optionalserializeAttributes: (attrs) =>string
Defined in: blockslides/packages/core/src/utilities/markdown/createBlockMarkdownSpec.ts:24
Function to serialize attributes to string
Parameters
attrs
Record<string, any>
Returns
string
defaultAttributes?
optionaldefaultAttributes:Record<string,any>
Defined in: blockslides/packages/core/src/utilities/markdown/createBlockMarkdownSpec.ts:26
Default attributes to apply when parsing
content?
optionalcontent:"inline"|"block"
Defined in: blockslides/packages/core/src/utilities/markdown/createBlockMarkdownSpec.ts:28
Content type: 'block' allows paragraphs/lists/etc, 'inline' only allows bold/italic/links/etc
allowedAttributes?
optionalallowedAttributes:string[]
Defined in: blockslides/packages/core/src/utilities/markdown/createBlockMarkdownSpec.ts:30
Allowlist of attributes to include in markdown (if not provided, all attributes are included)