fix: textarea input new line issue

This commit is contained in:
Timothy Jaeryang Baek 2024-11-23 22:58:09 -08:00
parent d3acb5cbaa
commit 9ff580b8ca

View File

@ -2309,7 +2309,11 @@
on:submit={async (e) => {
if (e.detail) {
await tick();
submitPrompt(e.detail.replaceAll('\n\n', '\n'));
submitPrompt(
($settings?.richTextInput ?? true)
? e.detail.replaceAll('\n\n', '\n')
: e.detail
);
}
}}
/>
@ -2346,7 +2350,11 @@
on:submit={async (e) => {
if (e.detail) {
await tick();
submitPrompt(e.detail.replaceAll('\n\n', '\n'));
submitPrompt(
($settings?.richTextInput ?? true)
? e.detail.replaceAll('\n\n', '\n')
: e.detail
);
}
}}
/>