add new syntax to all extensions

This commit is contained in:
Philipp Kühn
2020-10-22 12:34:49 +02:00
parent e442b5a8fe
commit 79172753ef
22 changed files with 873 additions and 703 deletions

View File

@@ -16,35 +16,35 @@ export default createNode({
content: 'inline*',
addGlobalAttributes() {
return [
{
types: ['paragraph'],
attributes: {
align: {
default: 'right',
renderHTML: attributes => ({
class: 'global',
style: `text-align: ${attributes.align}`,
}),
},
},
},
]
},
// addGlobalAttributes() {
// return [
// {
// types: ['paragraph'],
// attributes: {
// align: {
// default: 'right',
// renderHTML: attributes => ({
// class: 'global',
// style: `text-align: ${attributes.align}`,
// }),
// },
// },
// },
// ]
// },
addAttributes() {
return {
id: {
default: '123',
rendered: true,
renderHTML: attributes => ({
class: `foo-${attributes.id}`,
id: 'foo',
}),
},
}
},
// addAttributes() {
// return {
// id: {
// default: '123',
// rendered: true,
// renderHTML: attributes => ({
// class: `foo-${attributes.id}`,
// id: 'foo',
// }),
// },
// }
// },
parseHTML() {
return [