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