-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tinymce #9
base: master
Are you sure you want to change the base?
Tinymce #9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't tested it yet.
Few suggestions:
- Never submit a PR via your
master
. Although I have told the reason for this in the Git Lecture, feel free to ping me if you didn't understand then. - The commit messages, for our organization, starts with Present Tense. For the changes in the PR, I would probably type something like this:
Change mission, about, description textareas to rich text field
. - @pradumangoyal could you please attach the link to the configuration for frontend formatting?
src/components/group-add-post.js
Outdated
|
||
handleEditorChange = (content) => { | ||
this.setState({text: content.level.content}) | ||
console.log(content.level.content) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't leave console.log
in the code. This reflects in production environment too.
src/components/group-add-post.js
Outdated
@@ -20,12 +20,13 @@ import { addPost } from '../actions' | |||
|
|||
import inline from 'formula_one/src/css/inline.css' | |||
import main from '../css/group-post-card.css' | |||
import {Editor} from '@tinymce/tinymce-react' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ Editor }
src/components/group-add-post.js
Outdated
|
||
class GroupAddPost extends React.Component { | ||
constructor (props) { | ||
super(props) | ||
this.state = { | ||
text: '', | ||
text: "", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary change
src/components/group-add-post.js
Outdated
name='text' | ||
<Editor | ||
apiKey="fb3pb0ana4mvi60jwhefs3g2u3501d9s915efud2rh6ax2ek" | ||
/*init={{height=autoHeight}}*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't commit such meaningless comments.
src/components/group-add-post.js
Outdated
value={this.state.text} | ||
placeholder='Write something here...' | ||
initialValue="<p>Write something here...</p>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was the p
tags necessary?
Can't you simply write it like this - initialValue="Write something here..."
?
src/components/group-post-card.js
Outdated
@@ -106,7 +107,19 @@ class GroupPostCard extends React.Component { | |||
</div> | |||
</Card.Content> | |||
<Card.Content> | |||
<div styleName='post-card-description'>{post.text}</div> | |||
<div styleName='post-card-description'><Editor apikey="fb3pb0ana4mvi60jwhefs3g2u3501d9s915efud2rh6ax2ek" init={{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unevenly indented
I have replaced plain text fields with HTML Fields