feat: parseHTML for attributes should return the value instead of an object now, fix #1863
This commit is contained in:
@@ -34,6 +34,7 @@ export const FontFamily = Extension.create<FontFamilyOptions>({
|
||||
attributes: {
|
||||
fontFamily: {
|
||||
default: null,
|
||||
parseHTML: element => element.style.fontFamily.replace(/['"]+/g, ''),
|
||||
renderHTML: attributes => {
|
||||
if (!attributes.fontFamily) {
|
||||
return {}
|
||||
@@ -43,9 +44,6 @@ export const FontFamily = Extension.create<FontFamilyOptions>({
|
||||
style: `font-family: ${attributes.fontFamily}`,
|
||||
}
|
||||
},
|
||||
parseHTML: element => ({
|
||||
fontFamily: element.style.fontFamily.replace(/['"]+/g, ''),
|
||||
}),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user