|
|
@@ -45,10 +45,10 @@ class App extends Component {
|
|
|
const data = editor.getData();
|
|
|
console.log( { event, editor, data } );
|
|
|
} }
|
|
|
- onBlur={ editor => {
|
|
|
+ onBlur={ ( event, editor ) => {
|
|
|
console.log( 'Blur.', editor );
|
|
|
} }
|
|
|
- onFocus={ editor => {
|
|
|
+ onFocus={ ( event, editor ) => {
|
|
|
console.log( 'Focus.', editor );
|
|
|
} }
|
|
|
/>
|
|
|
@@ -67,16 +67,16 @@ The `<CKEditor>` component supports the following properties:
|
|
|
* `editor` (required) – The {@link module:core/editor/editor~Editor `Editor`} constructor to use.
|
|
|
* `data` – The initial data for the created editor. See the {@link builds/guides/integration/basic-api#interacting-with-the-editor Basic API} guide.
|
|
|
* `config` – The editor configuration. See the {@link builds/guides/integration/configuration Configuration} guide.
|
|
|
+* `onInit` – A function called when the editor was initialized. It receives the initialized {@link module:core/editor/editor~Editor `editor`} as a parameter.
|
|
|
+* `disabled` – A boolean. The {@link module:core/editor/editor~Editor `editor`} is being switched to read-only mode if the property is set to `true`.
|
|
|
* `onChange` – A function called when the editor's data has changed. See the {@link module:engine/model/document~Document#event:change:data `editor.model.document#change:data`} event.
|
|
|
+* `onBlur` – A function called when the editor was blurred. See the {@link module:engine/view/document~Document#event:blur `editor.editing.view.document#blur`} event.
|
|
|
+* `onFocus` – A function called when the editor was focused. See the {@link module:engine/view/document~Document#event:focus `editor.editing.view.document#focus`} event.
|
|
|
|
|
|
- The callback receives two parameters:
|
|
|
+The editor events callbacks (`onChange`, `onBlur`, `onFocus`) receive two parameters:
|
|
|
|
|
|
- 1. An {@link module:utils/eventinfo~EventInfo `EventInfo`} object,
|
|
|
- 2. An {@link module:core/editor/editor~Editor `Editor`} instance.
|
|
|
-* `onInit` – A function called when the editor was initialized. It receives the initialized {@link module:core/editor/editor~Editor `editor`} as a parameter.
|
|
|
-* `onBlur` – A function called when the editor was blurred. It receives the blurred {@link module:core/editor/editor~Editor `editor`} as a parameter.
|
|
|
-* `onFocus` – A function called when the editor was focused. It receives the focused {@link module:core/editor/editor~Editor `editor`} as a parameter.
|
|
|
-* `disabled` – A boolean. The {@link module:core/editor/editor~Editor `editor`} is being switched to read-only mode if the property is set to `true`.
|
|
|
+1. An {@link module:utils/eventinfo~EventInfo `EventInfo`} object,
|
|
|
+2. An {@link module:core/editor/editor~Editor `Editor`} instance.
|
|
|
|
|
|
### Customizing the builds
|
|
|
|
|
|
@@ -312,10 +312,10 @@ class App extends Component {
|
|
|
const data = editor.getData();
|
|
|
console.log( { event, editor, data } );
|
|
|
} }
|
|
|
- onBlur={ editor => {
|
|
|
+ onBlur={ ( event, editor ) => {
|
|
|
console.log( 'Blur.', editor );
|
|
|
} }
|
|
|
- onFocus={ editor => {
|
|
|
+ onFocus={ ( event, editor ) => {
|
|
|
console.log( 'Focus.', editor );
|
|
|
} }
|
|
|
/>
|