feat: parseHTML for attributes should return the value instead of an object now, fix #1863

This commit is contained in:
Philipp Kühn
2021-09-08 23:53:44 +02:00
parent d3285e9308
commit 8a3b47a529
17 changed files with 38 additions and 92 deletions

View File

@@ -48,11 +48,7 @@ export const Highlight = Mark.create<HighlightOptions>({
return {
color: {
default: null,
parseHTML: element => {
return {
color: element.getAttribute('data-color') || element.style.backgroundColor,
}
},
parseHTML: element => element.getAttribute('data-color') || element.style.backgroundColor,
renderHTML: attributes => {
if (!attributes.color) {
return {}