feat: implement bullet lists in the editor

This commit is contained in:
swve 2025-04-18 15:24:06 +02:00
parent 3d489c599e
commit c605c2a8f4
5 changed files with 151 additions and 21 deletions

View file

@ -58,7 +58,18 @@ function Canva(props: Editor) {
const editor: any = useEditor({
editable: isEditable,
extensions: [
StarterKit,
StarterKit.configure({
bulletList: {
HTMLAttributes: {
class: 'bullet-list',
},
},
orderedList: {
HTMLAttributes: {
class: 'ordered-list',
},
},
}),
NoTextInput,
// Custom Extensions
InfoCallout.configure({
@ -213,6 +224,13 @@ const CanvaWrapper = styled.div`
ol {
padding: 0 1rem;
padding-left: 20px;
}
ul {
list-style-type: disc;
}
ol {
list-style-type: decimal;
}