instructure-react / react-tinymce

React TinyMCE component
181 stars 110 forks source link

[PATCH] Please implement the placeholder attribute #80

Open jens-josh opened 7 years ago

jens-josh commented 7 years ago

Please implement the placeholder attribute of the textarea:

diff --git a/lib/components/TinyMCE.js b/lib/components/TinyMCE.js
index 738b103..fbe49ad 100644
--- a/lib/components/TinyMCE.js
+++ b/lib/components/TinyMCE.js
@@ -37,7 +37,8 @@ const TinyMCE = React.createClass({
     content: React.PropTypes.string,
     id: React.PropTypes.string,
     className: React.PropTypes.string,
-    name: React.PropTypes.string
+    name: React.PropTypes.string,
+    placeholder: React.PropTypes.string,
   },

   getDefaultProps() {
@@ -96,6 +97,7 @@ const TinyMCE = React.createClass({
         className={this.props.className}
         name={this.props.name}
         defaultValue={this.props.content}
+        placeholder={this.props.placeholder}
       />
     );
   },