Skip to content

Commit

Permalink
feat: feat: images sizes and blockquote styles
Browse files Browse the repository at this point in the history
  • Loading branch information
vladislavkeblysh committed Jun 10, 2024
1 parent 64b57df commit c4a21e7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
15 changes: 15 additions & 0 deletions src/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,22 @@ $input-focus-box-shadow: $input-box-shadow; // hack to get upgrade to paragon 4.
right: 1rem !important;
}
}

.confirm-modal .pgn__modal-body {
overflow: hidden;
}

.pgn__modal-body-content {
& img {
object-fit: contain;
max-width: 100%;
height: auto;
}

& blockquote > p {
border-left: 2px solid $gray-200;
margin-left: 1.5rem;
padding-left: 1rem;
}
}
}
9 changes: 8 additions & 1 deletion src/containers/ResponseDisplay/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import parse from 'html-react-parser';
import { selectors } from 'data/redux';
import { fileUploadResponseOptions } from 'data/services/lms/constants';

import { getConfig } from '@edx/frontend-platform';
import SubmissionFiles from './SubmissionFiles';
import PreviewDisplay from './PreviewDisplay';

Expand All @@ -26,7 +27,13 @@ export class ResponseDisplay extends React.Component {
}

get textContents() {
return this.props.response.text.map(text => parse(this.purify.sanitize(text)));
const { text } = this.props.response;

const formattedText = text
.map((item) => item.replaceAll(/\.\.\/asset/g, `${getConfig().LMS_BASE_URL}/asset`))
.map((item) => parse(this.purify.sanitize(item)));

return formattedText;
}

get submittedFiles() {
Expand Down

0 comments on commit c4a21e7

Please sign in to comment.