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]

ο»ΏVote for plugins ο»Ώ

ο»Ώ

β€’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ο»Ώ
β€’Custom styling - https://yoopta.dev/examples/withCustomStylesο»Ώ
β€’Extended Plugin - https://yoopta.dev/examples/withExtendedPluginο»Ώ
β€’Saving to database - https://yoopta.dev/examples/withSavingToDatabaseο»Ώ
β€’...and many others - https://yoopta.dev/ο»Ώο»Ώο»Ώο»Ώο»Ώ

Contribution

β€’Join to our community - https://discord.com/invite/Dt8rhSTjsnο»Ώ

Yoopta-Editor is MIT-licensed.