Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simple latex block #818

Closed
wants to merge 14 commits into from
Prev Previous commit
Next Next commit
fix: command BNUpdateBlock
  • Loading branch information
jkcs committed Jun 4, 2024
commit 3d8e4eee8abcc6383d4aff5ef08c3c1425aa0c1d
6 changes: 5 additions & 1 deletion packages/core/src/pm-nodes/BlockContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,11 @@ export const BlockContainer = Node.create<{
if (block.content) {
if (typeof block.content === "string") {
// Adds a single text node with no marks to the content.
content = [state.schema.text(block.content)];
content = inlineContentToNodes(
[block.content],
state.schema,
this.options.editor.schema.styleSchema
);
} else if (Array.isArray(block.content)) {
// Adds a text node with the provided styles converted into marks to the content,
// for each InlineContent object.
Expand Down
Loading