File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed
src/features/ui/chat/chat-message-area Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -103,15 +103,7 @@ export const ChatMessageArea = (props: {
103103 </ div >
104104 < div className = "flex flex-col gap-2 flex-1 px-10" >
105105 < div className = "prose prose-slate dark:prose-invert whitespace-break-spaces prose-p:leading-relaxed prose-pre:p-0 max-w-none" >
106- { props . children ;
107- const parser = new DOMParser ( ) ;
108- const htmlText = `<div><a href="#some-url">Url link</a></div>` ;
109- let content = parser . parseFromString ( htmlText , "text/html" ) ;
110- const anchors = content . getElementsByTagName ( 'a' ) ;
111- Array . from ( anchors ) . forEach ( a => {
112- a . setAttribute ( "target" , "_blank" ) ;
113- } )
114- console . log ( content . body . innerHTML ) ; // Here it is your new string }
106+ { props . children }
115107 </ div >
116108 </ div >
117109 </ div >
You can’t perform that action at this time.
0 commit comments