Yoopta
Introduction

Welcome to Yoopta-Editor 🚀

Yoopta-Editor is a free, open-source rich-text editor built for React apps (yeap, we have plans to make it framework-agnostic!). It’s packed with features that let you build an editor as powerful and user-friendly as Notion, Craft, Coda, Medium etc.



Motivation

As a frontend developer, I've tried various WYSIWYG editors, some of them very well-known. I was looking for the best solution for my basic needs:

1.General solved UX problems.
2.Support for media plugins (at least images!!).
3.The ability to easily override the logic and behavior of plugins.
4.The ability to customize the rendering of components in plugins. For example, it became a real pain to integrate the component from Next.js.
5.API for programmatically manipulating content.
6.A user-friendly API for creating at least moderately complex plugins. ...and so on.

So, these were my basic requirements. And do you know what my search for such an editor led to? Hair loss on my head. I simply couldn't find an editor that even covered basic UX issues. It was all in vain. In fact, I realized that many modern rich-text editors are actually not rich — they are still low-level, despite being written on top of other low-level libraries. This is why I started developing my own editor Yoopta. My goal is to spare developers from tears and pain. Yoopta will not only provide a high-level ready-to-use editor but will also allow you to extend and customize everything!



Concepts

Let's discuss the key concepts of the editor. Yoopta is built on top of the low-level editor SlateJS. However, instead of the typical approach offered by Slate, I have developed this editor differently. Yoopta Editor uses a block list approach where each block has its own instance of Slate.

Plugins

Plugin is a configuration object that sets the type and defines the elements that will be displayed within it. Within the plugin, basic settings are also established, including shortcuts, display options, custom event handlers, commands API, Slate extensitons and rules for serializing and deserializing content into various formats.

Blocks

Block is an entity created from a plugin if the nodeType of the root element is defined as block or void. Blocks are equipped with a special API for convenient data handling and content manipulation. Each block contains a separate instance of Slate, which stores its state. Blocks are represented as data in editor.children, where each block is saved with information about its state and associated meta data.

Elements

Element is an entity that determines what will be rendered within the block. The structure of an element and its children are determined when creating plugins. Each element can have custom props that expand its functional capabilities. Elements also have their own API for more convenient manipulation and interaction.

Marks

Marks are stylistic text formatters that can be applied to text nodes to alter their appearance or behavior. Each mark is applied across a range of text and can include styles such as bold, italic, underline, code among others.

Tools

Tools are just helpers for more convenient work with the editor.



List of packages

Thus, Yoopta provides the following list of packages:

Core packages
@yoopta/editor - the main core package
@yoopta/starter-kit - starter-kit with full setup for quick start
@yoopta/exports - package for exports/imports content in different formats
@yoopta/renderer - package for just render without edit tools [in progress]
Plugins
@yoopta/paragraph - [default plugin]
@yoopta/headings
@yoopta/blockquote
@yoopta/accordion
@yoopta/code
@yoopta/embed
@yoopta/image
@yoopta/link
@yoopta/file
@yoopta/callout
@yoopta/video
@yoopta/lists
@yoopta/table
@yoopta/divider
@yoopta/mention - [in progress]
@yoopta/grid - [in progress]
@yoopta/charts - [in progress]
@yoopta/emoji - [in progress]



Marks
@yoopta/marks - text formats. It supports the next marks
Bold, Italic, Highlight, Code, Strike, Underline
Tools
@yoopta/action-menu-list
@yoopta/toolbar
@yoopta/link-tool



Features

Easy setup
Default list of powerful plugins
Many typical solved problems in UX behaviour.
Media plugins on steroids with optimization and lazy loadings
Code plugin on steroids with themes and languages
Each plugin can be easily customized and extensible
Drag and drop, nested dnd is supported also
Selection box for manipulating multiple blocks at once
You can create your own plugin
A list of useful tools (ActionMenu, Toolbar etc.) for the convenience of working with the editor
Automatic lazy loading for media components (eg. embeds)
Large documents
Mobile friendly
Indent and outdent for every plugin by tabs and shift+tabs
Editor instance to programmatically control your content
Editor events for saving to DB in real-time
Exports in markdown, plain text, html
Shortcuts, hotkeys. And customization for this!
Super AI tools not for HYPE, but for real useful work with editor content - [in progress]
The soul invested in the development of this editor 💙
... and other features that I forgot to write about in this list 😅. Just check it in examples!

Examples

Custom toolbar (Medium and Notion) - https://yoopta.dev/examples/withCustomToolbar
Custom ActionMenu (Notion) - https://yoopta.dev/examples/withNotionActionMenu
...and many others - https://yoopta.dev/

Contribution

Join to our community - https://discord.com/invite/Dt8rhSTjsn

Yoopta-Editor is MIT-licensed.