Skip to content

Conversation

@areknawo
Copy link
Collaborator

This PR adds a page break block, dedicated for use with exporters to force page breaks in the documents.

  • Page break block represented as a dashed line;
  • Support for page break in PDF & DOCX exporters;

@vercel
Copy link

vercel bot commented Jan 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
blocknote ✅ Ready (Inspect) Visit Preview Jan 17, 2025 5:53pm
blocknote-website ✅ Ready (Inspect) Visit Preview Jan 17, 2025 5:53pm

Copy link
Collaborator

@YousefED YousefED left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Two things;

@areknawo
Copy link
Collaborator Author

areknawo commented Jan 17, 2025

  • Add CSS styles to support page break in printing;
  • Remove page break from the default schema;

# Conflicts:
#	packages/xl-docx-exporter/src/docx/__snapshots__/basic/document.xml
#	packages/xl-pdf-exporter/src/pdf/__snapshots__/example.jsx
#	packages/xl-pdf-exporter/src/pdf/__snapshots__/exampleWithHeaderAndFooter.jsx
#	shared/testDocument.ts
Copy link
Collaborator

@YousefED YousefED left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of things:

  • Can we align the drag handle better?
    Uploading image.png…
  • can we make the design a bit nicer? e.g. dotted line that's grey instead of black dashes? Maybe @areknawo can later also add "Page break" in the middle, but that's non blocking
  • The "Default schema" showcase actually doesn't show the default schema any more because it also adds multi-column + page break. We should update the example to reflect this
  • Maybe add the page break block to the pdf and docx examples? Because now there's no easy way to test this functionality easily

@matthewlipski matthewlipski merged commit 800a1f0 into main Jan 20, 2025
4 checks passed
@YousefED
Copy link
Collaborator

closes #1179

@YousefED YousefED mentioned this pull request Jan 21, 2025
@nperez0111 nperez0111 deleted the feat/page-break branch October 21, 2025 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants