add preview support
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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">
|
||||
{
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import 'components/raw-content';
|
||||
|
||||
export { default } from './comment';
|
||||
|
||||
require('./comment.scss');
|
||||
|
||||
Reference in New Issue
Block a user