Skip to content

Commit

Permalink
docs: deprecated quill-view-html
Browse files Browse the repository at this point in the history
  • Loading branch information
KillerCodeMonkey committed Jul 3, 2024
1 parent bd1fc88 commit 6d01b49
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -457,14 +457,15 @@ As a helper `ngx-quill` provides a component where you can pass many options of
<quill-view [content]="content" format="text" theme="snow"></quill-view>
```

### 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.

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
<div class="ql-container ql-snow" style="border-width: 0;">
Expand Down

0 comments on commit 6d01b49

Please sign in to comment.