Create a new Froala plugin using this codepen: [login to view URL]
Your code should only use the Froala API framework and elements to create the plugin: [login to view URL], [login to view URL]
Create a new plugin to download Froala page contents as PDF using jsPDF. [login to view URL]
At present Froala uses the print plugin to "download as PDF" using the [login to view URL]() function. It uses a third party code base [login to view URL] to achieve this.
However [login to view URL] renders all content into an image, then places that image into a PDF. This means text is not selectable or searchable, and causes large file sizes.
html2pdf uses [login to view URL] in its dependencies. However, recent improvements in jsPDF mean that it should be possible to render straight into vector graphics. You should implement this with options to include:
- Margins (left, right, top, bottom)
- Page break selectors (e.g. ".page-break" class)
- Page orientation (landscape/portrait)