Hi,
Is it possible to have a feature in which you can switch between Print and Weblayouts with the RichTextEditor as per the DocumentEditor. ?
Regards,
Sam
Hi Salvatore Cannone,
No, the Rich Text Editor does not support web layout like the Document Editor, and it is not feasible since it is a simple WYSIWYG editor. By default, the Rich Text Editor has a print layout. Please check out the following demo link and documentation.
Demo: https://ej2.syncfusion.com/demos/#/material3/rich-text-editor/tools.html
Documentation: https://ej2.syncfusion.com/documentation/rich-text-editor/getting-started
Regards,
Vinothkumar
Hi Vinothkumar,
Ok, that's a shame there are three other richtexteditors that do support this type of feature .
https://dhtmlx.com/docs/products/dhtmlxRichText/ Document and Classic Mode
https://froala.com/wysiwyg-editor/examples/document-ready/ Document Ready
https://ckeditor.com/export-to-pdf-word/#pagination Pagination
It would be nice to see this feature in the product.
Hi Salvatore Cannone,
Thank you for sharing that information.
Query 1 : “Document Ready”
We want to let you know that we have "Print" items in the toolbarSettings property to print the Rich Text Editor content, and we have also achieved downloaded the PDF on the toolbar by using the custom toolbar. When we click the toolbar "PDF download" button, we used the external library to process the Rich Text Editor content to PDF. Please see the attached sample for your reference.
var editor = new ej.richtexteditor.RichTextEditor({ created: onCreate }); editor.appendTo('#ej2InPlace'); function onCreate() { var customBtn = editor.element.querySelector('#custom_tbar'); customBtn.addEventListener('click', function () { var element = document.querySelector('.e-rte-content'); var opt = { margin: 5, filename: 'rte.pdf' }; html2pdf().from(element).set(opt).save(); html2pdf(element, opt); }); } |
Screenshot
Documentation : https://ej2.syncfusion.com/javascript/documentation/rich-text-editor/toolbar#custom-tool
Query 2 : “Pagination”
Currently, we don’t have support for your requirement. We have already logged the requested requirement as a feature on our end. This support will be included in any one of our upcoming releases. Please track the status of the reported issue using the below Feedback.
Feedback Link: https://www.syncfusion.com/feedback/20498/pagination-support-for-the-rich-text-editor
Regards,
Vinothkumar