Skip to content

Commit

Permalink
Merge pull request #949 from PintoGideon/Pacs-Preview-Fix
Browse files Browse the repository at this point in the history
Add a scroll to the text display and preserve carriage returns
  • Loading branch information
PintoGideon authored Aug 24, 2023
2 parents 1905020 + 76feee9 commit 6e81b7d
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions src/components/feed/Preview/displays/TextDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const TextDisplay: React.FunctionComponent<AllProps> = (props: AllProps) => {
"load",
() => {
//@ts-ignore
textDisplay.innerHTML = reader.result;
textDisplay.innerText = reader.result;
},
false
);
Expand All @@ -31,12 +31,22 @@ const TextDisplay: React.FunctionComponent<AllProps> = (props: AllProps) => {
<Fragment>
<div
style={{
fontFamily: "monospace",
fontSize: "1rem",
color: "white",
display: "block",
padding: "15px",
width: "100%",
height: "350px",
overflowY: "scroll",
}}
id="text-display"
></div>
>
<span
id="text-display"
style={{
fontFamily: "monospace",
fontSize: "1rem",
color: "white",
}}
></span>
</div>
</Fragment>
);
};
Expand Down

0 comments on commit 6e81b7d

Please sign in to comment.