PRINT AND WEB LAYOUT

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


3 Replies

VY Vinothkumar Yuvaraj Syncfusion Team July 25, 2023 04:30 PM UTC

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



SC Salvatore Cannone replied to Vinothkumar Yuvaraj July 25, 2023 08:42 PM UTC

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.




VY Vinothkumar Yuvaraj Syncfusion Team July 27, 2023 10:29 AM UTC

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(elementopt);

    });

}


Screenshot


Documentation : https://ej2.syncfusion.com/javascript/documentation/rich-text-editor/toolbar#custom-tool


API Link : https://ej2.syncfusion.com/javascript/documentation/api/rich-text-editor/toolbarsettings/#toolbarsettings


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


Attachment: RTE__Export_as_PDF_example_75bfdd30_b0061fdf.zip

Loader.
Up arrow icon