mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-24 03:39:01 +08:00
* fix: #3831 * fix: default attribute + predicate
This commit is contained in:
parent
928bd36f5f
commit
3937c44c43
@ -91,6 +91,8 @@ export const OrderedList = Node.create<OrderedListOptions>({
|
||||
let inputRule = wrappingInputRule({
|
||||
find: inputRegex,
|
||||
type: this.type,
|
||||
getAttributes: match => ({ start: +match[1] }),
|
||||
joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1],
|
||||
})
|
||||
|
||||
if (this.options.keepMarks || this.options.keepAttributes) {
|
||||
@ -99,7 +101,8 @@ export const OrderedList = Node.create<OrderedListOptions>({
|
||||
type: this.type,
|
||||
keepMarks: this.options.keepMarks,
|
||||
keepAttributes: this.options.keepAttributes,
|
||||
getAttributes: () => { return this.editor.getAttributes(TextStyle.name) },
|
||||
getAttributes: match => ({ start: +match[1], ...this.editor.getAttributes(TextStyle.name) }),
|
||||
joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1],
|
||||
editor: this.editor,
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user