You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Status quo of the PDF exporter class supports optional header and footer parameters that are applied to each exported page. It would be useful to include an additional parameter, prefix, that adds the specified context only to the beginning of the exported document.
Describe the solution you'd like
It would be useful to include an additional parameter, prefer, that adds the specified context only to the beginning of the exported document. I.e.:
Describe alternatives you've considered
A current workaround is to hand write one or several blocks that don't exist in the editor's document and concatenate them at the beginning of editor.document. A big drawback to this approach is that any content you want to prefix your document with needs to be part of your editor schema. Ideally, any React PDF-compatible markup would be supported.
Additional context
Happy to submit a PR but first I wanted to verify this matches the intent of the PDF export package.
Bonus
I'm a sponsor and would appreciate if you could look into this sooner than later 💖
Thanks for the feedback. A currently possible alternative is to subclass PDFExporter and override transformBlocks to first return a prefix <View> and then call super.transformBlocks().
Let me know how this goes! I agree this might not be very clear, so happy to accept a PR with a clearer API and / or documentation.
Is your feature request related to a problem? Please describe.
Status quo of the PDF exporter class supports optional
header
andfooter
parameters that are applied to each exported page. It would be useful to include an additional parameter,prefix
, that adds the specified context only to the beginning of the exported document.Describe the solution you'd like
It would be useful to include an additional parameter,
prefer
, that adds the specified context only to the beginning of the exported document. I.e.:Describe alternatives you've considered
A current workaround is to hand write one or several blocks that don't exist in the editor's document and concatenate them at the beginning of
editor.document
. A big drawback to this approach is that any content you want to prefix your document with needs to be part of your editor schema. Ideally, any React PDF-compatible markup would be supported.Additional context
Happy to submit a PR but first I wanted to verify this matches the intent of the PDF export package.
Bonus
(https://github.com/poggiolabs is a sponsor)
The text was updated successfully, but these errors were encountered: