]> BookStack Code Mirror - bookstack/commitdiff
Fixed issue with new nodes being callouts
authorDan Brown <redacted>
Fri, 7 Jan 2022 21:56:04 +0000 (21:56 +0000)
committerDan Brown <redacted>
Fri, 7 Jan 2022 21:56:04 +0000 (21:56 +0000)
resources/js/editor/schema.js

index 7c6a11cb9db1959b9a60612b282f3df1dab4cf54..53a08af1f38dbca6218b048e775556bf9ad6d16c 100644 (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,
 });