Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Tinymce #9

wants to merge 2 commits into from

Conversation

Prernaswarna
Copy link
Member

I have replaced plain text fields with HTML Fields

Copy link
Member

@algomaster99 algomaster99 left a 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?


handleEditorChange = (content) => {
this.setState({text: content.level.content})
console.log(content.level.content)
Copy link
Member

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.

@@ -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'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{ Editor }


class GroupAddPost extends React.Component {
constructor (props) {
super(props)
this.state = {
text: '',
text: "",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary change

name='text'
<Editor
apiKey="fb3pb0ana4mvi60jwhefs3g2u3501d9s915efud2rh6ax2ek"
/*init={{height=autoHeight}}*/
Copy link
Member

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.

value={this.state.text}
placeholder='Write something here...'
initialValue="<p>Write something here...</p>"
Copy link
Member

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..."?

@@ -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={{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unevenly indented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants