{"_id":"@bensenhsu/editorjs-tooltip","_rev":"1-5bbb200f3a54e047f17180354326a03a","name":"@bensenhsu/editorjs-tooltip","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.2":{"name":"@bensenhsu/editorjs-tooltip","version":"1.0.2","keywords":["tool","tooltip","editor.js","editorjs"],"description":"Tooltip tool for Editor.js","main":"./dist/bundle.js","scripts":{"build":"webpack --mode production","build:dev":"webpack --mode development --watch","test":"jest","lint":"eslint ."},"repository":{"type":"git","url":"git+https://github.com/BensenHsu/editorjs-tooltip.git"},"author":{"name":"Bensen Hsu","email":"593783125bh@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/BensenHsu/editorjs-tooltip/issues"},"homepage":"https://github.com/BensenHsu/editorjs-tooltip#readme","devDependencies":{"@babel/core":"^7.15.5","@babel/preset-env":"^7.15.6","@testing-library/jest-dom":"^5.14.1","babel-jest":"^27.2.4","babel-loader":"^8.2.2","css-loader":"^6.5.1","eslint":"^7.32.0","eslint-config-airbnb-base":"^14.2.1","eslint-plugin-import":"^2.24.2","eslint-plugin-jest":"^24.5.2","jest":"^27.2.4","style-loader":"^3.3.0","svg-inline-loader":"^0.8.2","webpack":"^5.56.1","webpack-cli":"^4.8.0"},"jest":{"setupFilesAfterEnv":["<rootDir>/test/config/setupTests.js"],"transform":{"^.+\\.jsx?$":"babel-jest","^.+\\.(css|svg)$":"<rootDir>/test/config/assetsTransform.js"}},"gitHead":"f51c6e5479567bde2ee221b440ebdb68e1a07284","_id":"@bensenhsu/editorjs-tooltip@1.0.2","_nodeVersion":"19.0.1","_npmVersion":"9.2.0","dist":{"integrity":"sha512-awZABZRAsN4hkGZBNr2m8iSPVwYi/+FCdujNr2CAkFn8jKpzNhHw5A3pq6XbB+Yij/8QUlv5NKn63a4Gcx+zuQ==","shasum":"babbeb554e6403f53790f718a66e3279f92f2f54","tarball":"https://registry.npmjs.org/@bensenhsu/editorjs-tooltip/-/editorjs-tooltip-1.0.2.tgz","fileCount":29,"unpackedSize":189847,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBg7KAxnbt4Bu7cumBp78V3v/P/G1GNz4gey2c5TVzaRAiBJfBMH5dtpQXyb+uuEAgD4t1C0deUbRSkarhs47/iUDQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjuPy1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp6+Q/7BObN56GBid7PBWZIshEnfPVBJGfLmCGpxs9Kk0ccS5w0sk7o\r\nDDEaoFzMFlsfbQwCjhn8IRUfshKyBw4RbpZZOQQxHJ1RxVgcXXHr7n2vJvZU\r\n/5cLDrxAA0W3jBxfl8BLFSlQIh6RUog+xfOrvY8RQBkKPQtHSOOWwz5vKENy\r\nkxidoebeQtgZH2KqaUmX2kYVyzFBY+lbisvA0lXocgZiKfq6qMIj7eixQ4g0\r\nwS55ALy+3/NIhVQQlm+UQ3IJDSAG/ATYyoDCp5i4n4+J6mLS71B5iP5dIW+M\r\nD15koLJru4+K8OV+olJ/L0SCzixumXRRExo1S0tj9jVKEj8GMcc4hEydl6gD\r\nLs2QqhpuWMNIqcs99fxAMEaP8+0sjyBM6p1Jusj0D1nFyWS8KB3+Ej1piEgY\r\nlrwnDeCHOnZrdZHF/N/0Mu0WsFYfN7hrSyCRjbIEckOOefTnnR/TFNroh25n\r\n95CXBHLhnJQ8RVMjj9OjZBUb0/20nyAJbYjX5wpApPl1Xutah8l4U25Q6EhP\r\n+7P/eW7qLer5JbkFYjWy83efJV+nuzYnfl3Cj10b8hmJ1brZyvlvCjzan/6G\r\nqRsdXusNR1YuOrVh9ruHPw5JcN3znTA3qPHvlMz/bRVTgPLB1JflPrjJ2A3R\r\nBGD3D+m1934bOQ39hktyOUyGZ10gCvlKan8=\r\n=iEzb\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bensenhsu","email":"593783125bh@gmail.com"},"directories":{},"maintainers":[{"name":"bensenhsu","email":"593783125bh@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/editorjs-tooltip_1.0.2_1673067700827_0.436189440156896"},"_hasShrinkwrap":false},"1.0.4":{"name":"@bensenhsu/editorjs-tooltip","version":"1.0.4","keywords":["tool","tooltip","editor.js","editorjs"],"description":"Tooltip tool for Editor.js","main":"./dist/bundle.js","scripts":{"build":"webpack --mode production","build:dev":"webpack --mode development --watch","test":"jest","lint":"eslint ."},"repository":{"type":"git","url":"git+https://github.com/BensenHsu/editorjs-tooltip.git"},"author":{"name":"Bensen Hsu","email":"593783125bh@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/BensenHsu/editorjs-tooltip/issues"},"homepage":"https://github.com/BensenHsu/editorjs-tooltip#readme","devDependencies":{"@babel/core":"^7.15.5","@babel/preset-env":"^7.15.6","@testing-library/jest-dom":"^5.14.1","babel-jest":"^27.2.4","babel-loader":"^8.2.2","css-loader":"^6.5.1","eslint":"^7.32.0","eslint-config-airbnb-base":"^14.2.1","eslint-plugin-import":"^2.24.2","eslint-plugin-jest":"^24.5.2","jest":"^27.2.4","style-loader":"^3.3.0","svg-inline-loader":"^0.8.2","webpack":"^5.56.1","webpack-cli":"^4.8.0"},"jest":{"setupFilesAfterEnv":["<rootDir>/test/config/setupTests.js"],"transform":{"^.+\\.jsx?$":"babel-jest","^.+\\.(css|svg)$":"<rootDir>/test/config/assetsTransform.js"}},"dependencies":{"@codexteam/icons":"^0.2.0"},"gitHead":"f839994d795bd70c8731c19ada87e36dd830aab5","_id":"@bensenhsu/editorjs-tooltip@1.0.4","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-RKl4RE47qe6tPpOdcHA7zhVPQJl67p2gSTs+HmDnF644cDkrI2jwe9KHlTQmh1QiB2jHNFaySkeqpexQehAWMQ==","shasum":"993383aa60475ba4c9dd3f40213ea555486ce447","tarball":"https://registry.npmjs.org/@bensenhsu/editorjs-tooltip/-/editorjs-tooltip-1.0.4.tgz","fileCount":27,"unpackedSize":53457,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDT08eWvZ1x2Mc1Y5S3kikKthIGeRc9f0qhOfoaWoNYMwIhAOugw/+W0+ldchqHRRArHJF4AglwKnEyfkeFqYdjtezQ"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjuctBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoO1A//RkY2XvQpcnG5qRNImahftHhE9R8YcYihBBnq4cgLt74bDluJ\r\niZRLBxSRr+52Nkqb8jsTYzGv5z1qyM01o2Ifj75V4r2E3ZFKL3OmmMvBdBkl\r\nwtZ4c3AVueQv9JTnlkmwhy3FFpyy/9trf4Hm3mbHt+ZJXUaEuXrtpAXlWyJU\r\nrjcMjOmoU72dzczfuPgSlKnf8EUrLKkbncgNgiv9fEYH/skw97M/KlMmUbaQ\r\ngoqEwoOyh4PDObqGtccsbyCcvowSfc22vkW7wrQczWENd01/+oVrsC8++zp2\r\nmCCGJsT0vB7ZHN7jnImnKT/1GbIGNbLDrrfBQv/3CaiDfFwRjggG2sZvEhgs\r\n3aIPRIUGyTQt/CVjzmHPoB9PzAT9RCy/H3xI1IFt/DohXNBSnAs3HUB4Fy6M\r\nCtVLH0yyZaM+8IXHpt0hBgcG9AaQ51mbo23KRyFPeh4tYoDITYZ5JRblUeqn\r\nPBhFW84/sGyOqwKaBcisOZcC39yjWsoF0xSpDfIZzHuru/cC4macS1fjSbDk\r\nwTlnhdRsdn5nCc1BsDFzlimW3hZdKSUcI7kajFZP98JqRlcb0SX7/S01sD7V\r\nJEuCnp2UrgQGmuqbXmrhhJeXAn07V7IRDj0WaqyJOTicQwMRD93mzsUwqQ8K\r\nLlaEauUxRVia9C40blj69EDDXEnjSgHkWAs=\r\n=7JWw\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bensenhsu","email":"593783125bh@gmail.com"},"directories":{},"maintainers":[{"name":"bensenhsu","email":"593783125bh@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/editorjs-tooltip_1.0.4_1673120577078_0.7479339851744067"},"_hasShrinkwrap":false}},"time":{"created":"2023-01-07T05:01:40.732Z","1.0.2":"2023-01-07T05:01:40.994Z","modified":"2023-01-07T19:42:57.363Z","1.0.4":"2023-01-07T19:42:57.288Z"},"maintainers":[{"name":"bensenhsu","email":"593783125bh@gmail.com"}],"description":"Tooltip tool for Editor.js","homepage":"https://github.com/BensenHsu/editorjs-tooltip#readme","keywords":["tool","tooltip","editor.js","editorjs"],"repository":{"type":"git","url":"git+https://github.com/BensenHsu/editorjs-tooltip.git"},"author":{"name":"Bensen Hsu","email":"593783125bh@gmail.com"},"bugs":{"url":"https://github.com/BensenHsu/editorjs-tooltip/issues"},"license":"MIT","readme":"\n# EditorJS Tooltip Inline-tool\n![](https://badgen.net/badge/Editor.js/v2.0/blue)\n[![Coverage Status](https://coveralls.io/repos/github/kommitters/editorjs-tooltip/badge.svg)](https://coveralls.io/github/kommitters/editorjs-tooltip)\n[![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/6470/badge)](https://bestpractices.coreinfrastructure.org/projects/6470)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/kommitters/editorjs-tooltip/badge)](https://api.securityscorecards.dev/projects/github.com/kommitters/editorjs-tooltip)\n\nTooltip for [Editor.js](https://editorjs.io).\n\n![](assets/demo.gif)\n## Notes\n\n- Adds a tooltip as an inline-tool in Editor.js.\n- Custom styles to the selected text.\n- Custom tooltip location.\n- Custom styles to the tooltips.\n\n## Installation\n\n### Install via NPM\nGet the package\n\n```shell\n$ npm i --save-dev editorjs-tooltip\n```\n\nInclude module at your application\n\n```javascript\nimport Tooltip from 'editorjs-tooltip';\n```\n\n### Load from CDN\n\nYou can load a specific version of the package from [jsDelivr CDN](https://www.jsdelivr.com/package/npm/editorjs-tooltip).\n\nRequire this script on a page with Editor.js.\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/editorjs-tooltip\"></script>\n```\n\n## Usage\n\nAdd a new Tool to the `tools` property of the Editor.js initial config.\n\n```javascript\nconst editor = EditorJS({\n  tools: {\n    tooltip: {\n      class: Tooltip,\n      config: {\n        location: 'left',\n        highlightColor: '#FFEFD5',\n        underline: true,\n        backgroundColor: '#154360',\n        textColor: '#FDFEFE',\n        holder: 'editorId',\n      }\n    }\n  }\n});\n```\nSelect some text, click on the tooltip button in the inline-tools bar, and type the tooltip in the input, when the key enter is pressed, the tooltip will be created.\n\n**Note:** Use the holder field to indicate the EditorJS Id passed in the div tag, by default the holder field is 'editorjs'.\n\n## Config Params\n\n| Field          | Type      | Description                     |\n| -------------- | --------- | ------------------------------- |\n| location          | `{location: string}` | You could choose the tooltip place(top, bottom, left, right). Default value is bottom\n| highlightColor | `{ highlightColor: Hex or string }`|You could choose the background text color wrapped by the tooltip, you could pass hexadecimal colors or string colors\n| underline | `{ underline: boolean }`  | You could add underline text decoration to the text wrapped by the tooltip\n| backgroundColor | `{ backgroundColor: string }`  | You could choose the tooltip color, you could pass hexadecimal colors or string colors\n| textColor | `{ textColor: string }`  | You could choose the tooltip text color, you could pass hexadecimal colors or string colors\n| holder | `{ holder: string }`  | If your EditorJS Id passed in the Editor tag is different from 'editorjs', use the holder field.\n\n## Output data\n\nSelected text will be wrapped in a span tag with a cdx-tooltip class and with a data-tooltip, it contains the tooltip text.\n\n```json\n{\n    \"type\" : \"text\",\n    \"data\" : {\n        \"text\" : \"It is a text to the <span class=\\\"cdx-tooltip\\\" data-tooltip =\\\"tooltip\\\" >tooltip</span> inline-tool.\"\n    }\n}\n```\n\n## Development\n\n**Development mode**\n```shell\n$ yarn build:dev\n```\n\n**Production release**\n1. Create a production bundle\n```shell\n$ yarn build\n```\n\n2. Commit `dist/bundle.js`\n\n**Run Linter**\nThe linter tool will help you by analyzing source code and fix common errors, or by following the style conventions defined.\n```shell\n$ yarn lint .\n```\n\n**Run tests**\n```shell\n$ yarn test\n```\n\n## Code of conduct\nWe welcome everyone to contribute. Make sure you have read the [CODE_OF_CONDUCT][coc] before.\n\n## Contributing\nFor information on how to contribute, please refer to our [CONTRIBUTING][contributing] guide.\n\n## Changelog\nFeatures and bug fixes are listed in the [CHANGELOG][changelog] file.\n\n## License\nThis library is licensed under an MIT license. See [LICENSE][license] for details.\n\n## Acknowledgements\nMade with 💙 by [kommitters Open Source](https://kommit.co)\n\n[license]: https://github.com/kommitters/editorjs-tooltip/blob/master/LICENSE\n[coc]: https://github.com/kommitters/editorjs-tooltip/blob/master/CODE_OF_CONDUCT.md\n[changelog]: https://github.com/kommitters/editorjs-tooltip/blob/master/CHANGELOG.md\n[contributing]: https://github.com/kommitters/editorjs-tooltip/blob/master/CONTRIBUTING.md\n","readmeFilename":"README.md"}