{"_id":"@elmeet/quill-img-resize-module","name":"@elmeet/quill-img-resize-module","dist-tags":{"latest":"4.0.2"},"versions":{"4.0.2":{"name":"@elmeet/quill-img-resize-module","version":"4.0.2","description":"A module for Quill rich text editor to allow images to be resized.","main":"image-resize.min.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","release":"webpack","dev":"webpack --watch","lint":"eslint --ext js,es6 src","fixlint":"eslint --fix --ext js,es6 src"},"author":{"name":"@kensnyder"},"contributors":[{"name":"Wikia","url":"https://github.com/Wikia"}],"license":"MIT","gitHead":"27f4043d0e64a759ac3a4a42a42e1ecfaa361573","_id":"@elmeet/quill-img-resize-module@4.0.2","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-6jnCHUYmUbAOulYYK0A0A+RuBo51IiLlT2vTpVqpU+oKOODTAQw76uvDChgrY9cCLnSzzS7GuB4dMmRZtTalPA==","shasum":"ed7f4566e496a15c99771cd5e520e6bdeb7e3e99","tarball":"https://registry.npmjs.org/@elmeet/quill-img-resize-module/-/quill-img-resize-module-4.0.2.tgz","fileCount":17,"unpackedSize":58074,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCsOLr+Yi1OfhYlGx2pC/QUjbeZLNA3Of3TwIU4MGXmPwIgNyPDVJW/33oxi2BKdchN+E4zD/9WXKtIA2f3ldmbQCo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJilycsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpAPg//ROem/1Wjyzno3YmJ9APHC+NtmZd0vdN9MmbTb1kRDLfz9IbB\r\nCcuvWEa8pzQgCMP4tC/3Xe445EEhq37ixxqKpU/4BanA5TVExtGZuRdlU8my\r\nQSOYes1g5VKBx/CVN5wg+1SLZfn0gsv0D7+wCdalurwl9jr/NESOk15eFsQ7\r\ndgAmaWtvu0dGd6YHnYeLTXOI3e01KlKz5Wm7N6MboJ4BZOJE+PzWB1J2SGLc\r\nz5n/G4B38OfloBZW8T6vA7GJSrQN9lRGyW+vSXZfXSO8AK8Yx4b4R4+GKsZx\r\n+ScVweOCcc8y6cX4nnH20pCiLh8LvT/HWypJ6ccvB40mgReGp9vBjAnspSNb\r\nmr6cKBZ1vgKy81mRmiVAZnfwgHAvAka8PQOds9OYVGvDTDBXURsTbP05NlS5\r\n/qDwKl6/O6O1q81tHnS+jDi14smAcoqEUl4L6Iv80bw4zLffYurfvlMfTdmV\r\ndYOqAxxBRftKAGmO3OJE4ikc3jV4QsaYQyoBsmmzdH2DnuU6KMoCLI5W/mR1\r\nTARbJZJ4EaxvVLj2mGqpYTaibwzMogVh97WOI9/W/GHjK+zQIcBn+eLLn5jM\r\nRB/hIgLgUo0+CTUkhlP4FtSUQFU0C/p8+64+IxZRrDCfDayrWET+FdUCzj2t\r\ns4uEKnCDmRN6qcC4PbXkNlgxoPCAmugZD6k=\r\n=QNUJ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"elmeet","email":"elmeet0@gmail.com"},"directories":{},"maintainers":[{"name":"elmeet","email":"elmeet0@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quill-img-resize-module_4.0.2_1654073132520_0.9166415503292205"},"_hasShrinkwrap":false}},"time":{"created":"2022-06-01T08:45:32.467Z","4.0.2":"2022-06-01T08:45:32.686Z","modified":"2022-06-01T08:45:32.835Z"},"maintainers":[{"name":"elmeet","email":"elmeet0@gmail.com"}],"description":"A module for Quill rich text editor to allow images to be resized.","contributors":[{"name":"Wikia","url":"https://github.com/Wikia"}],"author":{"name":"@kensnyder"},"license":"MIT","readme":"# Quill ImageResize Module\n\nA module for Quill rich text editor to allow images to be resized.\n\nAlso see [quill-image-drop-module](https://github.com/kensnyder/quill-image-drop-module),\na module that enables copy-paste and drag/drop for Quill.\n\n## Demo\n\n[Plunker](https://plnkr.co/edit/gq708AOrSBOWSlHcFslG?p=preview)\n\n## Usage\n\n### Webpack/ES6\n\n```javascript\nimport Quill from \"quill\";\nimport { ImageResize } from \"quill-image-resize-module\";\n\nQuill.register(\"modules/imageResize\", ImageResize);\n\nconst quill = new Quill(editor, {\n\t// ...\n\tmodules: {\n\t\t// ...\n\t\timageResize: {\n\t\t\t// See optional \"config\" below\n\t\t},\n\t},\n});\n```\n\n### Script Tag\n\nCopy image-resize.min.js into your web root or include from node_modules\n\n```html\n<script src=\"/node_modules/quill-image-resize-module/image-resize.min.js\"></script>\n```\n\n```javascript\nvar quill = new Quill(editor, {\n\t// ...\n\tmodules: {\n\t\t// ...\n\t\tImageResize: {\n\t\t\t// See optional \"config\" below\n\t\t},\n\t},\n});\n```\n\n### Config\n\nFor the default experience, pass an empty object, like so:\n\n```javascript\nvar quill = new Quill(editor, {\n\t// ...\n\tmodules: {\n\t\t// ...\n\t\tImageResize: {},\n\t},\n});\n```\n\nFunctionality is broken down into modules, which can be mixed and matched as you like. For example,\nthe default is to include all modules:\n\n```javascript\nconst quill = new Quill(editor, {\n\t// ...\n\tmodules: {\n\t\t// ...\n\t\tImageResize: {\n\t\t\tmodules: [\"Resize\", \"DisplaySize\", \"Toolbar\"],\n\t\t},\n\t},\n});\n```\n\nEach module is described below.\n\n#### `Resize` - Resize the image\n\nAdds handles to the image's corners which can be dragged with the mouse to resize the image.\n\nThe look and feel can be controlled with options:\n\n```javascript\nvar quill = new Quill(editor, {\n\t// ...\n\tmodules: {\n\t\t// ...\n\t\tImageResize: {\n\t\t\t// ...\n\t\t\thandleStyles: {\n\t\t\t\tbackgroundColor: \"black\",\n\t\t\t\tborder: \"none\",\n\t\t\t\tcolor: white,\n\t\t\t\t// other camelCase styles for size display\n\t\t\t},\n\t\t},\n\t},\n});\n```\n\n#### `DisplaySize` - Display pixel size\n\nShows the size of the image in pixels near the bottom right of the image.\n\nThe look and feel can be controlled with options:\n\n```javascript\nvar quill = new Quill(editor, {\n\t// ...\n\tmodules: {\n\t\t// ...\n\t\tImageResize: {\n\t\t\t// ...\n\t\t\tdisplayStyles: {\n\t\t\t\tbackgroundColor: \"black\",\n\t\t\t\tborder: \"none\",\n\t\t\t\tcolor: white,\n\t\t\t\t// other camelCase styles for size display\n\t\t\t},\n\t\t},\n\t},\n});\n```\n\n#### `Toolbar` - Image alignment tools\n\nDisplays a toolbar below the image, where the user can select an alignment for the image.\n\nThe look and feel can be controlled with options:\n\n```javascript\nvar quill = new Quill(editor, {\n\t// ...\n\tmodules: {\n\t\t// ...\n\t\tImageResize: {\n\t\t\t// ...\n\t\t\ttoolbarStyles: {\n\t\t\t\tbackgroundColor: \"black\",\n\t\t\t\tborder: \"none\",\n\t\t\t\tcolor: white,\n\t\t\t\t// other camelCase styles for size display\n\t\t\t},\n\t\t\ttoolbarButtonStyles: {\n\t\t\t\t// ...\n\t\t\t},\n\t\t\ttoolbarButtonSvgStyles: {\n\t\t\t\t// ...\n\t\t\t},\n\t\t},\n\t},\n});\n```\n\n#### `BaseModule` - Include your own custom module\n\nYou can write your own module by extending the `BaseModule` class, and then including it in\nthe module setup.\n\nFor example,\n\n```javascript\nimport { Resize, BaseModule } from \"quill-image-resize-module\";\n\nclass MyModule extends BaseModule {\n\t// See src/modules/BaseModule.js for documentation on the various lifecycle callbacks\n}\n\nvar quill = new Quill(editor, {\n\t// ...\n\tmodules: {\n\t\t// ...\n\t\tImageResize: {\n\t\t\tmodules: [MyModule, Resize],\n\t\t\t// ...\n\t\t},\n\t},\n});\n```\n\n## change log\n\n2021.4.26\n增加 mousemove 后修正拖拽框位置","readmeFilename":"README.md"}