]> BookStack Code Mirror - bookstack/commit
Better standardised and fixes areas of image pasting
authorDan Brown <redacted>
Sat, 21 Dec 2019 15:48:03 +0000 (15:48 +0000)
committerDan Brown <redacted>
Sat, 21 Dec 2019 15:48:03 +0000 (15:48 +0000)
commita83a7f34f4d4c85bfb208eb1abfdd77743856680
tree9b1bf073c8d610306cbda39aceb2849eda52d3e8
parent5491bd62a2879f10c5bfe3ff06dced34780b7980
Better standardised and fixes areas of image pasting

- Extracted logic to get images from paste/drop event into own file to
align usage in both events for both editors.
- Fixed non-ability to drag+drop into WYSIWYG editor.
- Updated check for table data to look for table specific rich-text
instead of just any text since some the old check was too general and
was preventing some legitimate image paste events.

Tested on Chrome and FireFox on Ubuntu.
Attempted to test on Safari via browserstack but environment was
unreliable and could not access folders to test drag/drop of files.

Relates to #1651 and #1697
resources/js/components/markdown-editor.js
resources/js/components/wysiwyg-editor.js
resources/js/services/clipboard.js [new file with mode: 0644]