{"_id":"@alkhipce/editorjs-aitext","_rev":"6-abc8c645150aec7847610dd12c1b0ca6","name":"@alkhipce/editorjs-aitext","dist-tags":{"latest":"1.3.0"},"versions":{"1.0.0":{"name":"@alkhipce/editorjs-aitext","version":"1.0.0","keywords":["editorjs","openai","chatgpt","paragraph"],"author":{"name":"alkhipce | Dyomin Ilya"},"license":"MIT","_id":"@alkhipce/editorjs-aitext@1.0.0","maintainers":[{"name":"alkhipce","email":"alkhipce@mail.ru"}],"homepage":"https://github.com/etozhealkhipce/editorjs-aitext#readme","bugs":{"url":"https://github.com/etozhealkhipce/editorjs-aitext/issues"},"dist":{"shasum":"e1a434fdfee221fcb239fa910a21d5a43cdf5c1c","tarball":"https://registry.npmjs.org/@alkhipce/editorjs-aitext/-/editorjs-aitext-1.0.0.tgz","fileCount":5,"integrity":"sha512-+Pir5h1NrZW4S0jCbXfGLA1cp05ABALwvJOnYoCUztrxK5stRuSAR6XRhAnaJuR5agvsch6UlgpgEoZ2dNizSw==","signatures":[{"sig":"MEUCICz9kd1omh7yf4lgqcIO7tBArO5RtDQ9IyL2Mja8ueZXAiEAh02bleWQ+l2ChwKMpEvLJwyB8AvagTmHIUfR3m+WBqk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":146449},"main":"./dist/paragraph.umd.js","module":"./dist/paragraph.mjs","exports":{".":{"import":"./dist/aitext.mjs","require":"./dist/aitext.umd.js"}},"gitHead":"fed74b7caa578cd72a5e067b490ff30dd4e9a542","private":false,"scripts":{"dev":"vite","build":"vite build","preview":"vite preview"},"_npmUser":{"name":"alkhipce","email":"alkhipce@mail.ru"},"repository":{"url":"git+https://github.com/etozhealkhipce/editorjs-aitext.git","type":"git"},"_npmVersion":"10.2.0","description":"Open AI text tool for Editor.js","directories":{},"_nodeVersion":"20.7.0","dependencies":{"openai":"^4.17.3","@editorjs/paragraph":"^2.11.3"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^4.5.0"},"_npmOperationalInternal":{"tmp":"tmp/editorjs-aitext_1.0.0_1699615699032_0.9234759260481893","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@alkhipce/editorjs-aitext","version":"1.0.1","keywords":["editorjs","openai","chatgpt","paragraph"],"author":{"name":"alkhipce | Dyomin Ilya"},"license":"MIT","_id":"@alkhipce/editorjs-aitext@1.0.1","maintainers":[{"name":"alkhipce","email":"alkhipce@mail.ru"}],"homepage":"https://github.com/etozhealkhipce/editorjs-aitext#readme","bugs":{"url":"https://github.com/etozhealkhipce/editorjs-aitext/issues"},"dist":{"shasum":"a3aa6ea6385bc245c109effc191f408e4c510980","tarball":"https://registry.npmjs.org/@alkhipce/editorjs-aitext/-/editorjs-aitext-1.0.1.tgz","fileCount":5,"integrity":"sha512-KMc6j93yGiKR0vkVDEBac3zz9p9AIlSr8JFVVi5++RbkjNyc+Ip8drR5AlFw0RNyLYNhQjEY12srY+SzhbLbYQ==","signatures":[{"sig":"MEUCIQDCP+C7YIeDrZPOkn7zgv9yOKUuC8fc7ZF3J0LZxbO3VQIgVVmFxxInYwgdhaVp4J/eEjqcHBhmt3IeguZ17G6POig=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":146855},"main":"./dist/paragraph.umd.js","module":"./dist/paragraph.mjs","exports":{".":{"import":"./dist/aitext.mjs","require":"./dist/aitext.umd.js"}},"gitHead":"3002b24213e399135c1be78faf9b1672f7641fdd","private":false,"scripts":{"dev":"vite","build":"vite build","preview":"vite preview"},"_npmUser":{"name":"alkhipce","email":"alkhipce@mail.ru"},"repository":{"url":"git+https://github.com/etozhealkhipce/editorjs-aitext.git","type":"git"},"_npmVersion":"10.2.0","description":"Open AI text tool for Editor.js","directories":{},"_nodeVersion":"20.7.0","dependencies":{"openai":"^4.17.3","@editorjs/paragraph":"^2.11.3"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^4.5.0"},"_npmOperationalInternal":{"tmp":"tmp/editorjs-aitext_1.0.1_1699617293907_0.17789114951323137","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@alkhipce/editorjs-aitext","version":"1.0.2","keywords":["editorjs","openai","chatgpt","paragraph"],"author":{"name":"alkhipce | Dyomin Ilya"},"license":"MIT","_id":"@alkhipce/editorjs-aitext@1.0.2","maintainers":[{"name":"alkhipce","email":"alkhipce@mail.ru"}],"homepage":"https://github.com/etozhealkhipce/editorjs-aitext#readme","bugs":{"url":"https://github.com/etozhealkhipce/editorjs-aitext/issues"},"dist":{"shasum":"cfc4166d216dce72567599d104c7519969ecf1f3","tarball":"https://registry.npmjs.org/@alkhipce/editorjs-aitext/-/editorjs-aitext-1.0.2.tgz","fileCount":5,"integrity":"sha512-7HiRgO+v89O6qVdzy1RQP7KsH34pOTv9fWxnhBHuc1H8AlFo7+SKLkZxqZhPc++KiyyXkS6km4G77eIuUgSxJA==","signatures":[{"sig":"MEYCIQD0FkAN3n809RBd6l97zeGYCDJYr7mez6uQa9c5Vg4t6QIhAIhlnQq3y+g0Ry5C5QfEJoii9dNud5NSTCVmX4r6jFcE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":146855},"main":"./dist/paragraph.umd.js","module":"./dist/paragraph.mjs","exports":{".":{"import":"./dist/aitext.mjs","require":"./dist/aitext.umd.js"}},"gitHead":"a87519706d0da055c7a3890b4bd65d1b0cdb713e","private":false,"scripts":{"dev":"vite","build":"vite build","preview":"vite preview"},"_npmUser":{"name":"alkhipce","email":"alkhipce@mail.ru"},"repository":{"url":"git+https://github.com/etozhealkhipce/editorjs-aitext.git","type":"git"},"_npmVersion":"10.2.0","description":"Open AI text tool for Editor.js","directories":{},"_nodeVersion":"20.7.0","dependencies":{"openai":"^4.17.3","@editorjs/paragraph":"^2.11.3"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^4.5.0"},"_npmOperationalInternal":{"tmp":"tmp/editorjs-aitext_1.0.2_1699618038097_0.7404984826215844","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@alkhipce/editorjs-aitext","version":"1.0.3","keywords":["editorjs","openai","chatgpt","paragraph"],"author":{"name":"alkhipce | Dyomin Ilya"},"license":"MIT","_id":"@alkhipce/editorjs-aitext@1.0.3","maintainers":[{"name":"alkhipce","email":"alkhipce@mail.ru"}],"homepage":"https://github.com/etozhealkhipce/editorjs-aitext#readme","bugs":{"url":"https://github.com/etozhealkhipce/editorjs-aitext/issues"},"dist":{"shasum":"1775eafe3936614b318c126407f6a44123acb970","tarball":"https://registry.npmjs.org/@alkhipce/editorjs-aitext/-/editorjs-aitext-1.0.3.tgz","fileCount":5,"integrity":"sha512-Usbwo2g8tbHhmS+MoCEhJV4WElsO5MKIJP1WnLNPS4TVP079Lqx7RzNN8/2l6MACChQwhps8LAonoXTHMUQ3qw==","signatures":[{"sig":"MEUCIQDQHvTU8D45GGP0hEOmv26lVJDqSkezHF85pBX0wvcyPwIgC3EOt8grYe2NUCXRJyI8MCUyfnq4E/VSCBtwyJwV8eU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":146849},"main":"./dist/aitext.umd.js","module":"./dist/aitext.mjs","exports":{".":{"import":"./dist/aitext.mjs","require":"./dist/aitext.umd.js"}},"gitHead":"b41e17d3cd38c823be0c6bc58c463195b35ab61a","private":false,"scripts":{"dev":"vite","build":"vite build","preview":"vite preview"},"_npmUser":{"name":"alkhipce","email":"alkhipce@mail.ru"},"repository":{"url":"git+https://github.com/etozhealkhipce/editorjs-aitext.git","type":"git"},"_npmVersion":"10.2.0","description":"Open AI text tool for Editor.js","directories":{},"_nodeVersion":"20.7.0","dependencies":{"openai":"^4.17.3","@editorjs/paragraph":"^2.11.3"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^4.5.0"},"_npmOperationalInternal":{"tmp":"tmp/editorjs-aitext_1.0.3_1702227738049_0.3995625552601827","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@alkhipce/editorjs-aitext","version":"1.2.0","keywords":["editorjs","openai","chatgpt","paragraph"],"author":{"name":"alkhipce | Dyomin Ilya"},"license":"MIT","_id":"@alkhipce/editorjs-aitext@1.2.0","maintainers":[{"name":"alkhipce","email":"alkhipce@mail.ru"}],"homepage":"https://github.com/etozhealkhipce/editorjs-aitext#readme","bugs":{"url":"https://github.com/etozhealkhipce/editorjs-aitext/issues"},"dist":{"shasum":"63176b1de2b287a677e82798496c52a52455ead5","tarball":"https://registry.npmjs.org/@alkhipce/editorjs-aitext/-/editorjs-aitext-1.2.0.tgz","fileCount":5,"integrity":"sha512-r7jaA6lN2lys8ZuV2POO3zKM+1TNEVwsIOMhAcN8ALzIzyA0Q/4Qdmshjfn2uX/RYbsWQ6cr976ITltC4k1C/g==","signatures":[{"sig":"MEUCIQDm7B5BZw0TO2PpKDYlO+GzPcyhs3GJIoXpKBRWOGYSnAIgTYzcaNrWvDYj+Zwk3TQ3iGJsx2QRhlnA3SC0f6eDs3w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22701},"main":"./dist/aitext.umd.js","types":"./aitext.d.ts","module":"./dist/aitext.mjs","exports":{".":{"import":"./dist/aitext.mjs","require":"./dist/aitext.umd.js"}},"gitHead":"79f111fe7eec2c0458f8c508d34858bfade5efeb","private":false,"scripts":{"dev":"vite","build":"vite build","preview":"vite preview"},"_npmUser":{"name":"alkhipce","email":"alkhipce@mail.ru"},"repository":{"url":"git+https://github.com/etozhealkhipce/editorjs-aitext.git","type":"git"},"_npmVersion":"10.2.0","description":"Open AI text tool for Editor.js","directories":{},"_nodeVersion":"20.7.0","dependencies":{"@editorjs/paragraph":"^2.11.3"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^4.5.0"},"_npmOperationalInternal":{"tmp":"tmp/editorjs-aitext_1.2.0_1711915368609_0.6967970246924402","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"@alkhipce/editorjs-aitext","version":"1.3.0","description":"Open AI text tool for Editor.js","private":false,"scripts":{"dev":"vite","build":"vite build","preview":"vite preview"},"types":"./aitext.d.ts","repository":{"type":"git","url":"git+https://github.com/etozhealkhipce/editorjs-aitext.git"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"main":"./dist/aitext.umd.js","module":"./dist/aitext.mjs","exports":{".":{"import":"./dist/aitext.mjs","require":"./dist/aitext.umd.js"}},"keywords":["editorjs","openai","chatgpt","paragraph"],"author":{"name":"alkhipce | Dyomin Ilya"},"license":"MIT","bugs":{"url":"https://github.com/etozhealkhipce/editorjs-aitext/issues"},"homepage":"https://github.com/etozhealkhipce/editorjs-aitext#readme","dependencies":{"@editorjs/paragraph":"^2.11.3"},"devDependencies":{"vite":"^4.5.0"},"_id":"@alkhipce/editorjs-aitext@1.3.0","gitHead":"812a4c5cc5f6ba93980010ca6243be9f08870800","_nodeVersion":"20.7.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-k/mYZ89jmo25SVEQYRBsRdKZDZXkb7A1s+qao2UPtzmyiSJbPYMeVTNmczQa3o5fAZWPjdqaSjBEtpsFYlvbNQ==","shasum":"ee0d54494eb900472094e4656a9a9dcb3b0e545a","tarball":"https://registry.npmjs.org/@alkhipce/editorjs-aitext/-/editorjs-aitext-1.3.0.tgz","fileCount":5,"unpackedSize":23393,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDn7na511LUzax1D1KPqI8NazfDNrWnx//oYE4JLxasOQIgBFcKdc7Oa89/ubn0M2LtJyyytb3cjkUEaK84JhZJvxw="}]},"_npmUser":{"name":"alkhipce","email":"alkhipce@mail.ru"},"directories":{},"maintainers":[{"name":"alkhipce","email":"alkhipce@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/editorjs-aitext_1.3.0_1780824382842_0.053976624184018274"},"_hasShrinkwrap":false}},"time":{"created":"2023-11-10T11:28:18.896Z","modified":"2026-06-07T09:26:23.086Z","1.0.0":"2023-11-10T11:28:19.292Z","1.0.1":"2023-11-10T11:54:54.077Z","1.0.2":"2023-11-10T12:07:18.338Z","1.0.3":"2023-12-10T17:02:18.350Z","1.2.0":"2024-03-31T20:02:48.783Z","1.3.0":"2026-06-07T09:26:22.982Z"},"bugs":{"url":"https://github.com/etozhealkhipce/editorjs-aitext/issues"},"author":{"name":"alkhipce | Dyomin Ilya"},"license":"MIT","homepage":"https://github.com/etozhealkhipce/editorjs-aitext#readme","keywords":["editorjs","openai","chatgpt","paragraph"],"repository":{"type":"git","url":"git+https://github.com/etozhealkhipce/editorjs-aitext.git"},"description":"Open AI text tool for Editor.js","maintainers":[{"name":"alkhipce","email":"alkhipce@mail.ru"}],"readme":"[![](https://flat.badgen.net/npm/v/@alkhipce/editorjs-aitext?icon=npm)](https://www.npmjs.com/package/@alkhipce/editorjs-aitext)\n[![](https://flat.badgen.net/github/stars/etozhealkhipce/editorjs-aitext)](https://github.com/etozhealkhipce/editorjs-aitext)\n\n# AI Text Tool for Editor.js\n\nAI suggestion text Tool for the [Editor.js](https://ifmo.su/editor) based on the default [Paragraph Tool](https://github.com/editor-js/paragraph/tree/master).\n\nWhile writing, you get an AI suggestion after a configurable delay. Accept or decline it with keyboard shortcuts.\n\n![image](https://github.com/etozhealkhipce/editorjs-aitext/assets/38625168/ebedb41d-085c-4046-af02-d498babf6395)\n\n> Using an older version? See the [1.2.0 readme](https://github.com/etozhealkhipce/editorjs-aitext/blob/d0cf725/README.md).\n\n## Installation\n\n```shell\nnpm i @alkhipce/editorjs-aitext\n```\n\n```javascript\nimport AIText from '@alkhipce/editorjs-aitext'\n```\n\n## Usage\n\n```javascript\nvar editor = EditorJS({\n  ...\n\n  tools: {\n    ...\n      aiText: {\n        // if you do not use TypeScript you need to remove \"as unknown as ToolConstructable\" construction\n        // type ToolConstructable imported from @editorjs/editorjs package\n        class: AIText as unknown as ToolConstructable,\n        config: {\n          // here you need to provide your own suggestion provider (e.g., request to your backend)\n          // this callback function must accept a string and return a Promise<string>\n          callback: (text: string) => {\n            return new Promise(resolve => {\n              setTimeout(() => {\n                resolve('AI: ' + text)\n              }, 1000)\n            })\n          },\n          acceptKeys: ['AltLeft', 'AltRight', 'Tab'], // default\n          declineKeys: ['Escape', 'Backspace'],      // default\n          debounceTimeout: 2000,               // default\n          icon: '<svg>...</svg>',\n          loaderIcon: '<svg>...</svg>',\n        }\n      },\n  }\n\n  ...\n});\n```\n\n## Config\n\n| Field | Type | Default | Description |\n| ----- | ---- | ------- | ----------- |\n| `callback` | `(text: string) => Promise<string>` | — | **Required.** Called with current block content, must return a suggestion string |\n| `acceptKeys` | `string[]` | `['AltLeft', 'AltRight', 'Tab']` | Keys that accept the suggestion (values are `KeyboardEvent.code`) |\n| `declineKeys` | `string[]` | `['Escape', 'Backspace']` | Keys that decline the suggestion |\n| `debounceTimeout` | `number` | `2000` | Delay in ms after last input before requesting a suggestion |\n| `icon` | `string` | built-in SVG | Custom SVG icon for the toolbox |\n| `loaderIcon` | `string` | built-in SVG | Custom SVG icon for the loader shown while fetching |\n\n## Output\n\n```json\n{\n  \"type\": \"aiText\",\n  \"data\": {\n    \"text\": \"paragraph text here\"\n  }\n}\n```\n","readmeFilename":"README.md"}