diff --git a/src/components/TinyMCEEditor.jsx b/src/components/TinyMCEEditor.jsx index 3b935a82..75ca1fcb 100644 --- a/src/components/TinyMCEEditor.jsx +++ b/src/components/TinyMCEEditor.jsx @@ -94,12 +94,12 @@ export default function TinyMCEEditor(props) { autosave_interval: '1s', autosave_restore_when_empty: true, plugins: 'autosave codesample link lists image imagetools code emoticons charmap', - toolbar: 'formatselect | bold italic underline' + toolbar: 'undo redo' + + ' | formatselect | bold italic underline' + ' | link blockquote openedx_code image' + ' | bullist numlist outdent indent' + ' | removeformat' + ' | openedx_html' - + ' | undo redo' + ' | emoticons' + ' | charmap', content_css: false, diff --git a/src/discussions/comments/CommentsView.jsx b/src/discussions/comments/CommentsView.jsx index 1a6c5c43..70e7d160 100644 --- a/src/discussions/comments/CommentsView.jsx +++ b/src/discussions/comments/CommentsView.jsx @@ -58,6 +58,7 @@ function DiscussionCommentsView({ postId, intl, endorsed, + isClosed, }) { const { comments, @@ -74,9 +75,9 @@ function DiscussionCommentsView({
{comments.map(comment => ( - + ))} - {!!comments.length + {!!comments.length && !isClosed && } {hasMorePages && !isLoading && ( + <> + {!isClosedPost + && ( + + )} + ) )}
@@ -137,11 +143,13 @@ Comment.propTypes = { postType: PropTypes.oneOf(['discussion', 'question']).isRequired, comment: commentShape.isRequired, showFullThread: PropTypes.bool, + isClosedPost: PropTypes.bool, intl: intlShape.isRequired, }; Comment.defaultProps = { showFullThread: true, + isClosedPost: false, }; export default injectIntl(Comment); diff --git a/src/discussions/comments/comment/ResponseEditor.jsx b/src/discussions/comments/comment/ResponseEditor.jsx index b95a5b7f..e0f650bd 100644 --- a/src/discussions/comments/comment/ResponseEditor.jsx +++ b/src/discussions/comments/comment/ResponseEditor.jsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import React, { useEffect, useState } from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; @@ -16,6 +16,10 @@ function ResponseEditor({ }) { const [addingResponse, setAddingResponse] = useState(false); + useEffect(() => { + setAddingResponse(false); + }, [postId]); + return addingResponse ? (