-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
problem in Using Drag And Drop in CkEditor5 Angular #331
Comments
Did you get this to work? |
Here's the demo of drag and drop into the editor. Below it, you will find example code:
|
Hi Witoso Have you actually tried to use the snippets (drag-drop.js/drag-drop.html) for CKEditor 5? I am sorry to say that it doesn't work. If you set it up as a pure javascript solution, like I guess you do on the demopage, all it does is to paste the text of the contact. Not like in the demo where it also paste the hcard widget. If you add it in an Angular solution you will get exactly what you see in the video added by [Majidmehrab]. Where you drag the hcard element over to the editor and nothing happens. It doesn't even copy the text (Alice, Hucleberry Finn etc). Kinda frustrating. I have asked support at CKEditor, about five times, if drag and drop actually works with Angular and the answer I get is: "meh, not sure but we belive it should work.". Then they just refer to the demo page like you did and the two files. An actual demo would be great. This one is just linking to drag-drop.js and drag-drop.html and says "good luck making this work". which doesn't do any good in an Angular solution. Btw, in the old CKEditor 4 everything works fine. But we want to use the CKEditor 5. |
Sorry for the experience so far!
Yes, this is actually the snippet that runs on this page.
Notice that the styles need to be added as well: Notice that our solution relies on the content of the clipboard: You need to check how Angular (not sure if it's some library or a default behavior) sets the content in the clipboard on the dragging. Drag is underneath almost copy/paste, it's possible that the editor is not recognizing the markup dropped, and is not accepting it. |
I am facing a similar issue, did we get any resolution for this? |
I use
CkEditor5
according to this link In the list of contacts, I want to apply drag and drop, but it does not work properly,It seems that this link does not properly explain how to call drag and drop
And I don't know what to do
Is there a specific format or data to be applied in the
e.dataTransfer.setData()
method to drag and drop?Does the
onDrop
event inCkEditor5
need a special command?please guide me
Thanks
For Example
index.html
index.ts
package.json
The text was updated successfully, but these errors were encountered: