mirror of https://github.com/go-gitea/gitea.git
update previous adjustment
parent
9b6d740f0a
commit
f32b9635ad
|
|
@ -378,10 +378,9 @@ export class ComboMarkdownEditor {
|
|||
|
||||
if (this.easyMDE) {
|
||||
this.easyMDE.value(v);
|
||||
} else {
|
||||
this.textarea.value = v;
|
||||
}
|
||||
// Always update the underlying textarea so consumers remain in sync.
|
||||
this.textarea.value = v;
|
||||
this.textarea.dispatchEvent(new Event('input', {bubbles: true}));
|
||||
this.textareaAutosize?.resizeToFit();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -106,17 +106,7 @@ function initGenerateReleaseNotes() {
|
|||
|
||||
function applyGeneratedReleaseNotes(content: string) {
|
||||
const editorContainer = document.querySelector<HTMLElement>('.combo-markdown-editor');
|
||||
const textarea = editorContainer?.querySelector<HTMLTextAreaElement>('textarea[name="content"]') ??
|
||||
document.querySelector<HTMLTextAreaElement>('textarea[name="content"]');
|
||||
|
||||
const comboEditor = getComboMarkdownEditor(editorContainer);
|
||||
if (comboEditor) {
|
||||
comboEditor.value(content);
|
||||
return;
|
||||
}
|
||||
|
||||
if (textarea) {
|
||||
textarea.value = content;
|
||||
textarea.dispatchEvent(new Event('input', {bubbles: true}));
|
||||
}
|
||||
comboEditor.value(content);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue