rich text in the react js text editor is overflowing

Viewed 83

I am trying to add Editor from "react-draft-wysiwyg" but the texts are overflowing when i write something. How can i solve this problem?

Here is problem image:

enter image description here

And here is my Codes:

import React, {Component } from "react";
import { Editor } from "react-draft-wysiwyg";
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
import { EditorState } from "draft-js";

class CreatePostPage extends Component {
  constructor(props) {
    super(props);
    this.state...

  onEditorStateChange...

  render() {
    const { editorState } = this.state;
    return (
      <div
        className="rounded"
        style={{
          marginTop: 100,
          marginLeft: 50,
          marginRight: 50,
          //marginBottom:200,
          backgroundColor: "white",
          height: "35rem",
        }}
      >
        <Editor
          editorState={editorState}
          toolbarClassName="toolbarClassName"
          wrapperClassName="wrapperClassName"
          editorClassName="editorClassName"
          onEditorStateChange={this.onEditorStateChange}
        />
      </div>
    );
  }
}

export default CreatePostPage;
0 Answers
Related