Skip to content
Snippets Groups Projects
Commit b5d111e7 authored by chris's avatar chris
Browse files

keep paragraph change in result div

parent 913e0caf
No related branches found
No related tags found
1 merge request!493Fix ai
...@@ -87,7 +87,8 @@ const ResultText = styled.div` ...@@ -87,7 +87,8 @@ const ResultText = styled.div`
font-family: Roboto, sans-serif; font-family: Roboto, sans-serif;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
line-height: 22px; line-height: 19px;
white-space: pre-line;
word-wrap: break-word; word-wrap: break-word;
`; `;
...@@ -149,6 +150,7 @@ const AskAIOverlay = ({ setPosition, position, config }) => { ...@@ -149,6 +150,7 @@ const AskAIOverlay = ({ setPosition, position, config }) => {
try { try {
const response = await AskAiContentTransformation(combinedInput); const response = await AskAiContentTransformation(combinedInput);
console.log(response);
setResult(response); setResult(response);
setIsSubmitted(true); setIsSubmitted(true);
} catch (error) { } catch (error) {
...@@ -195,7 +197,7 @@ const AskAIOverlay = ({ setPosition, position, config }) => { ...@@ -195,7 +197,7 @@ const AskAIOverlay = ({ setPosition, position, config }) => {
{isSubmitted && ( {isSubmitted && (
<> <>
<ResultDiv> <ResultDiv>
<ResultText>{result}</ResultText> <ResultText dangerouslySetInnerHTML={{ __html: result }} />
</ResultDiv> </ResultDiv>
<ActionSection> <ActionSection>
<ActionButton onClick={handleReplaceText}> <ActionButton onClick={handleReplaceText}>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment