How does draft-js reset the style

ask for advice on how to reset his style in
1.draft-js. The dom structure is too cumbersome. The main reason is to change the input box from block-level elements to inline elements, and the width is enlarged by content
2. If you want to set to get its focus, how to write it? if you try focus (), you will report an error
how to set 3.placeholder. If you write it as an attribute, you will report an error
kneeling

.

see that you have asked several draft-js questions, don't you look at the official documentation before using it? https://draftjs.org/docs/over.


set placeholder,focus;

focus = () => this.editor.focus();
...

<div
    styleName="editor"
    onClick={this.focus}
>
    <Editor
        spellCheck
        onChange={this.onChange}
        editorState={editorState}
        customStyleMap={styleMap}
        placeholder="Enter something..."
        ref={(input) => { this.editor = input; }}
    />
</div>
Menu