# RichNodeProvider

Source: /tuil/docs/reference/packages/editor/api/rich-node-provider
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 RichNodeProvider {
  readonly type: string;
  validate?(node: RichNode): void;
  text?(node: RichNode, children: string): string;
  markdown?(node: RichNode, children: string): string;
}
```

## Members [#members]

| Member     | Type                                                          | Required | Description                                                                                            | Related types                                               |
| ---------- | ------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------- |
| `type`     | `string`                                                      | Yes      | The `type` member uses the `string` contract.                                                          | —                                                           |
| `validate` | `((node: RichNode) => void) \| undefined`                     | No       | The `validate` member uses the `((node: RichNode) => void) \| undefined` contract.                     | [`RichNode`](/tuil/docs/reference/packages/editor/api/rich-node) |
| `text`     | `((node: RichNode, children: string) => string) \| undefined` | No       | The `text` member uses the `((node: RichNode, children: string) => string) \| undefined` contract.     | [`RichNode`](/tuil/docs/reference/packages/editor/api/rich-node) |
| `markdown` | `((node: RichNode, children: string) => string) \| undefined` | No       | The `markdown` member uses the `((node: RichNode, children: string) => string) \| 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]

* [`RichNode`](/tuil/docs/reference/packages/editor/api/rich-node)

## 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)
