Lutaaya Huzaifah Idris
Lutaaya Huzaifah Idris

Reputation: 3990

How can I add a Placeholder in a React CKEDITOR

I have read the documentation of ckeditor regarding the React Context , but I couldn't find how to make a Placeholder on the CKEditor.

This is the link to the react ckeditor react ckeditor

This is the sample code :

<CKEditor
    onInit={editor => {
        // Insert the toolbar before the editable area.
        editor.ui.view.editable.element.parentElement.insertBefore(
        editor.ui.view.toolbar.element,
        editor.ui.view.editable.element);}}
        name={this.state.body}
        onChange={this.handleEditorChange}
        editor={DecoupledEditor}
        data={this.state.body}
        />

Upvotes: 10

Views: 4268

Answers (1)

Uri Klar
Uri Klar

Reputation: 3988

<CKEditor 
  config={{placeholder: "Placeholder text..."}} 
  ... 
  />

Works for me

Upvotes: 20

Related Questions