docs(figure): pass an object to nodeInputRule (#2954)
This commit is contained in:
@@ -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 }
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user