|
|
@@ -53,7 +53,9 @@ export default class Link extends Plugin {
|
|
|
* @inheritDoc
|
|
|
*/
|
|
|
init() {
|
|
|
- this.editor.editing.view.addObserver( ClickObserver );
|
|
|
+ const editor = this.editor;
|
|
|
+
|
|
|
+ editor.editing.view.addObserver( ClickObserver );
|
|
|
|
|
|
/**
|
|
|
* The form view displayed inside the balloon.
|
|
|
@@ -68,7 +70,7 @@ export default class Link extends Plugin {
|
|
|
* @private
|
|
|
* @member {module:ui/panel/balloon/contextualballoon~ContextualBalloon}
|
|
|
*/
|
|
|
- this._balloon = this.editor.plugins.get( ContextualBalloon );
|
|
|
+ this._balloon = editor.plugins.get( ContextualBalloon );
|
|
|
|
|
|
// Create toolbar buttons.
|
|
|
this._createToolbarLinkButton();
|
|
|
@@ -342,10 +344,7 @@ export default class Link extends Plugin {
|
|
|
// Otherwise attach panel to the selection.
|
|
|
viewDocument.domConverter.viewRangeToDom( viewDocument.selection.getFirstRange() );
|
|
|
|
|
|
- return {
|
|
|
- target,
|
|
|
- limiter: viewDocument.domConverter.mapViewToDom( viewDocument.selection.editableElement )
|
|
|
- };
|
|
|
+ return { target };
|
|
|
}
|
|
|
|
|
|
/**
|