quill-blot-formatter icon indicating copy to clipboard operation
quill-blot-formatter copied to clipboard

Quill 2 Support

Open saulfrr opened this issue 11 months ago • 10 comments

Hi, now that Quill Version 2.0.0-rc.2 is there, do you have plans to support it?

npm ERR! Could not resolve dependency:
npm ERR! peer quill@"^1.3.4" from [email protected]
npm ERR! node_modules/quill-blot-formatter
npm ERR! quill-blot-formatter@"*" from the root project

Thanks.

saulfrr avatar Mar 08 '24 09:03 saulfrr

This fork works fine with Quill Version 2: https://github.com/juandjara/quill-blot-formatter-mobile

To avoid type errors, make sure to register it with as any: Quill.register('modules/blotFormatter', BlotFormatter as any);

LukasKlement avatar Mar 10 '24 10:03 LukasKlement

@saulfrr you can add an override to package.json:

  "overrides": {
    "quill-blot-formatter": {
      "quill": "^2.0.0"
    }
  },

adgoncal avatar Apr 30 '24 17:04 adgoncal

Thanks, can you open a PR with support for 2.0

@saulfrr you can add an override to package.json:

  "overrides": {
    "quill-blot-formatter": {
      "quill": "^2.0.0"
    }
  },

xwiz avatar May 23 '24 15:05 xwiz

Overriding the quill version doesn't make it compatible unfortunately. Quill 2 has a very different methodology for applying styles.

The resizing still works fine, but the alignments (found in actions/align/DefaultAligner.js) need updating to the new syntax. Currently, these do not get written to the delta.

enzedonline avatar Jun 23 '24 00:06 enzedonline

I have a working version here. It's converted to TypeScript and uses custom Quill formats to apply the alignments.

2024-06-28-162544-ezgif com-optimize

Feel free to clone etc if it's useful to you.

enzedonline avatar Jun 28 '24 05:06 enzedonline