Skip to content

Commit 3bf6415

Browse files
vladislavkeblyshihor-romaniuk
authored andcommitted
feat: feat: images sizes and blockquote styles
1 parent 7aee856 commit 3bf6415

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

src/App.scss

+15
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,22 @@ $input-focus-box-shadow: $input-box-shadow; // hack to get upgrade to paragon 4.
4949
right: 1rem !important;
5050
}
5151
}
52+
5253
.confirm-modal .pgn__modal-body {
5354
overflow: hidden;
5455
}
56+
57+
.pgn__modal-body-content {
58+
& img {
59+
object-fit: contain;
60+
max-width: 100%;
61+
height: auto;
62+
}
63+
64+
& blockquote > p {
65+
border-left: 2px solid $gray-200;
66+
margin-left: 1.5rem;
67+
padding-left: 1rem;
68+
}
69+
}
5570
}

src/containers/ResponseDisplay/index.jsx

+8-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import parse from 'html-react-parser';
1111
import { selectors } from 'data/redux';
1212
import { fileUploadResponseOptions } from 'data/services/lms/constants';
1313

14+
import { getConfig } from '@edx/frontend-platform';
1415
import SubmissionFiles from './SubmissionFiles';
1516
import PreviewDisplay from './PreviewDisplay';
1617

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

2829
get textContents() {
29-
return this.props.response.text.map(text => parse(this.purify.sanitize(text)));
30+
const { text } = this.props.response;
31+
32+
const formattedText = text
33+
.map((item) => item.replaceAll(/\.\.\/asset/g, `${getConfig().LMS_BASE_URL}/asset`))
34+
.map((item) => parse(this.purify.sanitize(item)));
35+
36+
return formattedText;
3037
}
3138

3239
get submittedFiles() {

0 commit comments

Comments
 (0)