Skip to content

Commit 17a58e5

Browse files
authored
fix(BaseSchema): get paragraph attributes from token attributes (#875)
1 parent d392a2e commit 17a58e5

File tree

1 file changed

+9
-1
lines changed
  • src/extensions/base/BaseSchema/BaseSchemaSpecs

1 file changed

+9
-1
lines changed

src/extensions/base/BaseSchema/BaseSchemaSpecs/index.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,15 @@ export const BaseSchemaSpecs: ExtensionAuto<BaseSchemaSpecsOptions> = (builder,
6363
}
6464
: undefined,
6565
},
66-
fromMd: {tokenSpec: {name: BaseNode.Paragraph, type: 'block'}},
66+
fromMd: {
67+
tokenSpec: {
68+
name: BaseNode.Paragraph,
69+
type: 'block',
70+
getAttrs(token) {
71+
return Object.fromEntries(token.attrs || []);
72+
},
73+
},
74+
},
6775
toMd: (state, node, parent) => {
6876
/*
6977
An empty line is added only if there is some content in the parent element.

0 commit comments

Comments
 (0)