Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
arsnova-click-v2-frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
ARSnova
arsnova-click-v2-frontend
Commits
4261b3e5
Commit
4261b3e5
authored
Nov 17, 2019
by
Christopher Fullarton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes markdown line break rendering. Fixes images in the voting on mobile devices
parent
baefa3b7
Pipeline
#33647
passed with stages
in 16 minutes and 19 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
3 deletions
+9
-3
voting-question.component.html
...low/voting/voting-question/voting-question.component.html
+2
-1
voting-question.component.scss
...low/voting/voting-question/voting-question.component.scss
+5
-0
root.module.ts
src/app/root.module.ts
+1
-1
custom-markdown.service.ts
src/app/service/custom-markdown/custom-markdown.service.ts
+1
-1
No files found.
src/app/quiz/quiz-flow/voting/voting-question/voting-question.component.html
View file @
4261b3e5
<p
[innerHTML]=
"sanitizeHTML(questionText)"
></p>
\ No newline at end of file
<p
[innerHTML]=
"sanitizeHTML(questionText)"
class=
"mb-0 overflow-hidden mathjax-container"
></p>
src/app/quiz/quiz-flow/voting/voting-question/voting-question.component.scss
View file @
4261b3e5
.mathjax-container
{
::ng-deep
svg
{
max-width
:
100%
;
}
}
src/app/root.module.ts
View file @
4261b3e5
...
...
@@ -86,7 +86,7 @@ const appRoutes: Routes = [
// function that returns `MarkedOptions` with renderer override
export
function
markedOptionsFactory
():
MarkedOptions
{
const
renderer
=
new
MarkedRenderer
();
renderer
.
paragraph
=
(
text
)
=>
`
${
text
}
\n
`
;
renderer
.
paragraph
=
(
text
)
=>
`
${
text
}
<br/>
`
;
return
{
renderer
:
renderer
,
...
...
src/app/service/custom-markdown/custom-markdown.service.ts
View file @
4261b3e5
...
...
@@ -70,7 +70,7 @@ export class CustomMarkdownService {
if
(
imgMatch
)
{
imgMatch
.
forEach
(
token
=>
{
const
imgNode
:
HTMLImageElement
=
this
.
createElementFromHTML
(
token
)
as
HTMLImageElement
;
imgNode
.
classList
.
add
(...[
'
thumbnail
'
,
'
cursor-zoom-in
'
,
'
img-fluid
'
]);
imgNode
.
classList
.
add
(...[
'
thumbnail
'
,
'
cursor-zoom-in
'
]);
const
anchorNode
=
document
.
createElement
<
'
a
'
>
(
'
a
'
);
anchorNode
.
href
=
imgNode
.
src
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment