mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: implement bullet lists in the editor
This commit is contained in:
parent
3d489c599e
commit
c605c2a8f4
5 changed files with 151 additions and 21 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue