简体   繁体   English

如何在 React CKEDITOR 中添加占位符

[英]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.我已经阅读了关于 React Context 的 ckeditor 文档,但我找不到如何在 CKEditor 上创建占位符。

This is the link to the react ckeditor react ckeditor这是 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}
        />
<CKEditor 
  config={{placeholder: "Placeholder text..."}} 
  ... 
  />

Works for me为我工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM