Skip to content

blocksToFullHTML documentation inconsistancy: no default argument #2100

@Chadys

Description

@Chadys

Describe the bug
The documentation for blocksToFullHTML says "The blocks to convert. If not provided, the entire document (all top-level blocks) is used.".
However, only blocksToHTMLLossy actually has its blocks param defaults to this.editor.document

This is a very simple fix, in BlockNote/packages/core/src/editor/managers/ExportManager.ts, change:

  public blocksToFullHTML(
-    blocks: PartialBlock<BSchema, ISchema, SSchema>[],
+    blocks: PartialBlock<BSchema, ISchema, SSchema>[] = this.editor.document,
  ): string {

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions