Parcourir la source

Minor docs refactoring.

Oskar Wrobel il y a 9 ans
Parent
commit
78eb6a60c0

+ 7 - 6
packages/ckeditor5-link/src/link.js

@@ -72,9 +72,10 @@ export default class Link extends Feature {
 			icon: 'link'
 		} );
 
+		// Bind button model to command.
 		linkButtonModel.bind( 'isEnabled' ).to( linkCommand, 'isEnabled' );
 
-		// Show Balloon Panel on button click.
+		// Show Balloon Panel on button click only when editor is focused.
 		this.listenTo( linkButtonModel, 'execute', () => {
 			if ( !viewDocument.isFocused ) {
 				return;
@@ -108,7 +109,7 @@ export default class Link extends Feature {
 		// Bind button model to command.
 		unlinkButtonModel.bind( 'isEnabled' ).to( unlinkCommand, 'hasValue' );
 
-		// Execute command.
+		// Execute unlink command and hide panel if is opened.
 		this.listenTo( unlinkButtonModel, 'execute', () => {
 			editor.execute( 'unlink' );
 
@@ -117,7 +118,7 @@ export default class Link extends Feature {
 			}
 		} );
 
-		// Add link button to feature components.
+		// Add unlink button to feature components.
 		editor.ui.featureComponents.add( 'unlink', ButtonController, ButtonView, unlinkButtonModel );
 	}
 
@@ -174,11 +175,11 @@ export default class Link extends Feature {
 		// Bind panel model to command.
 		panelModel.bind( 'url' ).to( linkCommand, 'value' );
 
-		// Create balloon Panel instance.
+		// Create Balloon panel instance.
 		const balloonPanel = new LinkBalloonPanel( panelModel, new LinkBalloonPanelView( editor.locale ) );
 
 		// Observe `LinkBalloonPanelMode#execute` event from within the model of the panel,
-		// which means that the "Save" button has been clicked.
+		// which means that the `Save` button has been clicked.
 		this.listenTo( panelModel, 'execute', () => {
 			editor.execute( 'link', balloonPanel.urlInput.value );
 			balloonPanel.view.hide();
@@ -191,7 +192,7 @@ export default class Link extends Feature {
 		// @TODO replace it by some FocusManager.
 		viewDocument.on( 'focus', () => balloonPanel.view.hide() );
 
-		// Handle click on document and show panel when selection is placed in in link element.
+		// Handle click on document and show panel when selection is placed in the link element.
 		viewDocument.on( 'click', () => {
 			if ( viewDocument.selection.isCollapsed && linkCommand.value !== undefined ) {
 				this._attachPanelToElement();

+ 0 - 1
packages/ckeditor5-link/tests/link.js

@@ -4,7 +4,6 @@
  */
 
 /* globals document */
-/* bender-tags: link, browser-only */
 
 import ClassicTestEditor from '/tests/core/_utils/classictesteditor.js';
 import testUtils from '/tests/core/_utils/utils.js';

+ 0 - 2
packages/ckeditor5-link/tests/linkcommand.js

@@ -3,8 +3,6 @@
  * For licensing, see LICENSE.md.
  */
 
-/* bender-tags: link */
-
 import ModelTestEditor from '/tests/core/_utils/modeltesteditor.js';
 import LinkCommand from '/ckeditor5/link/linkcommand.js';
 import { setData, getData } from '/tests/engine/_utils/model.js';

+ 0 - 2
packages/ckeditor5-link/tests/linkengine.js

@@ -3,8 +3,6 @@
  * For licensing, see LICENSE.md.
  */
 
-/* bender-tags: link */
-
 import LinkEngine from '/ckeditor5/link/linkengine.js';
 import LinkCommand from '/ckeditor5/link/linkcommand.js';
 import UnlinkCommand from '/ckeditor5/link/unlinkcommand.js';

+ 0 - 2
packages/ckeditor5-link/tests/unlinkcommand.js

@@ -3,8 +3,6 @@
  * For licensing, see LICENSE.md.
  */
 
-/* bender-tags: link */
-
 import ModelTestEditor from '/tests/core/_utils/modeltesteditor.js';
 import UnlinkCommand from '/ckeditor5/link/unlinkcommand.js';
 import { setData, getData } from '/tests/engine/_utils/model.js';