{"_id":"@chuyik/quill-blot-formatter","_rev":"4-d224f43dbef0f4ad407eee09b0b317ad","name":"@chuyik/quill-blot-formatter","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.4":{"name":"@chuyik/quill-blot-formatter","version":"1.0.4","description":"a module for the Quill text editor to allow blots to be reformatted. Built in formatters: resize and realign. Built in blot support: images and iframe videos.","main":"./dist/index.js","types":"./dist/index.d.ts","homepage":"https://github.com/Fandom-OSS/quill-blot-formatter","bugs":{"url":"https://github.com/Fandom-OSS/quill-blot-formatter/issues"},"contributors":[{"name":"Nelson Monterroso","email":"nmonterroso@users.noreply.github.com","url":"https://github.com/nmonterroso"}],"repository":{"type":"git","url":"git+https://github.com/Fandom-OSS/quill-blot-formatter.git"},"keywords":["quill","blot","image","resize"],"license":"Apache-2.0","dependencies":{"deepmerge":"^2.0.0"},"peerDependencies":{"quill":"^1.3.4"},"devDependencies":{"babel-cli":"^6.26.0","babel-eslint":"^8.0.1","babel-plugin-transform-class-properties":"^6.24.1","babel-preset-env":"^1.6.1","babel-preset-flow":"^6.23.0","copyfiles":"^1.2.0","eslint":"^4.9.0","eslint-config-airbnb-base":"^12.1.0","eslint-plugin-flowtype":"^2.39.1","eslint-plugin-import":"^2.7.0","flow-bin":"^0.57.3","flow-copy-source":"^1.2.1","npm-run-all":"^4.1.2","quill":"^1.3.4","rimraf":"^2.6.2","webpack":"^3.8.1"},"scripts":{"build":"yarn clean && yarn build:babel && yarn build:webpack && yarn build:copy-flow-source && yarn build:copy-ts-defs","build:babel":"babel src/ --out-dir dist","build:copy-flow-source":"flow-copy-source --verbose src dist","build:copy-ts-defs":"copyfiles index.d.ts dist","build:webpack":"webpack -p --progress --colors","clean":"rimraf dist","dev:babel":"babel --watch src/ --out-dir dist","dev:webpack":"yarn dev:delay && webpack --progress --colors --watch","dev:delay":"node -e \"setTimeout(() => {}, 3000)\"","prepublishOnly":"yarn build","start":"yarn clean && yarn npm-run-all --race --parallel dev:babel dev:webpack"},"gitHead":"cb19f95be4aa2be04862c7b461149c11dc67cdac","_id":"@chuyik/quill-blot-formatter@1.0.4","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-RRafiO4LH6hGxXtYNrmfHboHozjEmT6L66WM0dlYYH2qjB3rlvxtN4njJUulf0lLCXOGAt9YG3HouRHnj/mBJA==","shasum":"81ce4d67c17d08a123d1db54bd8fc3a98d20fb43","tarball":"https://registry.npmjs.org/@chuyik/quill-blot-formatter/-/quill-blot-formatter-1.0.4.tgz","fileCount":38,"unpackedSize":130249,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeltz/CRA9TVsSAnZWagAAgxYQAJ6WgxGlhde7zKC3tID1\nrZUzcqmtuDdIzqDedGQMUyIMT4WfRAgCywJUCDv6gz9pT2aKTmMcFQPt+tCn\nzSTK6W1qyxfQKv8tteus/6pD1I7+Y4nPO++RI7t1t2v2juBULhV/+Zv78+sr\n9+c5pSv28QEsXYHNOQaa8I7EwxEz9MaZarj6Q0kHREQJKbwAUfVcb3fgHWnk\noORKNvJAHO2Mwpt9+k12fejj9aiiFPaEI6viTYW7201l8nynrANlG28ldW/V\nYQL+Ok2eyGNlktHQkYomuM8zC4jE8kupWd4MyJdTiK3b9XCpFaaXOBMeJgGG\n0/ovn3fpdWatEpagQnh/Y+DoiN9rYgGN9w5qe0CP5gydHNHUiWxBzPuy3/ht\nPJiwcPzkFm3f6pxZcICq8o5HeKo87YVldyH3ddhSZXq5a39tK7vsYZ+LFfUy\nnaCSQiuGZ71QkfdUkhSI5RB2n3MR0qzEl1rOzfLsBeGdLyE+te//zTfHVM+D\nrCIsihl/dqlhWrOh6RA1Hpnt5sdrgiS/Q9h/BGePBX1DltDKnhXkicJNr+sh\n6BFjYazp0XLWgdspGtM3xZRNTNKUmHqleY+P13cXv1A8vorHl3aoiDkUy151\nt/Ks3lmEvL9aCCveajBwjmAfuvnYpaCEYpx3LrtE9cvhJFNsPEUxJnR/aWP9\ncjWR\r\n=n2aN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHGpdnSFrnZ2T8JznWION23HPqjHCFUVi5LkviWUGgjQIgcEjenmI/0MJ2aMsd5ZRhc69mTEuRQvfnscch6bC8HYw="}]},"maintainers":[{"name":"chuyik","email":"crazyzyt@gmail.com"}],"_npmUser":{"name":"chuyik","email":"crazyzyt@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quill-blot-formatter_1.0.4_1586945278961_0.7499788447180973"},"_hasShrinkwrap":false},"1.1.0":{"name":"@chuyik/quill-blot-formatter","version":"1.1.0","description":"a module for the Quill text editor to allow blots to be reformatted. Built in formatters: resize and realign. Built in blot support: images and iframe videos.","main":"./dist/index.js","types":"./dist/index.d.ts","homepage":"https://github.com/Fandom-OSS/quill-blot-formatter","bugs":{"url":"https://github.com/Fandom-OSS/quill-blot-formatter/issues"},"contributors":[{"name":"Nelson Monterroso","email":"nmonterroso@users.noreply.github.com","url":"https://github.com/nmonterroso"}],"repository":{"type":"git","url":"git+https://github.com/Fandom-OSS/quill-blot-formatter.git"},"keywords":["quill","blot","image","resize"],"license":"Apache-2.0","dependencies":{"deepmerge":"^2.0.0"},"peerDependencies":{"quill":"^1.3.4"},"devDependencies":{"babel-cli":"^6.26.0","babel-eslint":"^8.0.1","babel-plugin-transform-class-properties":"^6.24.1","babel-preset-env":"^1.6.1","babel-preset-flow":"^6.23.0","copyfiles":"^1.2.0","eslint":"^4.9.0","eslint-config-airbnb-base":"^12.1.0","eslint-plugin-flowtype":"^2.39.1","eslint-plugin-import":"^2.7.0","flow-bin":"^0.57.3","flow-copy-source":"^1.2.1","npm-run-all":"^4.1.2","quill":"^1.3.4","rimraf":"^2.6.2","webpack":"^3.8.1"},"scripts":{"build":"yarn clean && yarn build:babel && yarn build:webpack && yarn build:copy-flow-source && yarn build:copy-ts-defs","build:babel":"babel src/ --out-dir dist","build:copy-flow-source":"flow-copy-source --verbose src dist","build:copy-ts-defs":"copyfiles index.d.ts dist","build:webpack":"webpack -p --progress --colors","clean":"rimraf dist","dev:babel":"babel --watch src/ --out-dir dist","dev:webpack":"yarn dev:delay && webpack --progress --colors --watch","dev:delay":"node -e \"setTimeout(() => {}, 3000)\"","prepublishOnly":"yarn build","start":"yarn clean && yarn npm-run-all --race --parallel dev:babel dev:webpack"},"gitHead":"07ec39638427f2e71cd2d14327b50e6faabddea0","_id":"@chuyik/quill-blot-formatter@1.1.0","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-IvJNwBogwPOF3YATcJDO9TRqECB+JQH8GEQs9D4aECZUbIR6Uxq/pvfE8mfH3Bik30p9tsPEVUtXA6AuM3xhdw==","shasum":"67224ce2e69622dc488c1e6cd828046cbbc4e3e3","tarball":"https://registry.npmjs.org/@chuyik/quill-blot-formatter/-/quill-blot-formatter-1.1.0.tgz","fileCount":38,"unpackedSize":133753,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeludcCRA9TVsSAnZWagAACaUP/j2k8Zj1NQuS8wsecJOu\n5TxDAJseNiPO8gIMbHRMuhR4vJroj5nrZy4Y3MvpqyyfJY9WXM0ppT8FC1os\nwqVTtehLemSSxaXjchL8zxTJxj2nCv+5s0JoJcdsvwthhJxribz15LneLkCQ\n2FzaredGR75yQ4Mr5BrBado9KztlFdoJgBdhUrYmgQ/i0GsLiqv0xpljAFCv\nbPa7aE3SPJ2I4wBML7mvim6yZB/ww2vUHWG37roOrKuKat4B8+EBHc+So8Hu\nHx7isfnqjWKhQA5QQtHcuHaq+qvKY/gnhDxbf0xOcVLBIfyXx042bd5pBqlF\n91o6gYn/o1Wy7b9++zE1mdy8iU1BF07oqMSGG9WvR/5uxSNHor9Hcjynng52\nSWIodWNh276QPESE+lLy/72sby/e42Zp8qV8DZVIVrl8/ZQ9je3m5EF9e+6y\nfmh32CJoTQgHidL1xE/WhG3RAAK3OZTCTMcbIcipOSV+P6tyxN5cgp8zjuR7\ncBUQ8DT796hEybSskhx8TkhOh9UVJu2G7+/TEzcA5meq/mwwQkndUUqFN8X6\n6fHby1eT56AehTiJ22Q4jBKZrnk+d4mlmZ4hGGmDgnDFctvNNDjw8x2+sN1e\nJzU2atX5Cq61Zh3RBRikp4TeD1MqNBOCgr4nB7bVuz5bOx8gAGTo9nXOjGK2\n4Wmy\r\n=A/+F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDZYdVXHWS/ygZhczi00CPVLhGVd1jQYfQWKe3QLOl4VAiEAiMXRyqfcyitYFpPVCCdIdxZiL12KgqnbIhFi+MWwJiU="}]},"maintainers":[{"name":"chuyik","email":"crazyzyt@gmail.com"}],"_npmUser":{"name":"chuyik","email":"crazyzyt@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quill-blot-formatter_1.1.0_1586947932055_0.9383920377551966"},"_hasShrinkwrap":false},"1.1.1":{"name":"@chuyik/quill-blot-formatter","version":"1.1.1","description":"a module for the Quill text editor to allow blots to be reformatted. Built in formatters: resize and realign. Built in blot support: images and iframe videos.","main":"./dist/index.js","types":"./dist/index.d.ts","homepage":"https://github.com/Fandom-OSS/quill-blot-formatter","bugs":{"url":"https://github.com/Fandom-OSS/quill-blot-formatter/issues"},"contributors":[{"name":"Nelson Monterroso","email":"nmonterroso@users.noreply.github.com","url":"https://github.com/nmonterroso"}],"repository":{"type":"git","url":"git+https://github.com/Fandom-OSS/quill-blot-formatter.git"},"keywords":["quill","blot","image","resize"],"license":"Apache-2.0","dependencies":{"deepmerge":"^2.0.0"},"peerDependencies":{"quill":"^1.3.4"},"devDependencies":{"babel-cli":"^6.26.0","babel-eslint":"^8.0.1","babel-plugin-transform-class-properties":"^6.24.1","babel-preset-env":"^1.6.1","babel-preset-flow":"^6.23.0","copyfiles":"^1.2.0","eslint":"^4.9.0","eslint-config-airbnb-base":"^12.1.0","eslint-plugin-flowtype":"^2.39.1","eslint-plugin-import":"^2.7.0","flow-bin":"^0.57.3","flow-copy-source":"^1.2.1","npm-run-all":"^4.1.2","quill":"^1.3.4","rimraf":"^2.6.2","webpack":"^3.8.1"},"scripts":{"build":"yarn clean && yarn build:babel && yarn build:webpack && yarn build:copy-flow-source && yarn build:copy-ts-defs","build:babel":"babel src/ --out-dir dist","build:copy-flow-source":"flow-copy-source --verbose src dist","build:copy-ts-defs":"copyfiles index.d.ts dist","build:webpack":"webpack -p --progress --colors","clean":"rimraf dist","dev:babel":"babel --watch src/ --out-dir dist","dev:webpack":"yarn dev:delay && webpack --progress --colors --watch","dev:delay":"node -e \"setTimeout(() => {}, 3000)\"","prepublishOnly":"yarn build","start":"yarn clean && yarn npm-run-all --race --parallel dev:babel dev:webpack"},"gitHead":"2c7409342130c770aee432385d23a261bf4be836","_id":"@chuyik/quill-blot-formatter@1.1.1","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-uMQR8rj90XFUBtHtU5Ppw/X6deuq9XwTJWNiQB51uxxWLw0dJkfk8wbZKMjlQ6UaQNA//+mS3jZW3EkaR/PA+A==","shasum":"d47d0919c54a76bc33f1eb4b92983ca652718924","tarball":"https://registry.npmjs.org/@chuyik/quill-blot-formatter/-/quill-blot-formatter-1.1.1.tgz","fileCount":38,"unpackedSize":134042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelu0ICRA9TVsSAnZWagAAwkAP/0/lAGb4p9Q6n/WSCAew\n6HZAv9AoAW3Ep3fsjmRFBpF2TiF1I6ipMJjNqNZUi3y5tQjogf+7PgoK+ZO5\nhqNGDCaJ+Hx0hCjlb/T0pLeagDrUlY8MbWTuwQi7NOqFfhhW1SknfE6+DqS4\n2scV1TTQyJjIY+EWdhu8D1A4wTTAErMoooN2EpFPf3BaQ0xW3QvVLtZsDqmw\nFXT+bAYqKFUb3QwwvCVWVM6+gqqCajI9UoP1CuEfnJsMtONbCWAzNWiPKQTw\ncuEzmcmZ/HMaciAVCJp01yvvMnjWbXMjmwRPUXIhI3DiEJmPO42p5LeRb+jj\nnbqK/x5NgLu0ODLfYs28o+rOHkwjRJ03b98VkPue2wPbEJEdLalfcPQF4Csz\nL3pGQZCWZ05H479t5UxEe+ET0w/BX/KAKNti/9JD6CcfHEvm1mXyX0CQSBDq\n8jRSffy6cne7Jd1P3fyoa4xnEwoxl2kgSTbKwdzLCCx4elD9ljoT1qsUOlxL\nTWTu/UYfZ5APlO2/RQOckBF2Sw+mZvEmXnBJVZLF45rStGlRhbcMzEBf15kZ\nBxKqSLHJtqFyLXUM4p3xDCN+lDJMF7QhD7rpt74CTyyJOnpWbsIJgsGQyvJo\nLjk73fb0yxgsgXDwRrOzVSG/52qZYSm+TsCnFZ5DZ9cQP1OVrGXfiNKlt5Qp\nIQkn\r\n=2hTP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCu3xodH9inarZtPTZW14ievAvDeBnkTKjOjWBUEjmzUwIgU1JpIRG+ZEonnF82CaGq6NaRwQhpX0SIU7xBdSqCtq0="}]},"maintainers":[{"name":"chuyik","email":"crazyzyt@gmail.com"}],"_npmUser":{"name":"chuyik","email":"crazyzyt@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quill-blot-formatter_1.1.1_1586949384394_0.3520019711288451"},"_hasShrinkwrap":false},"1.2.0":{"name":"@chuyik/quill-blot-formatter","version":"1.2.0","description":"a module for the Quill text editor to allow blots to be reformatted. Built in formatters: resize and realign. Built in blot support: images and iframe videos.","main":"./dist/index.js","types":"./dist/index.d.ts","homepage":"https://github.com/Fandom-OSS/quill-blot-formatter","bugs":{"url":"https://github.com/Fandom-OSS/quill-blot-formatter/issues"},"contributors":[{"name":"Nelson Monterroso","email":"nmonterroso@users.noreply.github.com","url":"https://github.com/nmonterroso"}],"repository":{"type":"git","url":"git+https://github.com/Fandom-OSS/quill-blot-formatter.git"},"keywords":["quill","blot","image","resize"],"license":"Apache-2.0","dependencies":{"deepmerge":"^2.0.0"},"peerDependencies":{"quill":"1.x"},"devDependencies":{"babel-cli":"^6.26.0","babel-eslint":"^8.0.1","babel-plugin-transform-class-properties":"^6.24.1","babel-preset-env":"^1.6.1","babel-preset-flow":"^6.23.0","copyfiles":"^1.2.0","eslint":"^4.9.0","eslint-config-airbnb-base":"^12.1.0","eslint-plugin-flowtype":"^2.39.1","eslint-plugin-import":"^2.7.0","flow-bin":"^0.57.3","flow-copy-source":"^1.2.1","npm-run-all":"^4.1.2","quill":"^1.3.4","rimraf":"^2.6.2","webpack":"^3.8.1"},"scripts":{"build":"yarn clean && yarn build:babel && yarn build:webpack && yarn build:copy-flow-source && yarn build:copy-ts-defs","build:babel":"babel src/ --out-dir dist","build:copy-flow-source":"flow-copy-source --verbose src dist","build:copy-ts-defs":"copyfiles index.d.ts dist","build:webpack":"webpack -p --progress --colors","clean":"rimraf dist","dev:babel":"babel --watch src/ --out-dir dist","dev:webpack":"yarn dev:delay && webpack --progress --colors --watch","dev:delay":"node -e \"setTimeout(() => {}, 3000)\"","prepublishOnly":"yarn build","start":"yarn clean && yarn npm-run-all --race --parallel dev:babel dev:webpack"},"gitHead":"6e302e5f0c6b375b352fb25e33d66fde1ba109b7","_id":"@chuyik/quill-blot-formatter@1.2.0","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-YKbQcvSW0HzsRbC0yumY11PeBwW1U06pGsUmz5Vp5ma+9wK0XlsYbxuxs2B8q91cWoyy7np8fIOo2/A9USK43Q==","shasum":"ba68f43eb0dd1a931a22c6f84049323b67cae676","tarball":"https://registry.npmjs.org/@chuyik/quill-blot-formatter/-/quill-blot-formatter-1.2.0.tgz","fileCount":38,"unpackedSize":138138,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe33koCRA9TVsSAnZWagAA6kEP/AwmrmOBZgyW+jo6j4QE\nW/2M3ForVRA1fTYzuK7t7nhES9caLzcxwPugaT/tFSLcBJY/5eLvHnF6M5Su\n3/6grrG1RPMhWmmYm/P4HXmS/Fqlbqqx5/VfNoetX2xmuWxdC9WHGFxjXtSY\nXPYJymYh4qm9iA0r9RWRIkAt0uBPVC/l3SiGZojOIdG0UNTtcTsHDVzmvbmH\nh+I6H1EMK5O+B3ttHp2vstvCWlGX7RgYKX/G7AZR40PfyDbwZImE0Ricm2Yf\nO10TWnvCeQkndFIZeyBg59BX0zC1bnccDQchaAUkphLoiux3RGmDipnRi49v\nYP+oeeDbynHhTnFU9dAeBmRT4+YxUVyb4sNK+f42VoGu5m/DxD3645k3Y50J\nfMwL9wKHw2b204F8nPQlK0lpX0Q12uS4xIygtNOlVyf/IhUo9mv45chylBcz\np406VHZCgBGuVRnJJpxT/3wZRcE5T8W9M3s3INXVsNhXdunzbN5tsoZjtetW\nn1FKTbinHWhZYlD6BPPa/tepeyQD8Uof5nnbhwV5J8Kyp5fqzlQcl/jWQ5lw\n+0ep/3evj3k9F0ydloXxlozQzSHV9YLK32RLedi2SVpjnS7MrSnOVaB+Qz4j\ntwdmgv2GZdMjB+xN92SHxUe8ZBzfW2I/wpcF+pTh4NsKMwJFsGXIGgbs6t6N\npYnf\r\n=cTgI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0NTh2Vr2zK/zyDmW+oi5pbZjoIiAhuQkxuARVFunK6wIhAOsXVVFoZ9nXgh5vK+zzimCUINj1s5FmbDI+MzvRfhfk"}]},"maintainers":[{"name":"chuyik","email":"crazyzyt@gmail.com"}],"_npmUser":{"name":"chuyik","email":"crazyzyt@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quill-blot-formatter_1.2.0_1591703848126_0.0882296141040968"},"_hasShrinkwrap":false}},"time":{"created":"2020-04-15T10:07:58.910Z","1.0.4":"2020-04-15T10:07:59.094Z","modified":"2022-04-04T22:57:28.816Z","1.1.0":"2020-04-15T10:52:12.444Z","1.1.1":"2020-04-15T11:16:24.640Z","1.2.0":"2020-06-09T11:57:28.378Z"},"maintainers":[{"name":"chuyik","email":"crazyzyt@gmail.com"}],"description":"a module for the Quill text editor to allow blots to be reformatted. Built in formatters: resize and realign. Built in blot support: images and iframe videos.","homepage":"https://github.com/Fandom-OSS/quill-blot-formatter","keywords":["quill","blot","image","resize"],"repository":{"type":"git","url":"git+https://github.com/Fandom-OSS/quill-blot-formatter.git"},"contributors":[{"name":"Nelson Monterroso","email":"nmonterroso@users.noreply.github.com","url":"https://github.com/nmonterroso"}],"bugs":{"url":"https://github.com/Fandom-OSS/quill-blot-formatter/issues"},"license":"Apache-2.0","readme":"# Quill Blot Formatter\n\nA [quill](https://quilljs.com/) module to format document [blots](https://github.com/quilljs/parchment#blots). Heavily inspired by [quill-image-resize-module](https://github.com/kensnyder/quill-image-resize-module). Out of the box supports resizing and realigning images and iframe videos, but can be easily extended using [`BlotSpec`](#blotspec) and [`Action`](#action).\n\n## Demo\n[demo](https://codesandbox.io/s/4wnwllnnl9)\n\n## Installation\nUsing `yarn`:\n```\nyarn add @chuyik/quill-blot-formatter\n```\n\nUsing `npm`:\n```\nnpm install --save @chuyik/quill-blot-formatter\n```\n\n## Usage\n### As Module\n```js\nimport Quill from 'quill';\n\n// from the index, which exports a lot of useful modules\nimport BlotFormatter from 'quill-blot-formatter';\n\n// or, from each individual module\nimport BlotFormatter from 'quill-blot-formatter/dist/BlotFormatter';\n\nQuill.register('modules/blotFormatter', BlotFormatter);\n\nconst quill = new Quill(..., {\n  modules: {\n    ...\n    blotFormatter: {\n      // see config options below\n    }\n  }\n});\n```\n\n### Script Tag\n`quill-blot-formatter.min.js` is provided which exports the same modules as `index.js` under the global `QuillBlotFormatter`.\n\n```html\n<script src=\"<quill>\"></script>\n<script src=\"node_modules/quill-blot-formatter/dist/quill-blot-formatter.min.js\"></script>\n<script>\n  Quill.register('modules/blotFormatter', QuillBlotFormatter.default);\n  const quill = new Quill(..., {\n      modules: {\n          ...\n          blotFormatter: {\n            // see config options below\n          }\n      }\n    }\n  });\n</script>\n```\n\n## BlotSpec\nThe [`BlotSpec`](https://github.com/Fandom-OSS/quill-blot-formatter/blob/master/src/specs/BlotSpec.js) classes define how `BlotFormatter` interacts with blots. They take the `BlotFormatter` as a constructor arg and have the following functions:\n\n### `init(): void`\nCalled after all specs have been constructed. Use this to bind to quill events to determine when to activate a specific spec.\n\n### `getActions(): Class<Action>[]`\nThe [`actions`](#action) that are allowed on this blot. The default is `[AlignAction, ResizeAction, DeleteAction]`.\n\n### `getTargetElement(): ?HTMLElement`\nWhen the spec is active this should return the element that is to be formatter\n\n### `getOverlayElement(): ?HTMLElement`\nWhen the spec is active this should return the element to display the formatting overlay. This defaults to `return getTargetElement()` since they will typically be the same element.\n\n### `setSelection(): void`\nAfter the spec is activated this should set the quill selection using [`setSelection`](https://quilljs.com/docs/api/#setselection). Defaults to `quill.setSelection(null)`.\n\n### `onHide(): void`\nCalled when the spec is deactivated by the user clicking away from the blot. Use this to clean up any state in the spec during activation.\n\n### Notes\nEach spec should call `this.formatter.show(this);` to request activation. See [`specs/`](https://github.com/Fandom-OSS/quill-blot-formatter/tree/master/src/specs) for the built-in specs.\n\n## Action\nThe [`Action`](https://github.com/Fandom-OSS/quill-blot-formatter/blob/master/src/actions/Action.js) classes define the actions available to a blot once its spec is activated. They take the `BlotFormatter` as a constructor arg and have the following functions:\n\n### `onCreate(): void`\nCalled immediately after the action is created. Use this to bind quill events and create elements to attach to the overlay.\n\n### `onUpdate(): void`\nCalled when the formatter has changed something on the blot. Use this to update any internal state.\n\n### `onDestroy(): void`\nCalled when the formatter is hidden by the user.\n\nSee [`actions/`](https://github.com/Fandom-OSS/quill-blot-formatter/tree/master/src/actions) for the existing actions.\n\n## Options\nUsing quill module options it's easy to disable existing specs, actions, or to override any of the styles provided by this module. For example: if you wanted to remove resizing, support only images, and change the overlay border the following config would work:\n\n```js\nimport Quill from 'quill';\n\n// from main module\nimport BlotFormatter, { AlignAction, DeleteAction, ImageSpec } from 'quill-blot-formatter'\n\n// or, from individual modules\nimport BlotFormatter from 'quill-blot-formatter/dist/BlotFormatter';\nimport AlignAction from 'quill-blot-formatter/dist/actions/align/AlignAction';\nimport DeleteAction from 'quill-blot-formatter/dist/actions/DeleteAction';\nimport ImageSpec from 'quill-blot-formatter/dist/specs/ImageSpec';\n\nQuill.register('modules/blotFormatter', BlotFormatter);\n\nclass CustomImageSpec extends ImageSpec {\n    getActions() {\n        return [AlignAction, DeleteAction];\n    }\n}\n\nconst quill = new Quill(..., {\n  modules: {\n    ...\n    blotFormatter: {\n      specs: [\n        CustomImageSpec,\n      ],\n      overlay: {\n        style: {\n          border: '2px solid red',\n        }\n      }\n    }\n  }\n});\n```\n\n### Notes\n- For all supported options as well as the default see [`Options`](https://github.com/Fandom-OSS/quill-blot-formatter/blob/master/src/Options.js).\n- object properties are merged, but array properties override the defaults.\n- To completely disable styles (`overlay.style`, `resize.handleStyle`, etc) set those to `null`\n","readmeFilename":"README.md"}