@ckeditor/ckeditor5-link
Advanced tools
Comparing version 11.0.1 to 11.0.2
Changelog | ||
========= | ||
## [11.0.2](https://github.com/ckeditor/ckeditor5-link/compare/v11.0.1...v11.0.2) (2019-06-05) | ||
### Bug fixes | ||
* The link balloon will not be shown if no link was added after command execution. Closes [#171](https://github.com/ckeditor/ckeditor5-link/issues/171). ([0069dc7](https://github.com/ckeditor/ckeditor5-link/commit/0069dc7)) | ||
### Other changes | ||
* Use `Model#insertContent()` instead of `model.Writer#insert()`. Closes [#224](https://github.com/ckeditor/ckeditor5-link/issues/224). ([e3c8676](https://github.com/ckeditor/ckeditor5-link/commit/e3c8676)) | ||
* Updated translations. ([ba97a60](https://github.com/ckeditor/ckeditor5-link/commit/ba97a60)) | ||
## [11.0.1](https://github.com/ckeditor/ckeditor5-link/compare/v11.0.0...v11.0.1) (2019-04-10) | ||
@@ -8,3 +20,3 @@ | ||
* Updated translations. ([9332478](https://github.com/ckeditor/ckeditor5-link/commit/9332478)) | ||
* Updated translations. ([9332478](https://github.com/ckeditor/ckeditor5-link/commit/9332478)) | ||
@@ -11,0 +23,0 @@ |
{ | ||
"name": "@ckeditor/ckeditor5-link", | ||
"version": "11.0.1", | ||
"version": "11.0.2", | ||
"description": "Link feature for CKEditor 5.", | ||
@@ -13,13 +13,13 @@ "keywords": [ | ||
"dependencies": { | ||
"@ckeditor/ckeditor5-core": "^12.1.0", | ||
"@ckeditor/ckeditor5-engine": "^13.1.0", | ||
"@ckeditor/ckeditor5-ui": "^12.1.0" | ||
"@ckeditor/ckeditor5-core": "^12.1.1", | ||
"@ckeditor/ckeditor5-engine": "^13.1.1", | ||
"@ckeditor/ckeditor5-ui": "^13.0.0" | ||
}, | ||
"devDependencies": { | ||
"@ckeditor/ckeditor5-editor-classic": "^12.1.0", | ||
"@ckeditor/ckeditor5-enter": "^11.0.1", | ||
"@ckeditor/ckeditor5-paragraph": "^11.0.1", | ||
"@ckeditor/ckeditor5-typing": "^12.0.1", | ||
"@ckeditor/ckeditor5-undo": "^11.0.1", | ||
"@ckeditor/ckeditor5-utils": "^12.1.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^12.1.1", | ||
"@ckeditor/ckeditor5-enter": "^11.0.2", | ||
"@ckeditor/ckeditor5-paragraph": "^11.0.2", | ||
"@ckeditor/ckeditor5-typing": "^12.0.2", | ||
"@ckeditor/ckeditor5-undo": "^11.0.2", | ||
"@ckeditor/ckeditor5-utils": "^12.1.1", | ||
"eslint": "^5.5.0", | ||
@@ -26,0 +26,0 @@ "eslint-config-ckeditor5": "^1.0.11", |
@@ -21,2 +21,2 @@ CKEditor 5 link feature | ||
Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html). For full details about the license, please check the `LICENSE.md` file. | ||
Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html). For full details about the license, please check the `LICENSE.md` file or [https://ckeditor.com/legal/ckeditor-oss-license](https://ckeditor.com/legal/ckeditor-oss-license). |
/** | ||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
@@ -5,0 +5,0 @@ |
/** | ||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
@@ -5,0 +5,0 @@ |
/** | ||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
@@ -84,3 +84,3 @@ | ||
writer.insert( node, position ); | ||
model.insertContent( node, position ); | ||
@@ -87,0 +87,0 @@ // Create new range wrapping created node. |
/** | ||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
@@ -5,0 +5,0 @@ |
/** | ||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
@@ -157,3 +157,3 @@ | ||
editor.execute( 'link', formView.urlInputView.inputView.element.value ); | ||
this._removeFormView(); | ||
this._closeFormView(); | ||
} ); | ||
@@ -163,3 +163,3 @@ | ||
this.listenTo( formView, 'cancel', () => { | ||
this._removeFormView(); | ||
this._closeFormView(); | ||
} ); | ||
@@ -169,3 +169,3 @@ | ||
formView.keystrokes.set( 'Esc', ( data, cancel ) => { | ||
this._removeFormView(); | ||
this._closeFormView(); | ||
cancel(); | ||
@@ -194,3 +194,3 @@ } ); | ||
if ( linkCommand.isEnabled ) { | ||
this._showUI(); | ||
this._showUI( true ); | ||
} | ||
@@ -212,3 +212,3 @@ } ); | ||
// Show the panel on button click. | ||
this.listenTo( button, 'execute', () => this._showUI() ); | ||
this.listenTo( button, 'execute', () => this._showUI( true ) ); | ||
@@ -263,3 +263,3 @@ return button; | ||
emitter: this.formView, | ||
activator: () => this._isUIVisible, | ||
activator: () => this._isUIInPanel, | ||
contextElements: [ this._balloon.view.element ], | ||
@@ -304,3 +304,6 @@ callback: () => this._hideUI() | ||
this.formView.urlInputView.select(); | ||
// Select input when form view is currently visible. | ||
if ( this._balloon.visibleView === this.formView ) { | ||
this.formView.urlInputView.select(); | ||
} | ||
@@ -317,2 +320,18 @@ // Make sure that each time the panel shows up, the URL field remains in sync with the value of | ||
/** | ||
* Closes form view. Decides whether the balloon should be hidden completely or if action view should be shown. This is decided upon | ||
* link command value (which has value if the document selection is in link). | ||
* | ||
* @private | ||
*/ | ||
_closeFormView() { | ||
const linkCommand = this.editor.commands.get( 'link' ); | ||
if ( linkCommand.value !== undefined ) { | ||
this._removeFormView(); | ||
} else { | ||
this._hideUI(); | ||
} | ||
} | ||
/** | ||
* Removes the {@link #formView} from the {@link #_balloon}. | ||
@@ -340,5 +359,6 @@ * | ||
* | ||
* @param {Boolean} forceVisible | ||
* @private | ||
*/ | ||
_showUI() { | ||
_showUI( forceVisible = false ) { | ||
const editor = this.editor; | ||
@@ -354,5 +374,11 @@ const linkCommand = editor.commands.get( 'link' ); | ||
this._addActionsView(); | ||
// Be sure panel with link is visible. | ||
if ( forceVisible ) { | ||
this._balloon.showStack( 'main' ); | ||
} | ||
this._addFormView(); | ||
} | ||
// If theres a link under the selection... | ||
// If there's a link under the selection... | ||
else { | ||
@@ -367,2 +393,7 @@ // Go to the editing UI if actions are already visible. | ||
} | ||
// Be sure panel with link is visible. | ||
if ( forceVisible ) { | ||
this._balloon.showStack( 'main' ); | ||
} | ||
} | ||
@@ -369,0 +400,0 @@ |
/** | ||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
@@ -5,0 +5,0 @@ |
/** | ||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
@@ -5,0 +5,0 @@ |
/** | ||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
@@ -5,0 +5,0 @@ |
/** | ||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
@@ -5,0 +5,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
134059
67
1325
+ Added@ckeditor/ckeditor5-ui@13.0.2(transitive)
- Removed@ckeditor/ckeditor5-ui@12.1.0(transitive)
- Removed@ckeditor/ckeditor5-utils@12.1.1(transitive)