mirror of
https://github.com/wassname/talk.git
synced 2026-08-08 11:28:12 +08:00
Simpler fragments
This commit is contained in:
@@ -36,6 +36,7 @@ class Editor extends React.Component {
|
||||
},
|
||||
});
|
||||
|
||||
console.log('comment', this.props.comment);
|
||||
// To edit comments and have the previous html comment
|
||||
if (this.props.comment && this.props.comment.richTextBody) {
|
||||
this.ref.content.innerHTML = this.props.comment.richTextBody;
|
||||
|
||||
@@ -6,6 +6,7 @@ export default {
|
||||
slots: {
|
||||
draftArea: [Editor],
|
||||
commentContent: [CommentContent],
|
||||
adminCommentContent: [CommentContent],
|
||||
},
|
||||
fragments: {
|
||||
CreateCommentResponse: gql`
|
||||
@@ -57,6 +58,7 @@ export default {
|
||||
fragment: editCommentFragment,
|
||||
id: fragmentId,
|
||||
data: {
|
||||
__typename: 'Comment',
|
||||
richTextBody: edit.richTextBody,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user