Browse Source

Docs: Brought back the textContent extension to the Template#apply() API docs. [skip ci]

Aleksander Nowodzinski 6 years ago
parent
commit
9d23f445f0
1 changed files with 9 additions and 4 deletions
  1. 9 4
      packages/ckeditor5-ui/src/template.js

+ 9 - 4
packages/ckeditor5-ui/src/template.js

@@ -147,9 +147,11 @@ export default class Template {
 	/**
 	 * Applies the template to an existing DOM Node, either HTML element or text.
 	 *
-	 * **Note:** No new DOM nodes will be created. Applying extends
-	 * {@link module:ui/template~TemplateDefinition attributes} and
-	 * {@link module:ui/template~TemplateDefinition event listeners} only.
+	 * **Note:** No new DOM nodes will be created. Applying extends:
+	 *
+	 * {@link module:ui/template~TemplateDefinition attributes},
+	 * {@link module:ui/template~TemplateDefinition event listeners}, and
+	 * `textContent` of {@link module:ui/template~TemplateDefinition children} only.
 	 *
 	 * **Note:** Existing `class` and `style` attributes are extended when a template
 	 * is applied to an HTML element, while other attributes and `textContent` are overridden.
@@ -169,7 +171,10 @@ export default class Template {
 	 *			},
 	 *			on: {
 	 *				click: bind( 'elementClicked' ) // Will be fired by the observable.
-	 *			}
+	 *			},
+	 *			children: [
+	 *				'Div text.'
+	 *			]
 	 *		} ).apply( element );
 	 *
 	 *		console.log( element.outerHTML ); // -> '<div id="first-div" class="my-div"></div>'