【问题标题】:How can I add a Placeholder in a React CKEDITOR如何在 React CKEDITOR 中添加占位符
【发布时间】:2019-03-27 15:48:47
【问题描述】:

我已阅读 ckeditor 关于 React Context 的文档,但我找不到如何在 CKEditor 上制作占位符。

这是 react ckeditor react ckeditor的链接

这是示例代码:

<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}
        />

【问题讨论】:

标签: javascript reactjs ckeditor ckeditor5


【解决方案1】:
<CKEditor 
  config={{placeholder: "Placeholder text..."}} 
  ... 
  />

为我工作

【讨论】:

  • 有什么方法可以给占位符添加换行符吗?我尝试了多种方法,但我无法添加换行符!
猜你喜欢
  • 2018-03-19
  • 2015-04-02
  • 2023-04-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-02-23
  • 2017-07-31
相关资源
最近更新 更多