update previous adjustment

Dawid Góra 2025-11-19 09:55:11 +01:00 committed by Dawid Góra
parent 9b6d740f0a
commit f32b9635ad
2 changed files with 3 additions and 14 deletions

View File

@ -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();
}

View File

@ -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);
}