Open amirhosein5858 opened 2 years ago
Can you please provide more information? Example code? The versions of the libraries you are using?
We were experiencing the same issue after an angular upgrade (and all related packages). Current versions:
package-lock
...
"@angular/common": "13.3.11",
"@angular/compiler": "13.3.11",
"@angular/core": "13.3.11",
...
"ngx-quill": "16.2.1",
"quill": "1.3.7",
"quill-image-compress": "1.2.26",
What eventually solved this issue for us was to change the way we loaded the plugin.
In our component.ts we loaded the imageCompressor instead of the ImageCompress this way:
import { imageCompressor } from 'quill-image-compress';
We then put that in a public variable:
imageCompressImplementation = imageCompressor;
And registered the plugin in the html like so:
<quill-editor
id="editor"
#editor
sanitize="true"
placeholder=""
class="mat-form-field"
[modules]="modules"
[customModules]="[{path: 'modules/imageCompress', implementation: imageCompressImplementation}]"
></quill-editor>
Our modules are defined as follow in the ts file:
modules: any = {
toolbar: [
['bold', 'italic', 'underline'],
['link', 'image'],
[{ 'list': 'ordered' }, { 'list': 'bullet' }],
],
imageCompress: {
quality: 0.7, // default
maxWidth: 1024, // default
maxHeight: 1024, // default
imageType: 'image/jpeg', // default
debug: false, // default
},
};
Try version quill-image-compress@1.2.28
might of been fixed by https://github.com/benwinding/quill-image-compress/commit/7f1ebda29594934c8b0579a5cd6d4d4101728019
hi,i cant use this library with ngx-quill! could you help me please ?