Docs
Forced Layout
Forced Layout
Strict document structure.
Installation
npm install @udecode/plate-normalizers @udecode/plate-trailing-block
Usage
import { createNormalizeTypesPlugin } from '@udecode/plate-normalizers';
import { createTrailingBlockPlugin } from '@udecode/plate-trailing-block';
const plugins = [
// ...otherPlugins
createTrailingBlockPlugin({ options: { type: ELEMENT_PARAGRAPH } }),
createNormalizeTypesPlugin({
options: {
rules: [{ path: [0], strictType: ELEMENT_H1 }],
},
}),
];
API
createNormalizeTypesPlugin
Attributes
Collapse all
An array of rule objects.