Skip to main content

LinkNode

ClassDataClassSource

LinkNode(
children: list[DeletedNode | TextNode | LineBreakNode | HorizontalRuleNode | InlineCodeNode | CodeBlockNode | BoldNode | ItalicNode | UnderlineNode | StrikeNode | SpoilerNode | LinkNode | HeadingNode | ParagraphNode | QuoteNode | AlertNode | ListItemNode | ListNode | TableCellNode | TableRowNode | TableNode],
type: Literal["link"] = "link",
href: str
)

Node: Link

Provide the URL, representing the <a> tag in HTML.

Text is usually reconstructed from children during BBCode conversion.

Fields​

NameTypeRequired
Description
childrenlist[DeletedNode | TextNode | LineBreakNode | HorizontalRuleNode | InlineCodeNode | CodeBlockNode | BoldNode | ItalicNode | UnderlineNode | StrikeNode | SpoilerNode | LinkNode | HeadingNode | ParagraphNode | QuoteNode | AlertNode | ListItemNode | ListNode | TableCellNode | TableRowNode | TableNode]The children of the node.
typeLiteral["link"]The type identifer of this document node.
hrefstrThe URL where the link refers.