Skip to content

Conversation

dakshesh14
Copy link

Purpose

Added an option for users to upload and preview PDF files in the editor. This PR addresses #348. It is a duplicate of PR-795 because I couldn't reopen the PR as I lost my fork.

pdf-embed.webm
mobile-view-demo

Proposal

Added the option for users to upload and preview PDF files within the editor.

Description:

  • When a user types '/' on their keyboard, they can find an option called "PDF," which allows them to upload or embed PDF files.

Changed content disposition as inline so that pdf is not downloaded automatically.

Signed-off-by: dakshesh14 <[email protected]>
Added pdf block in the editor.

Signed-off-by: dakshesh14 <[email protected]>
Moved drag handler logic to a hook to make component dumb.

Signed-off-by: dakshesh14 <[email protected]>
Made docx and pdf export mapper for the newly added pdf block

Signed-off-by: dakshesh14 <[email protected]>
@dakshesh14
Copy link
Author

Hey team,

This is a duplicate of PR-795, since I couldn’t reopen the original after losing the fork.

I’d appreciate the maintainers’ input on a few points where the implementation could be improved:

  • PDF preview: Should we use react-pdf or another library for better compatibility and user experience?
  • Nginx config change: The current approach requires modifying Nginx, which might not be acceptable. I’m open to alternatives.
  • Access to non-public PDFs: Currently, non-public PDFs can’t be previewed/downloaded. A solution here might also address point (2).

Looking forward to your feedback and happy to adjust the implementation accordingly.

Added pr number in changelog

Signed-off-by: dakshesh14 <[email protected]>
@virgile-dev
Copy link
Collaborator

Hey @dakshesh14 !
great to see you were able to give it a second shot. @AntoLC is on vacation right now.
Once he is back he’ll able to review your PR.
sorry for the delay and thanks for your contribution

@dakshesh14
Copy link
Author

Hey @virgile-dev, happy to be back! No problem at all - I’ll wait for @AntoLC to return and review the PR. Thanks for keeping me posted.

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.

2 participants