@@ -87,4 +89,11 @@ class Comment extends React.Component {
}
}
+Comment.propTypes = {
+ viewComment: PropTypes.func,
+ comment: PropTypes.object,
+ asset: PropTypes.object,
+ root: PropTypes.object,
+};
+
export default Comment;
diff --git a/plugins/talk-plugin-rich-text/client/components/AdminCommentContent.js b/plugins/talk-plugin-rich-text/client/components/AdminCommentContent.js
index 1b7e53ebf..f49d89055 100644
--- a/plugins/talk-plugin-rich-text/client/components/AdminCommentContent.js
+++ b/plugins/talk-plugin-rich-text/client/components/AdminCommentContent.js
@@ -1,12 +1,13 @@
import React from 'react';
import PropTypes from 'prop-types';
+import Linkify from 'react-linkify';
import styles from './AdminCommentContent.css';
import { AdminCommentContent as Content } from 'plugin-api/beta/client/components';
class AdminCommentContent extends React.Component {
render() {
const { comment, suspectWords, bannedWords } = this.props;
- return (
+ const content = (
);
+
+ if (!!comment.richTextBody) {
+ return content;
+ }
+
+ return
{content};
}
}
diff --git a/plugins/talk-plugin-rich-text/client/components/CommentContent.js b/plugins/talk-plugin-rich-text/client/components/CommentContent.js
index 2cf481830..64aa96c82 100644
--- a/plugins/talk-plugin-rich-text/client/components/CommentContent.js
+++ b/plugins/talk-plugin-rich-text/client/components/CommentContent.js
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import { PLUGIN_NAME } from '../constants';
import cn from 'classnames';
import styles from './CommentContent.css';
+import Linkify from 'react-linkify';
class CommentContent extends React.Component {
render() {
@@ -14,7 +15,9 @@ class CommentContent extends React.Component {
dangerouslySetInnerHTML={{ __html: comment.richTextBody }}
/>
) : (
-
{comment.body}
+
+ {comment.body}
+
);
}
}