瀏覽代碼

Add <div> as a common solution for the editor-wrong-element error.

Maciej Gołaszewski 6 年之前
父節點
當前提交
f6170077cf
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      packages/ckeditor5-core/src/editor/editor.js

+ 6 - 0
packages/ckeditor5-core/src/editor/editor.js

@@ -331,6 +331,12 @@ mix( Editor, ObservableMixin );
  * Content of an editor should be nicely present to the user and show him how it's going to looks like. Textarea element
  * doesn't support such behavior.
  *
+ * In most cases a `<div>` element can be used:
+ *
+ *		<div id="editor">
+ *			<p>Initial content.</p>
+ *		</div>
+ *
  * Only {@glink builds/guides/overview#classic-editor Classic Editor} has implemented a special system, which
  * **replace** DOM element and load data from it
  * ({@link module:editor-classic/classiceditor~ClassicEditor.create more information}). All other editors