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: Code block support in PDF & DOCX exporters #1367

Merged
merged 5 commits into from
Jan 17, 2025

Conversation

areknawo
Copy link
Collaborator

  • Support for code block in PDF & DOCX exporters as a separate block with a monospace font;
  • Use Geist Mono font for code in PDF & DOCX exports;
  • Update examples for PDF & DOCX exporters to include code blocks;

@areknawo areknawo requested a review from YousefED January 13, 2025 17:18
Copy link

vercel bot commented Jan 13, 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 11:27am
blocknote-website ✅ Ready (Inspect) Visit Preview Jan 17, 2025 11:27am

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! Maybe make the default colors same as codeblock in light mode, instead of gray? (i.e.: dark bg + light text)

image

// text: block..type + " not implemented",
// }),
// ],
run: {
Copy link
Collaborator

Choose a reason for hiding this comment

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

it might be nicer to define this style externally (in styles.xml). Optional if you want to do this for this PR, but it's good to know the file exists and how it works when you start working on other exporter related PRs

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moved everything except shading - it seems to apply differently from <w:shd/> in styles.xml (doesn't result in uniform background). I might be missing something here though, so let me know if you have any insight into that

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!

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