ckeditor4-angular
ckeditor4-angular copied to clipboard
The editor ngModel is not updated when native spellchecking correction applied
Are you reporting a feature request or a bug?
Bug
Provide detailed reproduction steps (if any)
- Go to any CKEditor 4 Angular sample with native spellchecking enabled. I have tested it on our form sample.
- Type some incorrect test.
- Apply incorrect word correction via native context menu.
Expected result
Editor ngModel is updated and contains latest changes.
Actual result
Editor ngModel is not updated.

Other details
- Browser: Tested on Chrome
- OS: macOS
- Integration version:
1.0.0-beta.2 - CKEditor version: 4.12
- Installed CKEditor plugins: -
This is CKEditor 4 issue related to a fact that change event is not triggered by applying native grammar correction - https://github.com/ckeditor/ckeditor-dev/issues/2384.
The quick workaround for this issue would be to manually trigger change event as suggested in https://github.com/ckeditor/ckeditor-dev/issues/2384:
<ckeditor
[config]="{ disableNativeSpellChecker: false, on: { instanceReady: triggerChangeEvent } }">
</ckeditor>
were triggerChangeEvent should be defined as follows:
triggerChangeEvent( evt ) {
const editor = evt.editor;
editor.editable().$.addEventListener( 'input', function( evt ) {
if ( 'insertReplacementText' === evt.inputType ) {
editor.fire( 'change' );
}
} );
}