KillerCodeMonkey / ngx-quill

Angular (>=2) components for the Quill Rich Text Editor
MIT License
1.77k stars 258 forks source link

Support Quill 1 in Angular 18 #1858

Closed Sergiobop closed 3 months ago

Sergiobop commented 4 months ago

Hi!

First of all, thanks for this awesome package.

I'm still stuck on Quill v1 since i'm using the image-resize-module and i can't make it work in Quill 2. Any chance we can add support to Quill 1 + Angular 18? I think many people is still on v1.

The other way to go would be to use quill2 and make the image resize work, but i don't know how to do this or find any example working.

In the ngx-quill-example repo, you have one section titled: "Formula & image resize editor & Keybinding on 'b' and 'shift + b', CodeBlock + Syntax Highlighting", but i can't find the example with the image resize editor.

Can we add the example there? Thanks

KillerCodeMonkey commented 4 months ago

The chances are not that high. There is no official support for quill v1 anymore and some APIs quill v1 is using are deprecated a long time ago. See chrome js console when using quill v1. So in the future quill v1 will stop working in some major browsers anyway

Am 24. Mai 2024 10:39:16 MESZ schrieb Sergiobop @.***>:

Hi!

First of all, thanks for this awesome package.

I'm still stuck on Quill v1 since i'm using the image-resize-module and i can't make it work in Quill 2. Any chance we can add support to Quill 1 + Angular 18? I think many people is still on v1.

The other way to go would be to use quill2 and make the image resize work, but i don't know how to do this or find any example working.

In the ngx-quill-example repo, you have one section titled: "Formula & image resize editor & Keybinding on 'b' and 'shift + b', CodeBlock + Syntax Highlighting", but i can't find the example with the image resize editor.

Can we add the example there? Thanks

-- Reply to this email directly or view it on GitHub: https://github.com/KillerCodeMonkey/ngx-quill/issues/1858 You are receiving this because you are subscribed to this thread.

Message ID: @.***>

Sergiobop commented 4 months ago

I understand

Any chance you can add demo to the "Formula & image resize editor & Keybinding on 'b' and 'shift + b', CodeBlock + Syntax Highlighting", with the image resize working on Ngx-quill >= 26?

KillerCodeMonkey commented 3 months ago

Since the module is not supporting quill v2 I am not able to do it.

But you can try to Fork the image-resize module and make it compatible with v2.

Release a new package on your own or contact the maintainer to create pr for it

Am 25. Mai 2024 12:22:39 MESZ schrieb Sergiobop @.***>:

I understand

Any chance you can add demo to the "Formula & image resize editor & Keybinding on 'b' and 'shift + b', CodeBlock + Syntax Highlighting", with the image resize working on Ngx-quill >= 26?

-- Reply to this email directly or view it on GitHub: https://github.com/KillerCodeMonkey/ngx-quill/issues/1858#issuecomment-2131189967 You are receiving this because you commented.

Message ID: @.***>

KillerCodeMonkey commented 3 months ago

you can try to use an old version of ngx-quill supporting quill 1 and override the angular version in your package.json

Sergiobop commented 3 months ago

you can try to use an old version of ngx-quill supporting quill 1 and override the angular version in your package.json

I guess i can do that in the meantime, as a workaround.

I hope someone with more knowledge than me in Quill, update the image-resize module (or creates a new module) to work with Quill 2, but my expectations are not high. I think image resizing is one of the most popular Quill modules (if not the most) and it would be great to have it working in Quill 2.

I saw one package with image resize working in Quill 2, but only for react and not angular 😞 (https://github.com/ludejun/quill-react-commercial)

Thanks for your fast response

KillerCodeMonkey commented 3 months ago

you can try https://github.com/KillerCodeMonkey/quill-image-resizor i have not tried it with ngx-quill, but it is working with native quill v2

KillerCodeMonkey commented 3 months ago

i added an example usage to the ngx-quill-example-repo.

if i have time i may migrate the package to ts to get some typings. for now you have to do the following:

  1. add quill.js to the scripts sections in your angular.json
  2. add quill-image-resizor.d.ts to your project and declare the module to be able to import it
  3. and then import it and register it -> see https://github.com/KillerCodeMonkey/ngx-quill-example/blob/master/src/app/components/formula/formula.component.ts#L7
KillerCodeMonkey commented 3 months ago

i released v1.1.0 where you have now some typings for the modules, so you do not need to create a custom .d.ts file for it