docs(figure): pass an object to nodeInputRule (#2954)

This commit is contained in:
ahhshm
2022-07-07 00:28:55 +04:30
committed by GitHub
parent edb2291efc
commit e2f8747e2b

View File

@@ -180,10 +180,14 @@ export const Figure = Node.create<FigureOptions>({
addInputRules() { addInputRules() {
return [ return [
nodeInputRule(inputRegex, this.type, match => { nodeInputRule({
const [, alt, src, title] = match find: inputRegex,
type: this.type,
getAttributes: match => {
const [, src, alt, title] = match
return { src, alt, title } return { src, alt, title }
},
}), }),
] ]
}, },