From bd1fc888972510af7a3418b642adeb6894a3b781 Mon Sep 17 00:00:00 2001 From: an-bss <167220757+an-bss@users.noreply.github.com> Date: Wed, 3 Jul 2024 14:09:04 +0200 Subject: [PATCH 1/3] Fix global sanitize property from the quill service (#1889) fix #1887 Co-authored-by: alex --- projects/ngx-quill/src/lib/quill-editor.component.ts | 2 +- projects/ngx-quill/src/lib/quill-view-html.component.ts | 2 +- projects/ngx-quill/src/lib/quill-view.component.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/ngx-quill/src/lib/quill-editor.component.ts b/projects/ngx-quill/src/lib/quill-editor.component.ts index f567864d..dfaf1975 100644 --- a/projects/ngx-quill/src/lib/quill-editor.component.ts +++ b/projects/ngx-quill/src/lib/quill-editor.component.ts @@ -93,7 +93,7 @@ export abstract class QuillEditorBase implements AfterViewInit, ControlValueAcce readonly required = input(false) readonly formats = input(undefined) readonly customToolbarPosition = input<'top' | 'bottom'>('top') - readonly sanitize = input(false) + readonly sanitize = input(undefined) readonly beforeRender = input<() => Promise | undefined>(undefined) readonly styles = input(null) readonly registry = input( diff --git a/projects/ngx-quill/src/lib/quill-view-html.component.ts b/projects/ngx-quill/src/lib/quill-view-html.component.ts index cec70784..3beed1aa 100644 --- a/projects/ngx-quill/src/lib/quill-view-html.component.ts +++ b/projects/ngx-quill/src/lib/quill-view-html.component.ts @@ -31,7 +31,7 @@ import { NgClass } from '@angular/common' export class QuillViewHTMLComponent implements OnChanges { readonly content = input('') readonly theme = input(undefined) - readonly sanitize = input(false) + readonly sanitize = input(undefined) readonly innerHTML = signal('') readonly themeClass = signal('ql-snow') diff --git a/projects/ngx-quill/src/lib/quill-view.component.ts b/projects/ngx-quill/src/lib/quill-view.component.ts index 7c4e65db..9f283477 100644 --- a/projects/ngx-quill/src/lib/quill-view.component.ts +++ b/projects/ngx-quill/src/lib/quill-view.component.ts @@ -52,7 +52,7 @@ export class QuillViewComponent implements AfterViewInit, OnChanges, OnDestroy { readonly modules = input(undefined) readonly debug = input<'warn' | 'log' | 'error' | false>(false) readonly formats = input(undefined) - readonly sanitize = input(false) + readonly sanitize = input(undefined) readonly beforeRender = input<() => Promise | undefined>(undefined) readonly strict = input(true) readonly content = input() From 6d01b49552d8ee538489832b31e3a6bf02d5d9a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bengt=20Wei=C3=9Fe?= Date: Wed, 3 Jul 2024 15:32:28 +0200 Subject: [PATCH 2/3] docs: deprecated quill-view-html --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cbd09163..ed0d6912 100644 --- a/README.md +++ b/README.md @@ -457,7 +457,7 @@ As a helper `ngx-quill` provides a component where you can pass many options of ``` -### QuillViewHTMLComponent - Using angular [innerHTML] +### QuillViewHTMLComponent - Using angular [innerHTML] (DEPRECATED with quill v2) Most of you will use the `html` format (even it is not recommended). To render custom html with angular you should use the `[innerHTML]` attribute. @@ -465,6 +465,7 @@ But there are some pitfalls: 1. You need to have the quill css files loaded, when using classes and not inline styling (https://quilljs.com/guides/how-to-customize-quill/#class-vs-inline) 2. When using classes use a `div`-tag that has the `innerHTML` attribute and add the `ql-editor` class. Wrap your div in another `div`-tag with css classes `ql-container` and your theme, e.g. `ql-snow`.: +3. With quill v2 ngx-quill is using `quill.getSemanticHTML()` to get html content. There some list tag information are stripped. (https://github.com/slab/quill/issues/4103) (https://github.com/KillerCodeMonkey/ngx-quill/issues/1888) ```HTML
From a36667fcb2d520ba712663ba48b60e8f8e9d33a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bengt=20Wei=C3=9Fe?= Date: Wed, 3 Jul 2024 15:32:58 +0200 Subject: [PATCH 3/3] chore: bump version --- projects/ngx-quill/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/ngx-quill/package.json b/projects/ngx-quill/package.json index ffc6774c..1d65c9db 100644 --- a/projects/ngx-quill/package.json +++ b/projects/ngx-quill/package.json @@ -1,6 +1,6 @@ { "name": "ngx-quill", - "version": "26.0.4", + "version": "26.0.5", "license": "MIT", "author": { "name": "Bengt Weiße"