diff --git a/src/lib/modules/menu/floating-menu/floating-menu.component.ts b/src/lib/modules/menu/floating-menu/floating-menu.component.ts index 89f21d90..f69f94b2 100644 --- a/src/lib/modules/menu/floating-menu/floating-menu.component.ts +++ b/src/lib/modules/menu/floating-menu/floating-menu.component.ts @@ -156,6 +156,10 @@ export class FloatingMenuComponent implements OnInit, OnDestroy { } ngOnInit(): void { + if (!this.editor) { + throw new Error('NgxEditor: Required editor instance'); + } + this.updateSubscription = this.editor.update .subscribe((view) => { this.update(view);