Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

behnampmdg3's avatar

Need help with CKeditor and jquery draggable, sortable. Should I give up on it?

Hello;

A couple days ago Cronix helped me start a nice drag, drop sort page editor.

Looks really good and working except now I want to add CKEditor to it but for some reason, it crashes, loses the text and all sort of issues.

I am 99% sure this has things to do with sortable and draggable.

Locally i get

ckeditor.js:450 Uncaught TypeError: Cannot read property 'getSelection' of undefined

I thought of adding it to Codepen, but since there are ajax and database updates it doesn't work.

DEMO:

DRAG the RED box with H icon => https://webmoosh.com/edit-template/1/112

Drop it between the rows. it builds the editor.

Any thoughts?

Thank you

0 likes
2 replies
Cronix's avatar

Please use https://jsfiddle.net/ or https://codepen.io/# instead of whatever that is from the url you posted. That way we can see the html, javascript and css separate and actually be able to interact with it. It's soooo much easier than trying to troubleshoot it on an actual website full of other code/stuff that is completely unrelated to the specific problem. Plus you can edit right there and rerun it.

behnampmdg3's avatar

Hey man;

I thought of adding it to Codepen like you mentioned last time, but since there are ajax and database updates it doesn't work.

it has ajaxs updates that are not possible with codepen.

Any suggestions?

Please or to participate in this conversation.