Skip to content

Commit f3a086b

Browse files
vladislavkeblyshihor-romaniuk
authored andcommitted
feat: feat: images sizes and blockquote styles
1 parent 715cc60 commit f3a086b

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

src/App.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,22 @@ $input-focus-box-shadow: var(--pgn-elevation-form-input-base); // hack to get up
4646
right: 1rem !important;
4747
}
4848
}
49+
4950
.confirm-modal .pgn__modal-body {
5051
overflow: hidden;
5152
}
53+
54+
.pgn__modal-body-content {
55+
& img {
56+
object-fit: contain;
57+
max-width: 100%;
58+
height: auto;
59+
}
60+
61+
& blockquote > p {
62+
border-left: 2px solid $gray-200;
63+
margin-left: 1.5rem;
64+
padding-left: 1rem;
65+
}
66+
}
5267
}

src/containers/ResponseDisplay/index.jsx

Lines changed: 8 additions & 1 deletion
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)