This commit is contained in:
Philipp Kühn
2020-09-22 21:54:52 +02:00
parent 87166ab8c8
commit a865ec4b4e
5 changed files with 7 additions and 1 deletions

View File

@@ -23,7 +23,7 @@ export default new Node()
tag: 'ol', tag: 'ol',
getAttrs: node => ({ getAttrs: node => ({
order: (node as HTMLElement).hasAttribute('start') order: (node as HTMLElement).hasAttribute('start')
? +(node as HTMLElement).getAttribute('start') ? parseInt((node as HTMLElement).getAttribute('start') || '')
: 1, : 1,
}), }),
}], }],

View File

@@ -13,6 +13,7 @@ import Underline from '@tiptap/extension-underline'
import Blockquote from '@tiptap/extension-blockquote' import Blockquote from '@tiptap/extension-blockquote'
import HorizontalRule from '@tiptap/extension-horizontal-rule' import HorizontalRule from '@tiptap/extension-horizontal-rule'
import BulletList from '@tiptap/extension-bullet-list' import BulletList from '@tiptap/extension-bullet-list'
import OrderedList from '@tiptap/extension-ordered-list'
import ListItem from '@tiptap/extension-list-item' import ListItem from '@tiptap/extension-list-item'
export default function defaultExtensions() { export default function defaultExtensions() {
@@ -32,6 +33,7 @@ export default function defaultExtensions() {
Blockquote(), Blockquote(),
HorizontalRule(), HorizontalRule(),
BulletList(), BulletList(),
OrderedList(),
ListItem(), ListItem(),
] ]
} }

View File

@@ -27,6 +27,7 @@
"@tiptap/extension-blockquote": "1.x", "@tiptap/extension-blockquote": "1.x",
"@tiptap/extension-horizontal-rule": "1.x", "@tiptap/extension-horizontal-rule": "1.x",
"@tiptap/extension-bullet-list": "1.x", "@tiptap/extension-bullet-list": "1.x",
"@tiptap/extension-ordered-list": "1.x",
"@tiptap/extension-list-item": "1.x" "@tiptap/extension-list-item": "1.x"
} }
} }

View File

@@ -15,6 +15,7 @@ import Underline from '@tiptap/extension-underline'
import Blockquote from '@tiptap/extension-blockquote' import Blockquote from '@tiptap/extension-blockquote'
import HorizontalRule from '@tiptap/extension-horizontal-rule' import HorizontalRule from '@tiptap/extension-horizontal-rule'
import BulletList from '@tiptap/extension-bullet-list' import BulletList from '@tiptap/extension-bullet-list'
import OrderedList from '@tiptap/extension-ordered-list'
import ListItem from '@tiptap/extension-list-item' import ListItem from '@tiptap/extension-list-item'
export function defaultExtensions() { export function defaultExtensions() {
@@ -34,6 +35,7 @@ export function defaultExtensions() {
Blockquote(), Blockquote(),
HorizontalRule(), HorizontalRule(),
BulletList(), BulletList(),
OrderedList(),
ListItem(), ListItem(),
] ]
} }

View File

@@ -28,6 +28,7 @@
"@tiptap/extension-blockquote": "1.x", "@tiptap/extension-blockquote": "1.x",
"@tiptap/extension-horizontal-rule": "1.x", "@tiptap/extension-horizontal-rule": "1.x",
"@tiptap/extension-bullet-list": "1.x", "@tiptap/extension-bullet-list": "1.x",
"@tiptap/extension-ordered-list": "1.x",
"@tiptap/extension-list-item": "1.x" "@tiptap/extension-list-item": "1.x"
} }
} }