From 7936e1251979cbe18283a8d116656691d0c94af3 Mon Sep 17 00:00:00 2001 From: devflow Date: Tue, 14 Oct 2025 13:52:09 +0900 Subject: [PATCH] Fixed the editor was not properly destroyed. --- projects/library/src/editor/editor.directive.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/library/src/editor/editor.directive.ts b/projects/library/src/editor/editor.directive.ts index d239c04..0eb3233 100644 --- a/projects/library/src/editor/editor.directive.ts +++ b/projects/library/src/editor/editor.directive.ts @@ -1,5 +1,5 @@ import { ControlValueAccessor, NG_VALUE_ACCESSOR } from "@angular/forms"; -import { Directive, ElementRef, EventEmitter, forwardRef, Input, NgZone, Output, PLATFORM_ID, Inject } from '@angular/core'; +import { Directive, ElementRef, EventEmitter, forwardRef, Input, NgZone, Output, PLATFORM_ID, Inject, OnDestroy } from '@angular/core'; import { isPlatformBrowser } from "@angular/common"; @Directive({ @@ -14,7 +14,7 @@ import { isPlatformBrowser } from "@angular/common"; ], standalone: false }) -export class FroalaEditorDirective implements ControlValueAccessor { +export class FroalaEditorDirective implements ControlValueAccessor, OnDestroy { // editor options private _opts: any = {