浏览代码

Added new properties to React guide.

Kamil Piechaczek 7 年之前
父节点
当前提交
c4bdf84924
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      docs/builds/guides/frameworks/react.md

+ 8 - 0
docs/builds/guides/frameworks/react.md

@@ -55,6 +55,12 @@ class App extends Component {
                         const data = editor.getData();
                         console.log( { event, editor, data } );
                     } }
+                    onBlur={ editor => {
+                        console.log( 'Blur.', editor );
+                    } }
+                    onFocus={ editor => {
+                        console.log( 'Focus.', editor );
+                    } }
                 />
             </div>
         );
@@ -78,6 +84,8 @@ The `<CKEditor>` component supports the following properties:
 	1. An {@link module:utils/eventinfo~EventInfo `EventInfo`} object,
 	2. An {@link module:core/editor/editor~Editor `Editor`} instance.
 * `onInit` &ndash; A function called when the editor was initialized. It receives the initialized {@link module:core/editor/editor~Editor `editor`} as a parameter.
+* `onBlur` &ndash; A function called when the editor was blurred. It receives the blurred {@link module:core/editor/editor~Editor `editor`} as a parameter.
+* `onFocus` &ndash; A function called when the editor was focused. It receives the focused {@link module:core/editor/editor~Editor `editor`} as a parameter.
 
 ### Customizing the builds