Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
Merge branch 'develop' of https://github.com/eea/volto-slate into dev…
Browse files Browse the repository at this point in the history
…elop
  • Loading branch information
kreafox committed Sep 14, 2020
2 parents fb50784 + e5c2778 commit ea691e8
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
# Note!
# volto-slate

For maximum compatibility you should use this for Volto: `https://github.com/eea/volto/tree/modern_kitchen_sink`
An alternative text editor for Volto, capable of completely replacing the default richtext editor while offering enhanced functionality and behavior. We believe that, in order to succeed, Volto's richtext form editor (the Volto Composite Page editor) needs strong integration between the rich text capabilities and the rest of the Volto blocks. Some examples of the kind of strong integration we have in mind:

# volto-slate
- Pasting complex documents inside a volto-slate text block will create multiple Volto blocks: images will be converted to Volto Image blocks, tables will be converted to Volto Table blocks, etc.
- The text block accepts drag&drop images and it will upload them as Volto Image blocks.
- volto-slate has a Table button with the familiar size input, but it create a Table block

While this addon is still in an early alpha stage, we've solved most of the big issues, the API starts to stabilize and we've already started several addons based on it: https://github.com/eea/volto-slate-metadata-mentions/ and https://github.com/eea/volto-slate-zotero

An alternative text editor for Volto, capable of completely replacing the default richtext editor while offering enhanced functionality and behavior.
## Note!

For maximum compatibility you should use this for Volto: `https://github.com/eea/volto/tree/modern_kitchen_sink` and register `volto-slate:asDefault` as an addon loader in package.json. See https://github.com/eea/volto-slate-project the demo project that we use to develop this addon.

## Why

Some of the main reasons that drove us to create volto-slate:
Some of the main reasons that drove us to create volto-slate instead of enhancing Volto's draftjs implementation:

- Volto's draftjs implementation depends on draft-js-plugins, a third-party project that introduces its own set of bugs and maintanance issues
- Slate has a modern, developer-friendly api that makes developing plugins something easy to do. Getting the editor in a plugin is as easy as `const editor = useSlate()`, overriding core functionality is something that's built in as pluggable, directly in Slate.
- Volto dependends on redraft for final output, which introduces its own bugs and issues. While it is nice to have view-mode components, this is something that volto-slate implements as well
- Because Slate's internal storage uses a tree modeled on the DOM pattern, its final rendered output is very clean

- Volto's draft based implementation depends on Redraft for its final output, which comes with its own bugs and issues. While it is nice to have view-mode components, this is something that volto-slate implements just as well.
- Because Slate's internal storage uses a tree modeled on the DOM pattern, its final rendered output is very clean. Note: The Slate editor value is a JSON object, similar to the Draftjs based implementation.

## Features

Expand Down

0 comments on commit ea691e8

Please sign in to comment.