Skip to content

Commit bb87f1c

Browse files
committed
Add support for CKEditor 46.x
1 parent 65bffd0 commit bb87f1c

File tree

4 files changed

+2775
-1852
lines changed

4 files changed

+2775
-1852
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
"@ckeditor/ckeditor5-dev-utils": "^49.0.0",
4545
"@types/jasminewd2": "^2.0.10",
4646
"@types/node": "^14.11.8",
47-
"ckeditor5": "^44.3.0",
48-
"ckeditor5-premium-features": "^44.3.0",
47+
"ckeditor5": "^46.0.0-alpha.0",
48+
"ckeditor5-premium-features": "^46.0.0-alpha.0",
4949
"coveralls": "^3.1.1",
5050
"css-loader": "^5.2.7",
5151
"cypress": "^12.17.4",

src/ckeditor/ckeditor.component.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ import type {
2828
Editor,
2929
EditorConfig,
3030
GetEventInfo,
31-
DocumentChangeEvent,
32-
EditorCreatorFunction,
31+
ModelDocumentChangeEvent,
32+
EditorWatchdogCreatorFunction,
3333
ViewDocumentBlurEvent,
3434
ViewDocumentFocusEvent
3535
} from 'ckeditor5';
@@ -51,7 +51,7 @@ export interface FocusEvent<TEditor extends Editor = Editor> {
5151
}
5252

5353
export interface ChangeEvent<TEditor extends Editor = Editor> {
54-
event: GetEventInfo<DocumentChangeEvent>;
54+
event: GetEventInfo<ModelDocumentChangeEvent>;
5555
editor: TEditor;
5656
}
5757

@@ -358,7 +358,7 @@ export class CKEditorComponent<TEditor extends Editor = Editor> implements After
358358
*/
359359
private attachToWatchdog() {
360360
// TODO: elementOrData parameter type can be simplified to HTMLElemen after templated Watchdog will be released.
361-
const creator: EditorCreatorFunction<TEditor> = ( ( elementOrData, config ) => {
361+
const creator: EditorWatchdogCreatorFunction<TEditor> = ( ( elementOrData, config ) => {
362362
return this.ngZone.runOutsideAngular( async () => {
363363
this.elementRef.nativeElement.appendChild( elementOrData as HTMLElement );
364364

@@ -467,7 +467,7 @@ export class CKEditorComponent<TEditor extends Editor = Editor> implements After
467467
const modelDocument = editor.model.document;
468468
const viewDocument = editor.editing.view.document;
469469

470-
modelDocument.on<DocumentChangeEvent>( 'change:data', evt => {
470+
modelDocument.on<ModelDocumentChangeEvent>( 'change:data', evt => {
471471
this.ngZone.run( () => {
472472
if ( this.disableTwoWayDataBinding ) {
473473
return;

src/ckeditor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@angular/core": ">=16.0.0",
2626
"@angular/common": ">=16.0.0",
2727
"@angular/forms": ">=16.0.0",
28-
"ckeditor5": ">=42.0.0 || ^0.0.0-nightly",
28+
"ckeditor5": ">=46.0.0-alpha.0 || ^0.0.0-nightly",
2929
"rxjs": ">=6.0.0"
3030
},
3131
"author": "CKSource (http://cksource.com/)",

0 commit comments

Comments
 (0)