kensnyder / quill-image-resize-module

A module for Quill rich text editor to allow images to be resized.
MIT License
467 stars 468 forks source link

Module is broken using Quill 1.3.6 #114

Closed JuanCrg90 closed 4 years ago

JuanCrg90 commented 4 years ago

Hi, I've Tried to use the module using Quill 1.3.6 and I got the following error:

Uncaught TypeError: e is not a constructor
    at e.value (quill.min.js:11481)
    at e.value (quill.min.js:11481)
    at quill.min.js:11481
    at Array.forEach (<anonymous>)

Here is the code that I used for my Test

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Quill Image Resize Module Demo</title>
    <script src="//cdn.quilljs.com/1.3.6/quill.min.js"></script>
    <link href="//cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">
    <script src="../image-resize.js"></script>
</head>

<body>
<h1>Quill Image Resize Module Demo</h1>
<div id="editor" style="max-height:500px;overflow:auto">
    <p>Click on the Image Below to resize</p>
    <p><img src="https://nick-intl.mtvnimages.com/uri/mgid:file:docroot:nick.com:/nick-assets/shows/images/jimmy-neutron/characters/character_large_332x363_jimmy.jpg"></p>
    <p>Some initial <strong>bold</strong> text</p>
    <p><img src="http://ri-sandbox.s3.amazonaws.com/pi-rate.png"></p>
</div>
<p>Also see <a href="https://github.com/kensnyder/quill-image-drop-module">quill-image-drop-module</a>,
    a module that enables copy-paste and drag/drop for Quill.</p>
<script src="script.js"></script>
</body>

</html>
JuanCrg90 commented 4 years ago

Nevermind I didn't specified the protocol to the CDNs

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Quill Image Resize Module Demo</title>
    <script src="https://cdn.quilljs.com/1.3.6/quill.min.js"></script>
    <link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">
    <script src="../image-resize.js"></script>
</head>

<body>
<h1>Quill Image Resize Module Demo</h1>
<div id="editor" style="max-height:500px;overflow:auto">
    <p>Click on the Image Below to resize</p>
    <p><img src="https://nick-intl.mtvnimages.com/uri/mgid:file:docroot:nick.com:/nick-assets/shows/images/jimmy-neutron/characters/character_large_332x363_jimmy.jpg"></p>
    <p>Some initial <strong>bold</strong> text</p>
    <p><img src="http://ri-sandbox.s3.amazonaws.com/pi-rate.png"></p>
</div>
<p>Also see <a href="https://github.com/kensnyder/quill-image-drop-module">quill-image-drop-module</a>,
    a module that enables copy-paste and drag/drop for Quill.</p>
<script src="script.js"></script>
</body>

</html>