Fixed issue with new nodes being callouts

This commit is contained in:
Dan Brown 2022-01-07 21:56:04 +00:00
parent 81dfe9c345
commit 47c3d4fc0f
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9

View File

@ -12,11 +12,11 @@ const nodeCallout = {
group: "block",
defining: true,
parseDOM: [
{tag: 'p.callout.info', attrs: {type: 'info'}},
{tag: 'p.callout.success', attrs: {type: 'success'}},
{tag: 'p.callout.danger', attrs: {type: 'danger'}},
{tag: 'p.callout.warning', attrs: {type: 'warning'}},
{tag: 'p.callout', attrs: {type: 'info'}},
{tag: 'p.callout.info', attrs: {type: 'info'}, priority: 75,},
{tag: 'p.callout.success', attrs: {type: 'success'}, priority: 75,},
{tag: 'p.callout.danger', attrs: {type: 'danger'}, priority: 75,},
{tag: 'p.callout.warning', attrs: {type: 'warning'}, priority: 75,},
{tag: 'p.callout', attrs: {type: 'info'}, priority: 75},
],
toDOM: function(node) {
const type = node.attrs.type || 'info';
@ -24,7 +24,7 @@ const nodeCallout = {
}
};
const customNodes = baseNodes.prepend({
const customNodes = baseNodes.append({
callout: nodeCallout,
});