Skip to content

Commit fc61e25

Browse files
committed
update comments
1 parent 05cd699 commit fc61e25

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/core/src/api/parsers/html/parseHTML.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ async function parseHTMLAndCompareSnapshots(
66
html: string,
77
snapshotName: string
88
) {
9+
// use a dynamic import because we want to access
10+
// __parseFromClipboard which is not exposed in types
911
const view: any = await import("prosemirror-view");
1012

1113
const editor = BlockNoteEditor.create();

packages/core/src/api/parsers/html/parseHTML.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@ export async function HTMLToBlocks<
1818
const htmlNode = nestedListsToBlockNoteStructure(html);
1919
const parser = DOMParser.fromSchema(pmSchema);
2020

21+
// Other approach might be to use
2122
// const doc = pmSchema.nodes["doc"].createAndFill()!;
23+
// and context: doc.resolve(3),
2224

2325
const parentNode = parser.parse(htmlNode, {
2426
topNode: pmSchema.nodes["blockGroup"].create(),
25-
// context: doc.resolve(3),
26-
}); //, { preserveWhitespace: "full" });
27+
});
28+
2729
const blocks: Block<BSchema, I, S>[] = [];
2830

2931
for (let i = 0; i < parentNode.childCount; i++) {

0 commit comments

Comments
 (0)