8
0
Просмотр исходного кода

Merge branch 'master' into t/ckeditor5/1457

Aleksander Nowodzinski 6 лет назад
Родитель
Сommit
3ad16c247a
1 измененных файлов с 22 добавлено и 0 удалено
  1. 22 0
      packages/ckeditor5-core/src/editor/editorconfig.jsdoc

+ 22 - 0
packages/ckeditor5-core/src/editor/editorconfig.jsdoc

@@ -30,6 +30,28 @@
  * @interface EditorConfig
  */
 
+/**
+ * The initial editor data to be used instead of the provided element's HTML content.
+ *
+ *      ClassicEditor
+ *          .create( document.querySelector( '#editor' ), {
+ *              initialData: '<h2>Initial data</h2><p>Foo bar.</p>'
+ *          } )
+ *			.then( ... )
+ *			.catch( ... );
+ *
+ * By default, the editor is initialized with the content of the element on which the editor is initialized.
+ * See {@link module:core/editor/editor~Editor#create Editor.create()}.
+ *
+ * This configuration option lets you override initial data if an element is passed in `Editor.create()` call.
+ * It is especially useful if it is difficult for your integration to put the data inside the HTML element.
+ *
+ * **Note:** if initial data is passed in `Editor.create()` as a parameter, an error will be thrown as those
+ * two options exclude themselves.
+ *
+ * @member {String} module:core/editor/editorconfig~EditorConfig#initialData
+ */
+
 /**
  * The list of plugins to load.
  *