# $convertPreElement

**Kind:** Function

**Source:** [`atloria-monorepo/packages/editor/src/plugins/codeblock/CodeBlockNode.tsx`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/packages/editor/src/plugins/codeblock/CodeBlockNode.tsx#L298)

Converts a <pre> 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

```ts
function $convertPreElement(element: Element): DOMConversionOutput
```

## Parameters

| Name | Type |
|---|---|
| `element` | `Element` |

**Returns:** `DOMConversionOutput`
