improve extending nodes and marks
This commit is contained in:
@@ -28,6 +28,10 @@ export default function getAttributesFromExtensions(extensions: Extensions): Ext
|
||||
options: extension.options,
|
||||
}
|
||||
|
||||
if (!extension.config.addGlobalAttributes) {
|
||||
return
|
||||
}
|
||||
|
||||
const globalAttributes = extension.config.addGlobalAttributes.bind(context)() as GlobalAttributes
|
||||
|
||||
globalAttributes.forEach(globalAttribute => {
|
||||
@@ -53,6 +57,10 @@ export default function getAttributesFromExtensions(extensions: Extensions): Ext
|
||||
options: extension.options,
|
||||
}
|
||||
|
||||
if (!extension.config.addAttributes) {
|
||||
return
|
||||
}
|
||||
|
||||
const attributes = extension.config.addAttributes.bind(context)() as Attributes
|
||||
|
||||
Object
|
||||
|
||||
Reference in New Issue
Block a user