1
0
Fork 0
forked from forgejo/forgejo

Enable spellcheck for EasyMDE, use contenteditable mode (#19776)

Enable spellcheck for EasyMDE, use contenteditable mode.
Rewrite and refactor the ImagePaste code.
This commit is contained in:
wxiaoguang 2022-06-29 01:52:58 +08:00 committed by GitHub
parent cdd6371ad4
commit 76910f213f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 102 additions and 65 deletions

View file

@ -23,10 +23,9 @@ export function initRepoReleaseEditor() {
(async () => {
const $textarea = $editor.find('textarea');
await attachTribute($textarea.get(), {mentions: false, emoji: true});
const $files = $editor.parent().find('.files');
const easyMDE = await createCommentEasyMDE($textarea);
initCompMarkupContentPreviewTab($editor);
const dropzone = $editor.parent().find('.dropzone')[0];
initEasyMDEImagePaste(easyMDE, dropzone, $files);
const $dropzone = $editor.parent().find('.dropzone');
initEasyMDEImagePaste(easyMDE, $dropzone);
})();
}