{"_rev":"2-43eb09c3c93bf3cf4f39a511938f15e2","time":{"created":"2023-01-31T15:20:39.242Z","2.26.4":"2023-01-31T15:14:48.557Z","modified":"2023-01-31T15:20:39.822Z","2.26.5":"2023-01-31T15:20:39.595Z"},"_id":"@alincedev/editorjs","name":"@alincedev/editorjs","dist-tags":{"latest":"2.26.5"},"versions":{"2.26.5":{"name":"@alincedev/editorjs","version":"2.26.5","description":"Editor.js — Native JS, based on API and Open Source","main":"src/codex.ts","types":"./types/index.d.ts","keywords":["codex editor","text editor","editor","editor.js","editorjs"],"scripts":{"clear":"rimraf dist && mkdirp dist","build":"yarn clear && yarn build:webpack:prod","build:dev":"yarn clear && yarn build:webpack:dev","build:webpack:dev":"webpack --mode development --progress --display-error-details --display-entrypoints --watch","build:webpack:prod":"webpack --mode production","lint":"eslint src/ --ext .ts && yarn lint:tests","lint:errors":"eslint src/ --ext .ts --quiet","lint:fix":"eslint src/ --ext .ts --fix","lint:tests":"eslint test/ --ext .ts","ci:pull_paragraph":"git submodule update --init ./src/tools/paragraph","pull_tools":"git submodule update --init --recursive","_tools:checkout":"git submodule foreach \"git checkout master || git checkout main\"","_tools:pull":"git submodule foreach git pull","_tools:yarn":"git submodule foreach yarn","_tools:build":"git submodule foreach yarn build","_tools:make":"yarn _tools:yarn && yarn _tools:build","tools:update":"yarn _tools:checkout && yarn _tools:pull && yarn _tools:make","test:e2e":"yarn build && cypress run","test:e2e:open":"yarn build && cypress open","devserver:start":"yarn build && node ./devserver.js"},"author":{"name":"CodeX"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/codex-team/editor.js.git"},"devDependencies":{"@babel/core":"^7.9.0","@babel/plugin-transform-runtime":"^7.9.0","@babel/polyfill":"^7.8.7","@babel/preset-env":"^7.9.5","@babel/preset-typescript":"^7.13.0","@babel/register":"^7.9.0","@babel/runtime":"^7.9.2","@codexteam/shortcuts":"^1.1.1","@cypress/code-coverage":"^3.9.2","@cypress/webpack-preprocessor":"^5.6.0","@editorjs/code":"^2.7.0","@editorjs/delimiter":"^1.2.0","@editorjs/header":"^2.6.1","@editorjs/simple-image":"^1.4.1","@types/node":"^14.14.35","@types/webpack":"^4.41.12","@types/webpack-env":"^1.15.2","babel-loader":"^8.1.0","babel-plugin-add-module-exports":"^1.0.0","babel-plugin-class-display-name":"^2.1.0","babel-plugin-istanbul":"^6.0.0","core-js":"3.6.5","css-loader":"^3.5.3","cssnano":"^4.1.10","cypress":"^6.8.0","cypress-intellij-reporter":"^0.0.6","eslint":"^8.28.0","eslint-config-codex":"^1.7.1","eslint-loader":"^4.0.2","eslint-plugin-chai-friendly":"^0.7.2","eslint-plugin-cypress":"^2.12.1","extract-text-webpack-plugin":"^3.0.2","license-webpack-plugin":"^2.1.4","mkdirp":"^1.0.4","postcss-apply":"^0.12.0","postcss-import":"^12.0.1","postcss-loader":"^3.0.0","postcss-nested":"^4.1.2","postcss-nested-ancestors":"^2.0.0","postcss-preset-env":"^6.6.0","rimraf":"^3.0.2","stylelint":"^13.3.3","terser-webpack-plugin":"^2.3.6","ts-loader":"^7.0.1","tslint":"^6.1.1","typescript":"3.8.3","webpack":"^4.43.0","webpack-cli":"^3.3.11"},"collective":{"type":"opencollective","url":"https://opencollective.com/editorjs"},"dependencies":{"@codexteam/icons":"0.1.0","codex-notifier":"^1.1.2","codex-tooltip":"^1.0.5","html-janitor":"^2.0.4","nanoid":"^3.1.22"},"gitHead":"90fc07bd0b772ab340b476ef5150f703fd5617a8","bugs":{"url":"https://github.com/codex-team/editor.js/issues"},"homepage":"https://github.com/codex-team/editor.js#readme","_id":"@alincedev/editorjs@2.26.5","_nodeVersion":"14.21.2","_npmVersion":"6.14.17","dist":{"integrity":"sha512-ecWANYlpUfsxRBbHnwuvLEigwTXW7fGo7oCw57kopzPMa5v4DASTo7+grZYXDh+c4cAeXQnDfg4poBVwFLG36Q==","shasum":"0f49cc4fc566a080b933da50926361e543478b20","tarball":"https://registry.npmjs.org/@alincedev/editorjs/-/editorjs-2.26.5.tgz","fileCount":141,"unpackedSize":561737,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCsQ0JhU0Eyir8HWDs6GdZIFXavQO+TSttvkbP3AbaLaAIhAKr8lK6ygCO5IHKPzZqb1uNlArGA80NL2JOrvdCWdfD2"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2THHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoeeg/+P76Jt0LCGP6I7fhAIMOqDr42xkspmWchk9MNYWqLFPqQ58sh\r\n4rqBUm5ZMLsSATRfs8vPLOWK6Ins95OHAsnQD8IFINkTI3z55dlxm5naqKW4\r\na/GD0t4fHLfSy822kMX7UUKo1kg5QdOUYbeGqUuSauGIVfKEP8/rWK/2BrxP\r\nmBBrpA3SWq0B2CUB7j4tNlgGc7yEbdzZxQ+Kh1Mt5Q6PA5X6YzZ1KYJARxXo\r\n647QLVuBwNde21CukqGAHjcklD2qQN4We6lafnTdIwTN2uQSAkrFnU3B3TlL\r\ndVSlyt5LM5OMP6v+qfYiuyA/W6cV6VqrzSdYLQ/kf+9q0Vx9Ts2xpH032DSB\r\n45MM7v3dwsTS3WK9WliBOuIihLySOundvYf9GyjaygJgAEPMuF98ol1/soJT\r\nvq4C3mkhDuQNOzH2sSXcT9/uA9DZz9bwcSgdP2QFbZi2+/CIz1nMWqd6r/h7\r\n/Cpm8SfE7qfrshyU1eSrp5H+2nUWLNid7j1fFU+SbQ0Y8eX4I/aB/GlkdU/+\r\n0Xb7JI1hbRyaNmdrAiaMRQhoMKsxOO07/2vhWvaF/IDX7yjYt0AcekYpfpx6\r\ntf1RzfCzvO9S+ri/YfrayUPShr2cL8OCLAP8IcEgmCdM3nXC3lnYYIIdZ+E6\r\nrLs0W4Pqg4BftRElD1gimY2+cl7kNf9K1PM=\r\n=FAaP\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"alincedev","email":"nuxilius@gmail.com"},"directories":{},"maintainers":[{"name":"alincedev","email":"nuxilius@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/editorjs_2.26.5_1675178439313_0.10389018143130668"},"_hasShrinkwrap":false}},"maintainers":[{"name":"alincedev","email":"nuxilius@gmail.com"}],"description":"Editor.js — Native JS, based on API and Open Source","homepage":"https://github.com/codex-team/editor.js#readme","keywords":["codex editor","text editor","editor","editor.js","editorjs"],"repository":{"type":"git","url":"git+https://github.com/codex-team/editor.js.git"},"author":{"name":"CodeX"},"bugs":{"url":"https://github.com/codex-team/editor.js/issues"},"license":"Apache-2.0","readme":"<a href=\"https://editorjs.io/\"><p align=\"center\"><img src=\"https://capella.pics/79ce946a-d636-41cd-aa96-d3bc5ecfde03.jpg\"></p></a>\n\n[![](https://flat.badgen.net/npm/v/@editorjs/editorjs?icon=npm)](https://www.npmjs.com/package/@editorjs/editorjs)\n[![](https://flat.badgen.net/bundlephobia/min/@editorjs/editorjs?color=cyan)](https://www.npmjs.com/package/@editorjs/editorjs)\n[![](https://flat.badgen.net/bundlephobia/minzip/@editorjs/editorjs?color=green)](https://www.npmjs.com/package/@editorjs/editorjs)\n[![Backers on Open Collective](https://opencollective.com/editorjs/backers/badge.svg)](#backers)\n[![Sponsors on Open Collective](https://opencollective.com/editorjs/sponsors/badge.svg)](#sponsors)\n[![](https://img.shields.io/npm/l/@editorjs/editorjs?style=flat-square)](https://www.npmjs.com/package/@editorjs/editorjs)\n[![Join the chat at https://gitter.im/codex-team/editor.js](https://badges.gitter.im/codex-team/editor.js.svg)](https://gitter.im/codex-team/editor.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n| | | | | | |\n| --------- | --------- | --------- | --------- | --------- | --------- |\n| <img src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png\" alt=\"IE / Edge\" width=\"16px\" height=\"16px\" /> Edge 12+ | <img src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png\" alt=\"Firefox\" width=\"16px\" height=\"16px\" /> Firefox 18+ | <img src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png\" alt=\"Chrome\" width=\"16px\" height=\"16px\" /> Chrome 49+ | <img src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png\" alt=\"Safari\" width=\"16px\" height=\"16px\" /> Safari 10+ | <img src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari-ios/safari-ios_48x48.png\" alt=\"iOS Safari\" width=\"16px\" height=\"16px\" /> iOS Safari 10+ | <img src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png\" alt=\"Opera\" width=\"16px\" height=\"16px\" /> Opera 36+\n\n\n\n## Roadmap\n\n<img align=\"right\" width=\"342\" src=\"https://user-images.githubusercontent.com/3684889/152149321-3f9c585d-7d87-4dad-ab14-def0d526e71c.png\" hspace=\"50\">\n\n- Collaborative editing\n  - [ ] Implement Inline Tools JSON format `In progress` [#1801](https://github.com/codex-team/editor.js/pull/1801)\n  - [ ] Implement Operations creation and transformations\n  - [ ] Implement Tools API changes\n  - [ ] Implement Server and communication\n  - [ ] Update basic tools to fit the new API\n\n- Unified Toolbox\n  - [x] Block Tunes moved left [#1815](https://github.com/codex-team/editor.js/pull/1815)\n  - [x] Toolbox become vertical [#2014](https://github.com/codex-team/editor.js/pull/2014)\n  - [x] Ability to display several Toolbox buttons by the single Tool [#2050](https://github.com/codex-team/editor.js/pull/2050)\n  - [ ] Conversion Toolbar uses Unified Toolbox `In progress`\n  - [ ] Block Tunes become vertical\n  - [ ] Conversion Toolbar added to the Block Tunes\n- Ecosystem improvements\n\n<a href=\"https://opencollective.com/editorjs/donate\" target=\"_blank\">\n  <img width=\"432\" alt=\"image\" src=\"https://user-images.githubusercontent.com/3684889/166146666-e6f5fcc3-bccf-43b0-b48c-e8f1b25b2896.png\">\n</a>\n\n##\n\n\n## If you like a project 💗💗💗\n\nIf you like Editor.js you can support project improvements and development of new features with a donation to our collective.\n\n 👉  [https://opencollective.com/editorjs](https://opencollective.com/editorjs)\n\n### Sponsors\n\nSupport us by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/editorjs/contribute/sir-8679/checkout)]\n\n<a href=\"https://humm.earth/\" target=\"_blank\"><img src=\"https://images.opencollective.com/hummearth/2a8406a/logo/256.png\" width=\"64\"></a>\n<a href=\"https://tesen.com/\" target=\"_blank\"><img src=\"https://images.opencollective.com/tesen-media-inc/b90cf6a/logo/256.png\" width=\"64\"></a>\n<a href=\"https://slid.cc/\" target=\"_blank\"><img src=\"https://images.opencollective.com/slid_team/ff564d7/logo/256.png\" width=\"64\"></a>\n\n\n ### Backers\n\n Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/editorjs/contribute/backer-8632/checkout)]\n\n <a href=\"https://opencollective.com/editorjs#backers\" target=\"_blank\"><img src=\"https://opencollective.com/editorjs/backers.svg?width=890\"></a>\n\n### Contributors\n\nThis project exists thanks to all the people who contribute. <img src=\"https://opencollective.com/editorjs/contributors.svg?width=890&button=false\" />\n\nWe really welcome new contributors. If you want to make some code with us, please take a look at the [Good First Tasks](https://github.com/codex-team/editor.js/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+task%22). You can write to us on `team@codex.so` or via special [Telegram chat](https://t.me/editorjsdev), or any other way.\n\n## Documentation\n\nPlease visit [https://editorjs.io/](https://editorjs.io) to view all documentation articles.\n\n- [Base concepts](https://editorjs.io/base-concepts)\n- [Getting started](https://editorjs.io/getting-started)\n- [Configuration](https://editorjs.io/configuration)\n- [How to create a Block Tool Plugin](https://editorjs.io/creating-a-block-tool)\n- [How to create an Inline Tool Plugin](https://editorjs.io/creating-an-inline-tool)\n- [API for Tools](https://editorjs.io/tools-api)\n\nYou can join a [Gitter-channel](https://gitter.im/codex-team/editor.js) or [Telegram-chat](//t.me/codex_editor) and ask a question.\n\n## Changelog\n\nSee the whole [Changelog](/docs/CHANGELOG.md)\n\nIf you want to follow Editor.js updates, [subscribe to our Newsletter](http://digest.editorjs.io/).\n\n## How to use Editor.js\n\n### Basics\n\nEditor.js is a Block-Styled editor. Blocks are structural units, of which the Entry is composed.\nFor example, `Paragraph`, `Heading`, `Image`, `Video`, `List` are Blocks. Each Block is represented by Plugin.\nWe have [many](http://github.com/editor-js/) ready-to-use Plugins and a [simple API](https://editorjs.io/tools-api) for creating new ones.\n\nHow to use the Editor after [Installation](https://editorjs.io/getting-started).\n\n- Create new Blocks by pressing Enter or clicking the Plus Button\n- Press `TAB` or click on the Plus Button to view the Toolbox\n- Press `TAB` again to leaf Toolbox and select a Block you need. Then press Enter.\n\n\n ![](https://github.com/editor-js/list/raw/master/assets/example.gif)\n\n- Select a text fragment and apply a style or insert a link from the Inline Toolbar\n\n![](https://capella.pics/7ccbcfcd-1c49-4674-bea7-71021468a1bd.jpg)\n\n- Use the «three-dots» button on the right to open Block Settings. From here, you can move and delete a Block\nor apply a Tool's settings, if it provided. For example, you can set a Heading level or List style.\n\n![](https://capella.pics/01a55381-46cd-47c7-b92e-34765434f2ca.jpg)\n\n### Shortcuts\n\nA few shortcuts are preset as available.\n\nShortcut | Action | Restrictions\n-- | -- | --\n`TAB` | Show/leaf a Toolbox. | On empty block\n`SHIFT+TAB` | Leaf back a Toolbox. | While Toolbox is opened\n`ENTER` | Create a Block | While Toolbox is opened and some Tool is selected\n`CMD+B` | Bold style | On selection\n`CMD+I` | Italic style | On selection\n`CMD+K` | Insert a link | On selection\n\nEach Tool can also have its own shortcuts. These are specified in the configuration of the Tool, for example:\n\n```js\nvar editor = new EditorJS({\n  //...\n  tools: {\n    header: {\n      class: Header,\n      shortcut: 'CMD+SHIFT+H'\n    },\n    list: {\n      class: List,\n      shortcut: 'CMD+SHIFT+L'\n    }\n  }\n  //...\n });\n\n```\n\n\n## Installation Guide\n\nThere are few steps to run Editor.js on your site.\n\n1. [Load Editor's core](#load-editors-core)\n2. [Load Tools](#load-tools)\n3. [Initialize Editor's instance](#create-editor-instance)\n\n### Step 1. Load Editor's core\n\nGet Editor.js itself. It is a [minified script](dist/editor.js) with Editor's core and some default must-have tools.\n\nChoose the most usable method of getting Editor for you.\n\n- Node package\n- Source from CDN\n\n##### Option A. NPM install\n\nInstall the package via NPM or Yarn\n\n```shell\nnpm i @editorjs/editorjs\n```\n\nInclude module in your application\n\n```javascript\nimport EditorJS from '@editorjs/editorjs';\n```\n\n##### Option B. Use a CDN\n\nYou can load EditorJS directly from from [jsDelivr CDN](https://www.jsdelivr.com/package/npm/@editorjs/editorjs).\n\n`https://cdn.jsdelivr.net/npm/@editorjs/editorjs@latest`\n\nFor example, place this in your HTML:\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/@editorjs/editorjs@latest\"></script>\n```\n\nOr download the bundle file and use it from your server.\n\n```html\n<script src=\"editor.js\"></script>\n```\n\n### Step 2. Load the Tools that you want to make available\n\nEach Block is represented by a [Tool](docs/tools.md). Tools are simple external scripts with their own logic. For example, there is a [Header](https://github.com/editor-js/header) Tool into which you type your heading text. If you want to be able to use this, install the Header Tool the same way as the Editor (Node.js, CDN, local file).\n\n**Example:** use Header from CDN\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/codex.editor.header@2.0.4/dist/bundle.js\"></script>\n```\n\nCheck [Editor.js's community](https://github.com/editor-js/) to see more ready-to-use Tools.\n\n### Step 3. Create Editor instance\n\nCreate an instance of Editor.js and pass [Configuration Object](types/configs/editor-config.d.ts) with `holderId` and tools list.\n\n```html\n<div id=\"editorjs\"></div>\n```\n\nYou can create a simple Editor with only default Paragraph Tool by passing a string with element's Id (wrapper for Editor) as a configuration param. Or use the default `editorjs` id for wrapper.\n\n```javascript\nvar editor = new EditorJS(); /** Zero-configuration */\n\n// equals\n\nvar editor = new EditorJS('editorjs');\n````\n\nOr pass a whole settings object.\n\n```javascript\nvar editor = new EditorJS({\n    /**\n     * Create a holder for the Editor and pass its ID\n     */\n    holder : 'editorjs',\n\n    /**\n     * Available Tools list.\n     * Pass Tool's class or Settings object for each Tool you want to use\n     */\n    tools: {\n        header: {\n          class: Header,\n          inlineToolbar : true\n        },\n        // ...\n    },\n\n    /**\n     * Previously saved data that should be rendered\n     */\n    data: {}\n});\n```\n\n### Saving Data\n\nCall `editor.save()` and handle returned Promise with saved data.\n\n```javascript\neditor.save()\n  .then((savedData) => {\n    console.log(savedData);\n  });\n```\n\n### Example\n\nTake a look at the [example.html](example/example.html) to view more detailed examples.\n\n## Credits and references\n\n- We use [HTMLJanitor](https://github.com/guardian/html-janitor) module in our Sanitizer module.\n\n# About CodeX\n\n<img align=\"right\" width=\"120\" height=\"120\" src=\"https://codex.so/public/app/img/codex-logo.svg\" hspace=\"50\">\n\nCodeX is a team of digital specialists around the world interested in building high-quality open source products on a global market. We are [open](https://codex.so/join) for young people who want to constantly improve their skills and grow professionally with experiments in cutting-edge technologies.\n\n| 🌐 | Join  👋  | Twitter | Instagram |\n| -- | -- | -- | -- |\n| [codex.so](https://codex.so) | [codex.so/join](https://codex.so/join) |[@codex_team](http://twitter.com/codex_team) | [@codex_team](http://instagram.com/codex_team/) |\n","readmeFilename":"README.md"}