diff --git a/packages/module/src/MessageBar/MessageBar.tsx b/packages/module/src/MessageBar/MessageBar.tsx index 6d64b208..48d10c44 100644 --- a/packages/module/src/MessageBar/MessageBar.tsx +++ b/packages/module/src/MessageBar/MessageBar.tsx @@ -139,6 +139,15 @@ export const MessageBar: React.FunctionComponent = ({ attachMenuProps?.onAttachMenuToggleClick(); }; + const handleSpeechRecognition = (message) => { + setMessage(message); + const textarea = textareaRef.current; + if (textarea) { + textarea.focus(); + textarea.textContent = DOMPurify.sanitize(message); + } + }; + const renderButtons = () => { if (hasStopButton && handleStopButton) { return ( @@ -173,7 +182,7 @@ export const MessageBar: React.FunctionComponent = ({ @@ -216,7 +225,7 @@ export const MessageBar: React.FunctionComponent = ({ ref={textareaRef} onKeyDown={handleKeyDown} {...props} - > + />
{renderButtons()}