# RichNode

Source: /tuil/docs/reference/packages/editor/api/rich-node
Locale: en

interface exported by @mwillbanks/tuil-editor.



{/* Generated by tooling/docs/generate-reference.ts. */}

## interface [#interface]

Public interface exported by `@mwillbanks/tuil-editor`.

```ts
export interface RichNode {
  readonly [key: string]: unknown;
  readonly type: RichNodeType;
  readonly text?: string;
  readonly level?: number;
  readonly attributes?: Readonly<Record<string, unknown>>;
  readonly marks?: readonly RichMark[];
  readonly children?: readonly RichNode[];
}
```

## Members [#members]

| Member       | Type                                             | Required | Description                                                                                 | Related types                                                        |
| ------------ | ------------------------------------------------ | -------- | ------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| `type`       | `RichNodeType`                                   | Yes      | The `type` member uses the `RichNodeType` contract.                                         | [`RichNodeType`](/tuil/docs/reference/packages/editor/api/rich-node-type) |
| `text`       | `string \| undefined`                            | No       | The `text` member uses the `string \| undefined` contract.                                  | —                                                                    |
| `level`      | `number \| undefined`                            | No       | The `level` member uses the `number \| undefined` contract.                                 | —                                                                    |
| `attributes` | `Readonly<Record<string, unknown>> \| undefined` | No       | The `attributes` member uses the `Readonly<Record<string, unknown>> \| undefined` contract. | —                                                                    |
| `marks`      | `readonly RichMark[] \| undefined`               | No       | The `marks` member uses the `readonly RichMark[] \| undefined` contract.                    | [`RichMark`](/tuil/docs/reference/packages/editor/api/rich-mark)          |
| `children`   | `readonly RichNode[] \| undefined`               | No       | The `children` member uses the `readonly RichNode[] \| undefined` contract.                 | [`RichNode`](/tuil/docs/reference/packages/editor/api/rich-node)          |

## Parameters [#parameters]

This declaration has no public members.

## Returns [#returns]

This declaration does not return a value.

## Throws [#throws]

No thrown errors are documented for this declaration.

## Related types [#related-types]

* [`RichMark`](/tuil/docs/reference/packages/editor/api/rich-mark)
* [`RichNodeType`](/tuil/docs/reference/packages/editor/api/rich-node-type)

## Source [#source]

[View the secondary source reference](https://github.com/mwillbanks/tuil/blob/main/packages/editor/src/rich.ts)

## Package [#package]

[@mwillbanks/tuil-editor](/tuil/docs/reference/packages/editor)
