Forced Layout
Installation
npm install @udecode/plate-normalizers @udecode/plate-trailing-block
Usage
import { NormalizersPlugin } from '@udecode/plate-normalizers/react';
import { TrailingBlockPlugin } from '@udecode/plate-trailing-block/react';
import { ParagraphPlugin } from '@udecode/plate/react';
import { HEADING_KEYS } from '@udecode/plate-heading/react';
const plugins = [
// ...otherPlugins
TrailingBlockPlugin.configure({ options: { type: ParagraphPlugin.key } }),
NormalizersPlugin.configure({
options: {
rules: [{ path: [0], strictType: 'h1' }],
},
}),
];