mirror of
https://github.com/go-gitea/gitea.git
synced 2024-05-11 05:55:29 +00:00
Add EasyMDE support for release content editor (#14744)
* Add easyMDE(simpleMDE) support for release content editor Signed-off-by: a1012112796 <1012112796@qq.com>
This commit is contained in:
@ -1734,6 +1734,20 @@ async function initEditor() {
|
||||
});
|
||||
}
|
||||
|
||||
function initReleaseEditor() {
|
||||
const $editor = $('.repository.new.release .content-editor');
|
||||
if ($editor.length === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const $textarea = $editor.find('textarea');
|
||||
attachTribute($textarea.get(), {mentions: false, emoji: true});
|
||||
const $files = $editor.parent().find('.files');
|
||||
const $simplemde = setCommentSimpleMDE($textarea);
|
||||
initCommentPreviewTab($editor);
|
||||
initSimpleMDEImagePaste($simplemde, $files);
|
||||
}
|
||||
|
||||
function initOrganization() {
|
||||
if ($('.organization').length === 0) {
|
||||
return;
|
||||
@ -2653,6 +2667,7 @@ $(document).ready(async () => {
|
||||
initTableSort();
|
||||
initNotificationsTable();
|
||||
initPullRequestMergeInstruction();
|
||||
initReleaseEditor();
|
||||
|
||||
const routes = {
|
||||
'div.user.settings': initUserSettings,
|
||||
|
Reference in New Issue
Block a user