Register Image Resize using Angular 4
See original GitHub issueHello I’m trying to use image resize plugin inside angular 4 app.
i noticed that i should use a webpack and configure the webpack .config.js file in order to get rid of
Cannot read property ‘imports’ of undefined
so, i used the anulgar cli before i eject the webpack.config.js file using the following command: ng eject
this produced the webpack.config.js file, i tried to modify it by inserting the following code “Base on the following issue and comments”: https://github.com/kensnyder/quill-image-resize-module/issues/7#issuecomment-304463415
i successfully added this
{
test: /\.js$/,
exclude: /node_modules(?!\/quill-image-drop-module|quill-image-resize-module)/,
loader: 'babel-loader',
query: {...}
}
to the modules in webpack.config.js file.
and the i added this to the plugins:
new webpack.ProvidePlugin({
'window.Quill': 'quill'
})
but whenever i tried to build the app using
npm run build
it fails.
do you have any suggestions?
Issue Analytics
- State:
- Created 6 years ago
- Comments:12
Top Results From Across the Web
How to Resize Images in Angular in Real-time using ImageKit
A complete guide to help you with image resizing in Angular JS. Learn cropping strategies, overlaying techniques & more.
Read more >Ngx-Quill and ImageResize with Angular universal / SSR
register ('modules/imageResize', ImageResize);. However if I am running on npm run dev:ssr it wont work since the imports are not compatible with ......
Read more >Angular crop image, resize, zoom, flip and rotate feature ...
A guide to using ngx-image-cropper example in angular to add features such as cropping, resizing, zooming, flipping, and rotating images ...
Read more >Ngx-quill Image Resize With Easy Example Using Angular 9
Click on image and you can see some resizable component appeared, you can use those component to resize the image. resize image done....
Read more >Quill Example (forked) - StackBlitz
import { Component } from '@angular/core';. import ImageResize from. 'quill-image-resize-module'; ... Quill.register('modules/imageResize',. ImageResize);.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
People who are having difficulty using the quill image resize module with ANGULAR-CLI e ANGULAR 2+ Here’s a way to not have to tinker with the webpack.config.ts file
terminal
angular-cli.json
Componente.ts
Componente.html
<quill-editor [modules]="editor_modules" [(ngModel)]="content"></quill-editor>
It’s okay in the serve mode , This error occurs after the build !
Angular: 8.2.13