Skip to content

Commit

Permalink
Docs: Updated documentation to the UI View#render API (see ckeditor/c…
Browse files Browse the repository at this point in the history
…keditor5-ui#262).
  • Loading branch information
oleq committed Nov 2, 2017
2 parents 970be95 + ef71bd0 commit 18b0d07
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/framework/guides/architecture/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ class SampleInputView extends View {
placeholder: ''
} );

this.template = new Template( {
this.setTemplate( {
tag: 'input',
attributes: {
class: [
Expand Down Expand Up @@ -422,7 +422,7 @@ class ParentView extends View {
const childA = new SampleInputView( locale );
const childB = new SampleInputView( locale );

this.template = new Template( {
this.setTemplate( {
tag: 'div',
children: [
childA
Expand All @@ -434,18 +434,18 @@ class ParentView extends View {

const parent = new ParentView( locale );

parent.init();
parent.render();

// Will insert <div><input .. /><input .. /></div>.
document.body.appendChild( parent.element );
```

It is also possible to create standalone views that do not belong to any collection. They must be {@link module:ui/view~View#init initialized} before injection into DOM:
It is also possible to create standalone views that do not belong to any collection. They must be {@link module:ui/view~View#render rendered} before injection into DOM:

```js
const view = new SampleInputView( locale );

view.init();
view.render();

// Will insert <input class="foo" type="text" placeholder="" />
document.body.appendChild( view.element );
Expand Down Expand Up @@ -625,7 +625,7 @@ toolbar.items.add( buttonBar );
The toolbar can now join the [UI tree](##View-collections-and-the-UI-tree) or it can be injected straight into DOM. To keep the example simple, proceed with the latter scenario:

```js
toolbar.init();
toolbar.render();

document.body.appendChild( toolbar.element );
```
Expand Down

0 comments on commit 18b0d07

Please sign in to comment.