### Divider Plugin

The Divider plugin allows users to insert horizontal dividers between blocks.

Use the exported `DIVIDER_BUTTONS` constant to customize which divider toolbar buttons are visible.

#### Editor

```tsx widget
import { pluginDivider, type RicosDocument, RicosEditor } from '@wix/ricos';
import React from 'react';

const content: RicosDocument = {
  nodes: [
    {
      type: 'PARAGRAPH',
      id: 'intro',
      nodes: [{ type: 'TEXT', id: '', textData: { text: 'Chapter 1' } }],
    },
    {
      type: 'DIVIDER',
      id: 'd1',
      dividerData: {
        lineStyle: 'SINGLE',
        width: 'LARGE',
        alignment: 'CENTER',
      },
    },
    {
      type: 'PARAGRAPH',
      id: 'body',
      nodes: [
        {
          type: 'TEXT',
          id: '',
          textData: { text: 'Try clicking the divider to change its style.' },
        },
      ],
    },
  ],
};

// @essential-start
export default () => <RicosEditor initialContent={content} plugins={[pluginDivider()]} />;
// @essential-end
```

#### Viewer

```tsx widget
import '@wix/ricos/css/plugin-divider-viewer.global.css';
import '@wix/ricos/css/ricos-viewer.global.css';
import { pluginDividerViewer, type RicosDocument, RicosViewer } from '@wix/ricos';
import React from 'react';

const content: RicosDocument = {
  nodes: [
    {
      type: 'PARAGRAPH',
      id: 'intro',
      nodes: [{ type: 'TEXT', id: '', textData: { text: 'Chapter 1: Introduction' } }],
    },
    {
      type: 'DIVIDER',
      id: 'd1',
      dividerData: {
        lineStyle: 'SINGLE',
        width: 'LARGE',
        alignment: 'CENTER',
      },
    },
    {
      type: 'PARAGRAPH',
      id: 'body',
      nodes: [
        {
          type: 'TEXT',
          id: '',
          textData: {
            text: 'Welcome to the introductory chapter. Here we will discuss the basics of our topic.',
          },
        },
      ],
    },
  ],
};

// @essential-start
export default () => <RicosViewer content={content} plugins={[pluginDividerViewer()]} />;
// @essential-end
```
