浏览代码

Docs: Wrapped a snippet in the code block. Closes #1834.

Kamil Piechaczek 6 年之前
父节点
当前提交
475d1f43f2
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      docs/builds/guides/integration/basic-api.md

+ 2 - 0
docs/builds/guides/integration/basic-api.md

@@ -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.