GetmeUK / ContentTools

A JS library for building WYSIWYG editors for HTML content.
http://getcontenttools.com
MIT License
3.95k stars 395 forks source link

Touch drag-and-drop support for toolbox #439

Open cubiclesoft opened 6 years ago

cubiclesoft commented 6 years ago

A small set of changes that adds drag-and-drop support for touch devices on the floating toolbox.

Demo:

https://cubiclesoft.com/Unrelated/ContentToolsDragTest/sandbox/

cubiclesoft commented 6 years ago

This PR may resolve closed issue #382.

cubiclesoft commented 6 years ago

As far as I know, CoffeeScript doesn't and won't ever support the ternary operator. It's got if-then-else and unless. Attempting to use the ternary operator in CoffeeScript results in a transpiler error. Sometimes you can write Javascript or something close enough to it and sometimes you can't.

https://stackoverflow.com/questions/10146080/ternary-operation-in-coffeescript

Also, I attempted to stick with the coding style of the surrounding code in this repository.