mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-27 23:15:15 +08:00
fix attributes
This commit is contained in:
parent
08974c6332
commit
afe12f1603
@ -250,8 +250,7 @@ export default class ExtensionManager {
|
||||
return Object.fromEntries(nodeExtensions
|
||||
.filter(extension => !!getExtensionField(extension, 'addNodeView'))
|
||||
.map(extension => {
|
||||
const name = getExtensionField<NodeConfig['name']>(extension, 'name')
|
||||
const extensionAttributes = this.attributes.filter(attribute => attribute.type === name)
|
||||
const extensionAttributes = this.attributes.filter(attribute => attribute.type === extension.name)
|
||||
const context = {
|
||||
options: extension.options,
|
||||
editor,
|
||||
|
@ -84,7 +84,7 @@ export default function getAttributesFromExtensions(extensions: Extensions): Ext
|
||||
.entries(attributes)
|
||||
.forEach(([name, attribute]) => {
|
||||
extensionAttributes.push({
|
||||
type: getExtensionField(extension, 'name'),
|
||||
type: extension.name,
|
||||
name,
|
||||
attribute: {
|
||||
...defaultAttribute,
|
||||
|
Loading…
Reference in New Issue
Block a user