paste in DocumentEditorContainerComponent is not working

when try control+v for pasting from system clipboard.sent a post request.


 ajax-helper.js:55

 POST http://localhost:3000/ead/definition/form/SystemClipboard 404 (Not Found)

XmlHttpRequestHandler.sendRequest @ ajax-helper.js:55

XmlHttpRequestHandler.send @ ajax-helper.js:41

Editor.pasteAjax @ editor.js:4143

Editor.pasteInternal @ editor.js:4072

DocumentHelper.onPaste @ viewer.js:472

react_devtools_backend.js:4026 404 'Not Found'

overrideMethod @ react_devtools_backend.js:4026

Editor.onPasteFailure @ editor.js:4168

XmlHttpRequestHandler.failureHandler @ ajax-helper.js:100

XmlHttpRequestHandler.stateChange @ ajax-helper.js:81

xmlHttpRequest.onreadystatechange @ ajax-helper.js:30

XMLHttpRequest.send (async)

XmlHttpRequestHandler.sendRequest @ ajax-helper.js:55

XmlHttpRequestHandler.send @ ajax-helper.js:41

Editor.pasteAjax @ editor.js:4143

Editor.pasteInternal @ editor.js:4072

DocumentHelper.onPaste @ viewer.js:472


3 Replies

SM Suriya Murugan Syncfusion Team August 2, 2022 03:25 AM UTC

Hi Umut,


Can you please confirm have you included "SystemClipboard" API in your controller files?


Please check below documentation for code snippet:

https://ej2.syncfusion.com/documentation/document-editor/web-services/core/#paste-with-formatting


DocumentEditor depends on server side interaction for below listed operations can be written in ASP.NET Core or MVC or java.

  • Import Word Document
  • Paste with formatting
  • Restrict Editing
  • Spell Check
  • Save as file formats other than SFDT and DOCX

Documentation link: https://ej2.syncfusion.com/react/documentation/document-editor/web-services/ 


Please let us know if you still facing issues.


Regards,

Suriya M.



MB Mohit Bohra replied to Suriya Murugan April 13, 2023 12:05 PM UTC

i have followed all the above mentioned step but still facing the error , the call to systemClipboard is taking place with status of 302 found but after that an error is coming . Please help me out with the issue it is production critical !!!!

EX::




KM Kavitha Muralitharan Syncfusion Team April 17, 2023 11:59 AM UTC

Hi Umut,



We suspect that the error may occur due to either the cross-origin policy or authentication custom headers.


If you are using the cross-origin policy, please refer to example from GitHub and set them serviceUrl.

If your running web service URL is http://localhost:62869/, set the service URL like below:

container.serviceUrl = "http://localhost:62869/api/documenteditor/";


UG Link: https://ej2.syncfusion.com/documentation/document-editor/web-services/#supported-platforms-for-server-side-dependencies

If you are using authentication custom headers, please refer to the Documentation API reference below.

UG Link: https://ej2.syncfusion.com/react/documentation/api/document-editor/#headers



Regards,

Kavitha M



Loader.
Up arrow icon