add preview support

This commit is contained in:
igoradamenko
2018-05-02 02:44:27 +03:00
parent b9c567c10e
commit 412fc7a97d
10 changed files with 107 additions and 41 deletions
@@ -1,32 +1,3 @@
.comment__text {
margin-bottom: 4px;
p {
margin: 0;
+ p {
margin-top: 8px;
}
// imported comments have br instead of p
br {
content: '';
display: block;
margin-top: 8px;
}
}
a {
color: #0aa;
&:hover {
color: #06c5c5;
text-decoration: none;
}
}
img {
max-width: 100%;
max-height: 300px;
}
}
+8 -2
View File
@@ -219,7 +219,10 @@ export default class Comment extends Component {
<a href={`${o.locator.url}#remark__comment-${o.id}`} className="comment__username">{o.user.name}</a>
</div>
{' '}
<div className="comment__text" dangerouslySetInnerHTML={{ __html: o.text }}/>
<div
className={b('comment__text', { mix: 'raw-content' })}
dangerouslySetInnerHTML={{ __html: o.text }}
/>
</div>
</div>
);
@@ -273,7 +276,10 @@ export default class Comment extends Component {
}
</div>
<div className="comment__text" dangerouslySetInnerHTML={{ __html: o.text }}/>
<div
className={b('comment__text', { mix: 'raw-content' })}
dangerouslySetInnerHTML={{ __html: o.text }}
/>
<div className="comment__actions">
{
+2
View File
@@ -1,3 +1,5 @@
import 'components/raw-content';
export { default } from './comment';
require('./comment.scss');