mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-27 23:15:15 +08:00
docs(figure): pass an object to nodeInputRule
(#2954)
This commit is contained in:
parent
edb2291efc
commit
e2f8747e2b
@ -180,10 +180,14 @@ export const Figure = Node.create<FigureOptions>({
|
||||
|
||||
addInputRules() {
|
||||
return [
|
||||
nodeInputRule(inputRegex, this.type, match => {
|
||||
const [, alt, src, title] = match
|
||||
nodeInputRule({
|
||||
find: inputRegex,
|
||||
type: this.type,
|
||||
getAttributes: match => {
|
||||
const [, src, alt, title] = match
|
||||
|
||||
return { src, alt, title }
|
||||
return { src, alt, title }
|
||||
},
|
||||
}),
|
||||
]
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user