diff --git a/src/components/ChatInput/ChatInput.jsx b/src/components/ChatInput/ChatInput.jsx index 53afb9a3..8dfbd892 100644 --- a/src/components/ChatInput/ChatInput.jsx +++ b/src/components/ChatInput/ChatInput.jsx @@ -114,7 +114,7 @@ const labels = { const convertMentionsToHTMLAndPlainText = ({ suggestions, value }) => { const mentionsRegex = new RegExp(/@\[[^)]*\)/g); - let html = `

${value}

`; + let html = `

${value.replace(/\n/g, "
")}

`; // Replace newlines with
for HTML output let plainText = value; const allMentions = html.matchAll(mentionsRegex); @@ -140,7 +140,6 @@ const convertMentionsToHTMLAndPlainText = ({ suggestions, value }) => { return { html, plainText }; }; - export const ChatInput = forwardRef( ( {