Merge pull request #183 from danny-avila/fix-edit-wrap

add whitespace-pre-wrap to the message editor to preserve line breaks
This commit is contained in:
Danny Avila 2023-04-21 23:13:42 -04:00 committed by GitHub
commit e02e6152ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -150,9 +150,8 @@ export default function Message({
) : edit ? ( ) : edit ? (
<div className="flex min-h-[20px] flex-grow flex-col items-start gap-4 "> <div className="flex min-h-[20px] flex-grow flex-col items-start gap-4 ">
{/* <div className={`${blinker ? 'result-streaming' : ''} markdown prose dark:prose-invert light w-full break-words`}> */} {/* <div className={`${blinker ? 'result-streaming' : ''} markdown prose dark:prose-invert light w-full break-words`}> */}
<div <div
className="markdown prose dark:prose-invert light w-full break-words border-none focus:outline-none" className="markdown prose dark:prose-invert light w-full whitespace-pre-wrap break-words border-none focus:outline-none"
contentEditable={true} contentEditable={true}
ref={textEditor} ref={textEditor}
suppressContentEditableWarning={true} suppressContentEditableWarning={true}