Skip to content

✨(frontend) add pdf block to the editor #1293

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

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 <65905942+dakshesh14@users.noreply.github.com>
Added pdf block in the editor.

Signed-off-by: dakshesh14 <65905942+dakshesh14@users.noreply.github.com>
Moved drag handler logic to a hook to make component dumb.

Signed-off-by: dakshesh14 <65905942+dakshesh14@users.noreply.github.com>
Made docx and pdf export mapper for the newly added pdf block

Signed-off-by: dakshesh14 <65905942+dakshesh14@users.noreply.github.com>
@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 <65905942+dakshesh14@users.noreply.github.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant