Przeglądaj źródła

Added new properties to React guide.

Kamil Piechaczek 7 lat temu
rodzic
commit
c4bdf84924
1 zmienionych plików z 8 dodań i 0 usunięć
  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