mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-24 03:39:01 +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
|
return Object.fromEntries(nodeExtensions
|
||||||
.filter(extension => !!getExtensionField(extension, 'addNodeView'))
|
.filter(extension => !!getExtensionField(extension, 'addNodeView'))
|
||||||
.map(extension => {
|
.map(extension => {
|
||||||
const name = getExtensionField<NodeConfig['name']>(extension, 'name')
|
const extensionAttributes = this.attributes.filter(attribute => attribute.type === extension.name)
|
||||||
const extensionAttributes = this.attributes.filter(attribute => attribute.type === name)
|
|
||||||
const context = {
|
const context = {
|
||||||
options: extension.options,
|
options: extension.options,
|
||||||
editor,
|
editor,
|
||||||
|
@ -84,7 +84,7 @@ export default function getAttributesFromExtensions(extensions: Extensions): Ext
|
|||||||
.entries(attributes)
|
.entries(attributes)
|
||||||
.forEach(([name, attribute]) => {
|
.forEach(([name, attribute]) => {
|
||||||
extensionAttributes.push({
|
extensionAttributes.push({
|
||||||
type: getExtensionField(extension, 'name'),
|
type: extension.name,
|
||||||
name,
|
name,
|
||||||
attribute: {
|
attribute: {
|
||||||
...defaultAttribute,
|
...defaultAttribute,
|
||||||
|
Loading…
Reference in New Issue
Block a user