Skip to content

Commit 8225736

Browse files
authored
fix: set a default for blocksToFullHTML #2100 (#2101)
1 parent fe8fb9f commit 8225736

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/core/src/editor/BlockNoteEditor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1482,7 +1482,7 @@ export class BlockNoteEditor<
14821482
* @returns The blocks, serialized as an HTML string.
14831483
*/
14841484
public blocksToFullHTML(
1485-
blocks: PartialBlock<BSchema, ISchema, SSchema>[],
1485+
blocks: PartialBlock<BSchema, ISchema, SSchema>[] = this.document,
14861486
): string {
14871487
return this._exportManager.blocksToFullHTML(blocks);
14881488
}

packages/core/src/editor/managers/ExportManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export class ExportManager<
5454
* @returns The blocks, serialized as an HTML string.
5555
*/
5656
public blocksToFullHTML(
57-
blocks: PartialBlock<BSchema, ISchema, SSchema>[],
57+
blocks: PartialBlock<BSchema, ISchema, SSchema>[] = this.editor.document,
5858
): string {
5959
const exporter = createInternalHTMLSerializer(
6060
this.editor.pmSchema,

0 commit comments

Comments
 (0)