implement basic parseHTML for global attributes

This commit is contained in:
Philipp Kühn
2020-10-23 22:55:48 +02:00
parent 4bff000751
commit 56df3bd392
4 changed files with 35 additions and 11 deletions

View File

@@ -21,6 +21,9 @@ const TextAlign = createExtension({
renderHTML: attributes => ({
style: `text-align: ${attributes.textAlign}`,
}),
parseHTML: node => ({
textAlign: node.style.textAlign,
}),
},
},
},