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
The file block has this support for inline embeds/previews for PDFs and other file types. Doesn't really seem to work in the editor, and on the frontend support is limited.
It could be interesting to expand support by using PDF.js for viewing PDF files.
Would need to see how lightweight it is etc. But the viewer could possibly be lazy loaded and first display the poster image.
Would be interesting to query HTTP Archive for wp-block-file__embed usage. Maybe add to https://github.com/felixarntz/custom-metrics/blob/main/dist/cms.js? Though seems like these embeds are rather lightweight as it just requires loading the PDF file and nothing more. So adding PDF.js on top of that would be heavier.
Notes from the doc:
The viewer is built on the display layer and is the UI for the PDF viewer in Firefox and the other browser extensions within the project. It can be a good starting point for building your own viewer. However, we do ask if you plan to embed the viewer in your own site, that it not just be an unmodified version. Please re-skin it or build upon it.
The text was updated successfully, but these errors were encountered:
The file block has this support for inline embeds/previews for PDFs and other file types. Doesn't really seem to work in the editor, and on the frontend support is limited.
It could be interesting to expand support by using PDF.js for viewing PDF files.
Would need to see how lightweight it is etc. But the viewer could possibly be lazy loaded and first display the poster image.
Would be interesting to query HTTP Archive for
wp-block-file__embed
usage. Maybe add to https://github.com/felixarntz/custom-metrics/blob/main/dist/cms.js? Though seems like these embeds are rather lightweight as it just requires loading the PDF file and nothing more. So adding PDF.js on top of that would be heavier.Notes from the doc:
The text was updated successfully, but these errors were encountered: