MCPcopy
hub / github.com/codex-team/editor.js

github.com/codex-team/editor.js @v2.31.6 sqlite

repository ↗ · DeepWiki ↗ · release v2.31.6 ↗
1,376 symbols 3,167 edges 239 files 938 documented · 68%
README

  <img alt="Editor.js Logo" src="https://github.com/codex-team/editor.js/raw/v2.31.6/assets/logo_day.png">

editorjs.io | documentation | changelog

npm Minzipped size Backers on Open Collective Sponsors on Open Collective

About

Editor.js is an open-source text editor offering a variety of features to help users create and format content efficiently. It has a modern, block-style interface that allows users to easily add and arrange different types of content, such as text, images, lists, quotes, etc. Each Block is provided via a separate plugin making Editor.js extremely flexible.

Editor.js outputs a clean JSON data instead of heavy HTML markup. Use it in Web, iOS, Android, AMP, Instant Articles, speech readers, AI chatbots — everywhere. Easy to sanitize, extend and integrate with your logic.

  • 😍  Modern UI out of the box
  • 💎  Clean JSON output
  • ⚙️  Well-designed API
  • 🛍  Various Tools available
  • 💌  Free and open source

Editor.js Overview

Installation

It's quite simple:

  1. Install Editor.js
  2. Install tools you need
  3. Initialize Editor's instance

Install using NPM, Yarn, or CDN:

npm i @editorjs/editorjs

Choose and install tools:

See the 😎 Awesome Editor.js list for more tools.

Initialize the Editor:






import EditorJS from '@editorjs/editorjs'

const editor = new EditorJS({
  tools: {
   // ... your tools
  }
})
````

See details about [Installation](https://editorjs.io/getting-started/) and [Configuration](https://editorjs.io/configuration/) at the documentation.

### Saving Data

Call `editor.save()` and handle returned Promise with saved data.

```javascript
const data = await editor.save()

Example

Take a look at the example.html to view more detailed examples.

Roadmap

  • Unified Toolbars
  • [x] Block Tunes moved left
  • [x] Toolbox becomes vertical
  • [x] Ability to display several Toolbox buttons by the single Tool
  • [x] Block Tunes become vertical
  • [x] Block Tunes support nested menus
  • [x] Block Tunes support separators
  • [x] Conversion Menu added to the Block Tunes
  • [x] Unified Toolbar supports hints
  • [x] Conversion Toolbar uses Unified Toolbar
  • [x] Inline Toolbar uses Unified Toolbar
  • Collaborative editing
  • [ ] Implement Inline Tools JSON format
  • [ ] Operations Observer, Executor, Manager, Transformer
  • [ ] Implement Undo/Redo Manager
  • [ ] Implement Tools API changes
  • [ ] Implement Server and communication
  • [ ] Update basic tools to fit the new API
  • Other features
  • [ ] Blocks drag'n'drop
  • [ ] New cross-block selection
  • [ ] New cross-block caret moving
  • Ecosystem improvements
  • [x] CodeX Icons — the way to unify all tools and core icons
  • [x] New Homepage and Docs
  • [x] @editorjs/create-tool for Tools bootstrapping
  • [ ] Editor.js DevTools — stand for core and tools development
  • [ ] Editor.js Design System
  • [ ] Editor.js Preset Env
  • [ ] Editor.js ToolKit
  • [ ] New core bundle system
  • [ ] New documentation and guides

<img width="162px" alt="Support Editor.js" src="https://github.com/codex-team/editor.js/raw/v2.31.6/assets/support_day.png">

Like Editor.js?

You can support project improvement and development of new features with a donation to our team.

Donate via OpenCollective \ Donate via Crypto \ Donate via Patreon

Why donate

Donations to open-source products have several advantages for your business:

  • If your business relies on Editor.js, you'll probably want it to be maintained
  • It helps Editor.js to evolve and get the new features
  • We can support contributors and the community around the project. You'll receive well organized docs, guides, etc.
  • We need to pay for our infrastructure and maintain public resources (domain names, homepages, docs, etc). Supporting it guarantees you to access any resources at the time you need them.
  • You can advertise by adding your brand assets and mentions on our public resources

Sponsors

Support us by becoming a sponsor. Your logo will show up here with a link to your website.

Mister Auto UPLUCID, K.K. Kane Jamison Content Harmony

Become a Sponsor

Backers

Thank you to all our backers

Become a Backer

Contributors

This project exists thanks to all the people who contribute.

Need something special?

Hire CodeX experts to resolve technical challenges and match your product requirements.

  • Resolve a problem that has high value for you
  • Implement a new feature required by your business
  • Help with integration or tool development
  • Provide any consultation

Contact us via team@codex.so and share your details

Community

About CodeX

CodeX is a team of digital specialists around the world interested in building high-quality open source products on a global market. We are open for young people who want to constantly improve their skills and grow professionally with experiments in cutting-edge technologies.

🌐 Join 👋 Twitter Instagram
codex.so codex.so/join @codex_team @codex_team

Extension points exported contracts — how you extend this code

BaseTool (Interface)
(no doc) [37 implementers]
types/tools/tool.d.ts
Saver (Interface)
(no doc) [23 implementers]
types/api/saver.d.ts
BlockTune (Interface)
(no doc) [3 implementers]
types/block-tunes/block-tune.d.ts
PasteConfigSpecified (Interface)
* Tool onPaste configuration object
types/configs/paste-config.d.ts
BlockMovedEventDetail (Interface)
* Information about moved block
types/events/block/BlockMoved.ts
ContentlessToolData (Interface)
* In the simplest Contentless Tool (eg. Delimiter) there is no data to save
test/cypress/fixtures/tools/ContentlessTool.ts
Element (Interface)
* Extend Element interface to include prefixed and experimental properties
src/components/polyfills.ts
API (Interface)
(no doc)
types/index.d.ts

Core symbols most depended-on inside this repo

get
called by 953
src/components/utils/keyboard.ts
find
called by 265
src/components/dom.ts
createEditor
called by 165
test/cypress/support/index.d.ts
forEach
called by 70
src/components/utils/keyboard.ts
on
called by 54
types/api/events.d.ts
add
called by 49
src/components/utils/shortcuts.ts
close
called by 44
types/api/toolbar.d.ts
save
called by 44
types/api/saver.d.ts

Shape

Method 858
Class 243
Function 142
Interface 119
Enum 14

Languages

TypeScript100%

Modules by API surface

src/components/modules/blockManager.ts44 symbols
src/components/block/index.ts42 symbols
src/components/utils.ts37 symbols
src/components/dom.ts37 symbols
src/components/modules/ui.ts33 symbols
src/components/selection.ts32 symbols
src/components/modules/paste.ts31 symbols
test/cypress/tests/api/tools.cy.ts27 symbols
src/components/modules/rectangleSelection.ts24 symbols
src/components/ui/toolbox.ts23 symbols
src/components/modules/toolbar/index.ts22 symbols
src/components/utils/popover/components/popover-item/popover-item-default/popover-item-default.ts21 symbols

Dependencies from manifests, versioned

@babel/register7.21.0 · 1×
@codexteam/icons0.3.2 · 1×
@codexteam/shortcuts1.1.1 · 1×
@cypress/code-coverage3.10.3 · 1×
@editorjs/caret1.0.1 · 1×
@editorjs/code2.7.0 · 1×
@editorjs/delimiter1.2.0 · 1×
@editorjs/header2.8.8 · 1×
@editorjs/paragraph2.11.6 · 1×
@editorjs/simple-image1.4.1 · 1×
@types/node18.15.11 · 1×
chai-subset1.6.0 · 1×

For agents

$ claude mcp add editor.js \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact