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

feat: Page break #1372

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

feat: Page break #1372

wants to merge 9 commits into from

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;

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

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.

3 participants