Function Component of Document Editor example

I want ->

1 - Load default data

2 - log the changed data in text editor on console

using Functional component of DocumentEditor.



5 Replies 1 reply marked as answer

SM Suriya Murugan Syncfusion Team September 16, 2022 03:46 AM UTC

Hi Salokya,


We will update details shortly.


Regards,

Suriya M.



SM Suriya Murugan Syncfusion Team September 20, 2022 01:49 PM UTC

Hi Salokya,


Apologies for the delay.


We will update sample by September 21, 2022, without further delay.



Regards,

Suriya M.



SA Salokya replied to Suriya Murugan September 21, 2022 05:28 AM UTC

No issues, take your time and if possible please add how load/save datafromDocumentEditor to database using Functional component. If possible please share Axios/Fetch api example as I am 

using React.js



SM Suriya Murugan Syncfusion Team September 23, 2022 01:11 PM UTC

Hi Salokya,


## Load default data

We have prepared the same for your requirement. Loaded default SFDT in created event.

//You can access container instance by using docEditor variable  

https://stackblitz.com/edit/react-n1rnfi-vgf5qk?file=index.js

Documentation link:

https://ej2.syncfusion.com/react/documentation/document-editor/how-to/open-default-document/#opening-a-default-document-in-documenteditorcontainer

##  log the changed data in text editor on console

The contentChange event will be triggered when content change in the document. But we are not able to identify the changed data.


## please add how load/save datafromDocumentEditor to database using Functional component


We will update details by September 26, 2022.


Regards,

Suriya M.












SM Suriya Murugan Syncfusion Team September 27, 2022 04:04 AM UTC

Hi Salokya,


Please refer below documentation to load/save file from server:


https://www.syncfusion.com/kb/13306/how-to-load-save-file-in-web-server-for-asp-net-core

By referring this, you can achieve your requirement.


Regards,

Suriya M.




Marked as answer
Loader.
Up arrow icon