Installation
npx shadcn@latest add https://platejs.org/r/list-toolbar-button
Examples
List
Create indented lists with multiple levels of indentation and customize the list style type for each level.
- Todo 1
- Disc 1
- Disc 2
- Todo 2
- Roman 1
- Decimal 11
- Decimal 111
- Decimal 112
- Decimal 12
- Decimal 13
- Roman 2
- Decimal 11
- Decimal 12
- Roman 3
- Roman 4
1
100%
Files
components/demo.tsx
'use client';
import * as React from 'react';
import { Plate, usePlateEditor } from 'platejs/react';
import { EditorKit } from '@/components/editor/editor-kit';
import { Editor, EditorContainer } from '@/components/ui/editor';
import { DEMO_VALUES } from './values/demo-values';
export default function Demo({ id }: { id: string }) {
const editor = usePlateEditor({
plugins: EditorKit,
value: DEMO_VALUES[id],
});
return (
<Plate editor={editor}>
<EditorContainer variant="demo">
<Editor />
</EditorContainer>
</Plate>
);
}