From 2d51af5cc63698ac5cff6b6101d55771108a8b3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bengt=20Wei=C3=9Fe?= Date: Thu, 20 Jun 2024 08:48:49 +0200 Subject: [PATCH] fix: typings registry, remove strict prop for quill view --- projects/ngx-quill/config/src/quill-editor.interfaces.ts | 5 ++--- projects/ngx-quill/src/lib/quill-editor.component.ts | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/ngx-quill/config/src/quill-editor.interfaces.ts b/projects/ngx-quill/config/src/quill-editor.interfaces.ts index aae8472f..4e3a6ab7 100644 --- a/projects/ngx-quill/config/src/quill-editor.interfaces.ts +++ b/projects/ngx-quill/config/src/quill-editor.interfaces.ts @@ -2,6 +2,7 @@ import { InjectionToken } from '@angular/core' import { defaultModules } from './quill-defaults' +import type { QuillOptions } from 'quill' export interface CustomOption { import: string @@ -76,10 +77,8 @@ export interface QuillConfig { modules?: QuillModules placeholder?: string readOnly?: boolean - registry?: Record // added in quill2 result of const registry = new Parchment.Registry(); - // scrollingContainer?: HTMLElement | string | null --> removed in quill2 + registry?: QuillOptions['registry'] // added in quill2 result of const registry = new Parchment.Registry(); theme?: string - // strict?: boolean --> removed in quill2 // Custom Config to track all changes or only changes by 'user' trackChanges?: 'user' | 'all' // provide default empty value diff --git a/projects/ngx-quill/src/lib/quill-editor.component.ts b/projects/ngx-quill/src/lib/quill-editor.component.ts index 8f965584..be71a578 100644 --- a/projects/ngx-quill/src/lib/quill-editor.component.ts +++ b/projects/ngx-quill/src/lib/quill-editor.component.ts @@ -3,6 +3,7 @@ import { DOCUMENT, isPlatformServer } from '@angular/common' import { DomSanitizer } from '@angular/platform-browser' import type QuillType from 'quill' +import type { QuillOptions } from 'quill' import type DeltaType from 'quill-delta' import { @@ -95,7 +96,7 @@ export abstract class QuillEditorBase implements AfterViewInit, ControlValueAcce readonly sanitize = input(false) readonly beforeRender = input<() => Promise | undefined>(undefined) readonly styles = input(null) - readonly registry = input | null | undefined>( + readonly registry = input( undefined ) readonly bounds = input(undefined)