Skip to content

Commit 6f5eb0d

Browse files
vladislavkeblyshihor-romaniuk
authored andcommitted
feat: feat: images sizes and blockquote styles
1 parent 09dbdb1 commit 6f5eb0d

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
@@ -48,7 +48,22 @@ $input-focus-box-shadow: $input-box-shadow; // hack to get upgrade to paragon 4.
4848
right: 1rem !important;
4949
}
5050
}
51+
5152
.confirm-modal .pgn__modal-body {
5253
overflow: hidden;
5354
}
55+
56+
.pgn__modal-body-content {
57+
& img {
58+
object-fit: contain;
59+
max-width: 100%;
60+
height: auto;
61+
}
62+
63+
& blockquote > p {
64+
border-left: 2px solid $gray-200;
65+
margin-left: 1.5rem;
66+
padding-left: 1rem;
67+
}
68+
}
5469
}

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)