enh: rich text input toggle option

This commit is contained in:
Timothy J. Baek
2024-10-25 21:31:18 -07:00
parent 8b61b39c75
commit adede5480d
4 changed files with 262 additions and 50 deletions
+7 -2
View File
@@ -58,13 +58,18 @@
await tick();
const chatInputContainerElement = document.getElementById('chat-input-container');
const chatInputElement = document.getElementById('chat-input');
if (chatInputContainerElement) {
chatInputContainerElement.style.height = '';
chatInputContainerElement.style.height =
Math.min(chatInputContainerElement.scrollHeight, 200) + 'px';
}
const chatInputElement = document.getElementById('chat-input');
chatInputElement?.focus();
await tick();
if (chatInputElement) {
chatInputElement.focus();
chatInputElement.dispatchEvent(new Event('input'));
}
await tick();