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
test node conversions
  • Loading branch information
jkcs committed Jun 4, 2024
commit 2399d24928f17198a94796b8b1ebc35c68a88478
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="customParagraph"><p class="bn-inline-content custom-paragraph" data-editable="">Custom Paragraph</p></div></div></div></div>
<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="customParagraph"><p class="bn-inline-content custom-paragraph" data-editable="">Custom Paragraph</p></div></div></div><div class="bn-block-outer" data-node-type="blockOuter" data-id="2"><div class="bn-block" data-node-type="blockContainer" data-id="2"><div class="bn-block-content" data-content-type="customParagraph"><p class="bn-inline-content custom-paragraph" data-editable="">Custom Paragraph with <br>multiple lines</p></div></div></div></div>
2 changes: 2 additions & 0 deletions packages/core/src/api/nodeConversions/nodeConversions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { PartialBlock } from "../../blocks/defaultBlocks";
import { customInlineContentTestCases } from "../testUtil/cases/customInlineContent";
import { customStylesTestCases } from "../testUtil/cases/customStyles";
import { defaultSchemaTestCases } from "../testUtil/cases/defaultSchema";
import { customBlocksTestCases } from "../testUtil/cases/customBlocks";
import {
addIdsToBlock,
partialBlockToBlockForTesting,
Expand Down Expand Up @@ -44,6 +45,7 @@ const testCases = [
defaultSchemaTestCases,
customStylesTestCases,
customInlineContentTestCases,
customBlocksTestCases,
];

describe("Test BlockNote-Prosemirror conversion", () => {
Expand Down
4 changes: 4 additions & 0 deletions packages/core/src/api/testUtil/cases/customBlocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ export const customBlocksTestCases: EditorTestCases<
type: "customParagraph",
content: "Custom Paragraph",
},
{
type: "customParagraph",
content: "Custom Paragraph with \nmultiple lines",
},
],
},
{
Expand Down