Currently I am using a document editor container to import a Word .docx from a server which is then displayed to the user for additional editing if required which is working great. However I am running into an issue when trying to paste text sometimes. If it's unformatted, plain text, it will paste in correctly. However if I try to paste from another source, be it Word doc, PDF, website, etc. it will attempt to call the service URL to paste with formatting via the server-side "SystemClipboard" endpoint.
Given the frontend and server-side security and how http calls are made, I'd ideally like to just paste the plain text without any formatting and limit further calls to the backend. To this end and looking at the documentation, I tried overriding the @keyDown event to just call the paste() method instead of hitting the service URL but then realized that the document editor container does not have any events bubbling up to listen to.
Is it possible to do one of the below:
Thank you for the above. I might be misunderstanding so I think an example might better illustrate what I'm encountering. And I understand about the programmatic access to the clipboard, I'll ignore that path for now.
I've attached some snippets:
Paste with formatting |
For converting the HTML/RTF format (received from system clipboard) to SFDT format content. Whereas plain text received from system clipboard will be pasted directly in client-side. |
Hello,
I ended up just adding the backend method per the Github link which works for my purposes.
Thank you for all your time on this. Feel free to close this or mark as complete.