Skip to content

Commit

Permalink
Docs: Wrapped a snippet in the code block. Closes #1834.
Browse files Browse the repository at this point in the history
  • Loading branch information
pomek committed Jul 11, 2019
1 parent a10194c commit 475d1f4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/builds/guides/integration/basic-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,11 @@ Once destroyed, resources used by the editor instance are released and the origi

{@link module:engine/model/document~Document#change:data `Document#change:data`}.

```js
editor.model.document.on( 'change:data', () => {
console.log( 'The data has changed!' );
} );
```

This event is fired when the document changes in such a way which is "visible" in the editor data. There is also a group of changes, like selection position changes, marker changes which do not affect the result of `editor.getData()`. To listen to all these changes, you can use a wider {@link module:engine/model/document~Document#change `Document#change`} event.

Expand Down

0 comments on commit 475d1f4

Please sign in to comment.