We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How can i implement the save/export features with DocumentEditorContainer?

I got the demo for DocumentEditorContainer, how can i implement the save/export features showcased here with DocumentEditor: https://ej2.syncfusion.com/documentation/document-editor/export/


Regards,

David


1 Reply

SK Selvaprakash Karuppusamy Syncfusion Team April 4, 2023 08:49 AM UTC

Hi David,


Please refer to the below sample to export a document using the documentEditorContainer.

 Sample: https://stackblitz.com/edit/ctb4og?file=index.html,index.js 


The below code illustrates how to save a file in sfdt format using a documentEditorContainer.

 document.getElementById('sfdt').addEventListener('click', function () { container.documentEditor.save('sample', 'Sfdt'); }); 


The below code illustrates how to save a file in docx format using a documentEditorContainer.

document.getElementById('word').addEventListener('click', function () { container.documentEditor.save('sample', 'Docx'); });   


Regards,

Selvaprakash K


Loader.
Live Chat Icon For mobile
Up arrow icon