Przeglądaj źródła

Added more docs.

Szymon Kupś 7 lat temu
rodzic
commit
5052b84999

+ 12 - 1
packages/ckeditor5-editor-balloon/src/ballooneditor.js

@@ -65,6 +65,16 @@ export default class BalloonEditor extends Editor {
 	constructor( elementOrData, config ) {
 		super( config );
 
+		/**
+		 * The element on which the editor has been initialized.
+		 * If editor was initialized with data instead of HTMLElement this property will keep a reference to newly
+		 * created element that need to be added manually to the DOM. For more information see
+		 * {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`}.
+		 *
+		 * @readonly
+		 * @member {HTMLElement} #element
+		 */
+
 		if ( isElement( elementOrData ) ) {
 			this.element = elementOrData;
 		} else {
@@ -160,7 +170,8 @@ export default class BalloonEditor extends Editor {
 	 *
 	 * @param {HTMLElement|String} elementOrData The DOM element that will be the source for the created editor
 	 * (on which the editor will be initialized) or initial data for the editor. If data is provided, `editor.element`
-	 * will be created automatically and need to be added manually to the DOM.
+	 * will be created automatically and need to be added manually to the DOM. The element is initialized as a `div`
+	 * element crated in current document's context.
 	 * @param {module:core/editor/editorconfig~EditorConfig} config The editor configuration.
 	 * @returns {Promise} A promise resolved once the editor is ready.
 	 * The promise returns the created {@link module:editor-balloon/ballooneditor~BalloonEditor} instance.