Skip to content

Commit

Permalink
#56 Style rich text annotations on dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
blms committed Jan 21, 2021
1 parent 40e2688 commit a31cd63
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import {
Badge, Card, Col, ListGroup, Row, Tab, Tabs,
} from 'react-bootstrap';
import { format } from 'date-fns';
import ReactHtmlParser from 'react-html-parser';
import LoadingSpinner from '../../LoadingSpinner';
import { getSharedAnnotations, getOwnAnnotations } from '../../../utils/annotationUtil';
import { getGroupNameById } from '../../../utils/groupUtil';
import { FirstNameLastInitial } from '../../../utils/nameUtil';
import { fixIframes } from '../../../utils/parseUtil';

const DashboardAnnotationList = ({
session,
Expand Down Expand Up @@ -125,7 +127,7 @@ const DashboardAnnotationList = ({
</Row>
<Row>
<Col className="paragraph-ellipsis">
{annotation.body.value}
{ReactHtmlParser(annotation.body.value, { transform: fixIframes })}
</Col>
</Row>
<Row>
Expand Down
7 changes: 7 additions & 0 deletions src/style/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,13 @@ ol.breadcrumb {
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
max-height: 72px;
img, iframe {
max-width: 100%;
}
p {
margin: 0;
}
}

.ui.selection.dropdown,.ui.upward.selection.dropdown {
Expand Down

0 comments on commit a31cd63

Please sign in to comment.