JavaScript – Draft JS issue with Flex display.

So here is my editor code:

import React, { useState } from "react";
import { Editor, EditorState } from 'draft-js';
import 'draft-js/dist/Draft.css';
import "./review-page-wysiwyg.component.css"

const ReviewPageWysiwyg = () => {
    const [editorState, setEditorState] = useState(() => EditorState.createEmpty(),);

    return (
        <div id="review-page-wysiwyg">
                placeholder="Type Here..."
                onChange={setEditorState} />

export default ReviewPageWysiwyg;

And when I make review-page-wysiwyg div to a display: flex; The editor will not allow me to edit. Or in particular, public-DraftEditorPlaceholder-hasFocus The class will not be included in the editor’s class (one of the internal classes required for actual typing).

Write a Comment

Your email address will not be published. Required fields are marked *