diff --git a/src/components/TinyMCEEditor.jsx b/src/components/TinyMCEEditor.jsx index 510adf17e..ff266ef4a 100644 --- a/src/components/TinyMCEEditor.jsx +++ b/src/components/TinyMCEEditor.jsx @@ -1,4 +1,5 @@ import React, { useCallback, useEffect, useState } from 'react'; +import PropTypes from 'prop-types'; import { ActionRow, AlertModal, Button } from '@openedx/paragon'; import { Editor } from '@tinymce/tinymce-react'; @@ -152,6 +153,7 @@ const TinyMCEEditor = (props) => { relative_urls: false, default_link_target: '_blank', target_list: false, + placeholder: props.placeholder, images_upload_handler: uploadHandler, setup, }} @@ -178,4 +180,12 @@ const TinyMCEEditor = (props) => { ); }; +TinyMCEEditor.propTypes = { + placeholder: PropTypes.string, +}; + +TinyMCEEditor.defaultProps = { + placeholder: '', +}; + export default React.memo(TinyMCEEditor); diff --git a/src/discussions/posts/post-editor/PostEditor.jsx b/src/discussions/posts/post-editor/PostEditor.jsx index a2f57959c..2a4c62120 100644 --- a/src/discussions/posts/post-editor/PostEditor.jsx +++ b/src/discussions/posts/post-editor/PostEditor.jsx @@ -409,6 +409,7 @@ const PostEditor = ({ value={values.comment} onEditorChange={formikCompatibleHandler(handleChange, 'comment')} onBlur={formikCompatibleHandler(handleBlur, 'comment')} + placeholder={intl.formatMessage(messages.postContent)} /> diff --git a/src/discussions/posts/post-editor/messages.js b/src/discussions/posts/post-editor/messages.js index e91781317..c58d4dd2e 100644 --- a/src/discussions/posts/post-editor/messages.js +++ b/src/discussions/posts/post-editor/messages.js @@ -55,7 +55,11 @@ const messages = defineMessages({ }, postTitle: { id: 'discussions.post.editor.title', - defaultMessage: 'Post title', + defaultMessage: 'Post title*', + }, + postContent: { + id: 'discussions.post.editor.postContent', + defaultMessage: 'Post content*', }, titleDescription: { id: 'discussions.post.editor.titleDescription',