8
0
Просмотр исходного кода

Added docs for _createBalloonPanel method in Link Feature.

Aleksander Nowodzinski 9 лет назад
Родитель
Сommit
7cd7511e46
1 измененных файлов с 34 добавлено и 0 удалено
  1. 34 0
      packages/ckeditor5-link/src/link.js

+ 34 - 0
packages/ckeditor5-link/src/link.js

@@ -62,6 +62,40 @@ export default class Link extends Feature {
 		editor.ui.featureComponents.add( 'link', ButtonController, ButtonView, buttonModel );
 		editor.ui.featureComponents.add( 'link', ButtonController, ButtonView, buttonModel );
 	}
 	}
 
 
+	/**
+	 *	                       +------------------------------------+
+	 *	                       | <a href="http://foo.com">[foo]</a> |
+	 *	                       +------------------------------------+
+	 *	                                      Document
+	 *	             Value set in doc   ^                   +
+	 *	             if it's correct.   |                   |
+	 *	                                |                   |
+	 *	                      +---------+--------+          |
+	 *	Panel.urlInput#value  | Value validation |          |  User clicked "Link" in
+	 *	       is validated.  +---------+--------+          |  the toolbar. Retrieving
+	 *	                                |                   |  URL from Document and setting
+	 *	             PanelModel fires   |                   |  PanelModel#url.
+	 *	          PanelModel#execute.   +                   v
+	 *
+	 *	                              +-----------------------+
+	 *	                              | url: 'http://foo.com' |
+	 *	                              +-----------------------+
+	 *	                                      PanelModel
+	 *	                                ^                   +
+	 *	                                |                   |  Input field is
+	 *	                  User clicked  |                   |  in sync with
+	 *	                       "Save".  |                   |  PanelModel#url.
+	 *	                                +                   v
+	 *
+	 *	                            +--------------------------+
+	 *	                            | +----------------------+ |
+	 *	                            | |http://foo.com        | |
+	 *	                            | +----------------------+ |
+	 *	                            |                   +----+ |
+	 *	                            |                   |Save| |
+	 *	                            |                   +----+ |
+	 *	                            +--------------------------+
+	 */
 	_createBalloonPanel() {
 	_createBalloonPanel() {
 		const editor = this.editor;
 		const editor = this.editor;
 		const t = editor.t;
 		const t = editor.t;