|
@@ -65,6 +65,16 @@ export default class BalloonEditor extends Editor {
|
|
|
constructor( elementOrData, config ) {
|
|
constructor( elementOrData, config ) {
|
|
|
super( 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 ) ) {
|
|
if ( isElement( elementOrData ) ) {
|
|
|
this.element = elementOrData;
|
|
this.element = elementOrData;
|
|
|
} else {
|
|
} 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
|
|
* @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`
|
|
* (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.
|
|
* @param {module:core/editor/editorconfig~EditorConfig} config The editor configuration.
|
|
|
* @returns {Promise} A promise resolved once the editor is ready.
|
|
* @returns {Promise} A promise resolved once the editor is ready.
|
|
|
* The promise returns the created {@link module:editor-balloon/ballooneditor~BalloonEditor} instance.
|
|
* The promise returns the created {@link module:editor-balloon/ballooneditor~BalloonEditor} instance.
|