|
@@ -130,6 +130,7 @@ export default class CommentForm extends React.Component {
|
|
|
const creatorsPage = `/user/${username}`;
|
|
const creatorsPage = `/user/${username}`;
|
|
|
const comment = this.state.comment;
|
|
const comment = this.state.comment;
|
|
|
const commentPreview = this.state.isMarkdown ? this.getCommentHtml(): ReactUtils.nl2br(comment);
|
|
const commentPreview = this.state.isMarkdown ? this.getCommentHtml(): ReactUtils.nl2br(comment);
|
|
|
|
|
+
|
|
|
return (
|
|
return (
|
|
|
<div>
|
|
<div>
|
|
|
<form className="form page-comment-form" id="page-comment-form" onSubmit={this.postComment}>
|
|
<form className="form page-comment-form" id="page-comment-form" onSubmit={this.postComment}>
|
|
@@ -150,7 +151,7 @@ export default class CommentForm extends React.Component {
|
|
|
{ isMarkdown == true &&
|
|
{ isMarkdown == true &&
|
|
|
<Tab eventKey={2} title="Preview">
|
|
<Tab eventKey={2} title="Preview">
|
|
|
<div className="comment-form-preview">
|
|
<div className="comment-form-preview">
|
|
|
- {commentPreview}
|
|
|
|
|
|
|
+ {commentPreview}
|
|
|
</div>
|
|
</div>
|
|
|
</Tab>
|
|
</Tab>
|
|
|
}
|
|
}
|
|
@@ -158,9 +159,11 @@ export default class CommentForm extends React.Component {
|
|
|
</div>
|
|
</div>
|
|
|
<div className="comment-submit">
|
|
<div className="comment-submit">
|
|
|
<div className="pull-left">
|
|
<div className="pull-left">
|
|
|
- <label>
|
|
|
|
|
- <input type="checkbox" id="comment-form-is-markdown" name="isMarkdown" checked={this.state.isMarkdown} value="1" onChange={this.updateState} /> Markdown
|
|
|
|
|
- </label>
|
|
|
|
|
|
|
+ { this.state.key == 1 &&
|
|
|
|
|
+ <label>
|
|
|
|
|
+ <input type="checkbox" id="comment-form-is-markdown" name="isMarkdown" checked={this.state.isMarkdown} value="1" onChange={this.updateState} /> Markdown
|
|
|
|
|
+ </label>
|
|
|
|
|
+ }
|
|
|
</div>
|
|
</div>
|
|
|
<div className="pull-right">
|
|
<div className="pull-right">
|
|
|
<Button type="submit" value="Submit" bsStyle="primary" className="fcbtn btn btn-sm btn-primary btn-outline btn-rounded btn-1b">
|
|
<Button type="submit" value="Submit" bsStyle="primary" className="fcbtn btn btn-sm btn-primary btn-outline btn-rounded btn-1b">
|