Improve attachment upload methods (#30513)

* Use dropzone to handle file uploading for all cases, including pasting
and dragging
* Merge duplicate code, use consistent behavior for link generating

Close #20130

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Tyrone Yeh 2024-06-27 17:31:49 +08:00 committed by GitHub
parent 00fc29aee1
commit 9bc5552c11
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 169 additions and 97 deletions

View file

@ -1,4 +1,6 @@
import {triggerEditorContentChanged} from './Paste.js';
export function triggerEditorContentChanged(target) {
target.dispatchEvent(new CustomEvent('ce-editor-content-changed', {bubbles: true}));
}
function handleIndentSelection(textarea, e) {
const selStart = textarea.selectionStart;