merge attributes
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { Node, Mark } from 'prosemirror-model'
|
||||
import { ExtensionAttribute } from '../types'
|
||||
import mergeAttributes from './mergeAttributes'
|
||||
|
||||
export default function getRenderedAttributes(nodeOrMark: Node | Mark, extensionAttributes: ExtensionAttribute[]): { [key: string]: any } {
|
||||
return extensionAttributes
|
||||
@@ -9,10 +10,6 @@ export default function getRenderedAttributes(nodeOrMark: Node | Mark, extension
|
||||
return item.attribute.renderHTML(nodeOrMark.attrs)
|
||||
})
|
||||
.reduce((attributes, attribute) => {
|
||||
// TODO: add support for "class" and "style" merge
|
||||
return {
|
||||
...attributes,
|
||||
...attribute,
|
||||
}
|
||||
return mergeAttributes(attributes, attribute)
|
||||
}, {})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user