Kind: Function
Source: atloria-monorepo/packages/editor/src/plugins/codeblock/CodeBlockNode.tsx
Converts a
HTML element into a CodeBlockNode.
Extracts the code content, language, and meta information from the element's attributes.
The language is determined from the class attribute (e.g., class="language-javascript") or
the data-language attribute if available.
Signature
tsfunction $convertPreElement(element: Element): DOMConversionOutput
Parameters
Name Type elementElement
Returns: DOMConversionOutput
Was this page helpful?