mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-04-19 21:01:57 +02:00
Merge branch 'master' of github.com:ianstormtaylor/slate
This commit is contained in:
commit
e12e2757a8
@ -27,7 +27,7 @@ Before creating Slate, I tried a lot of the other rich text libraries out there.
|
||||
|
||||
Here's how Slate compares to some of the existing editors out there:
|
||||
|
||||
- [**Draft.js**](https://facebook.github.io/draft-js/) — Slate borrowed a few concepts from Draft.js, namely its event system, its use of Immutable.js and React, and its goal of being a "framework" for creating editors. It also borrowed its plugin-centric design from the [Draft.js Plugins]() project. But the issues I ran into while using Draft.js were: that lots of the logic around the schema is hardcoded in "core" and difficult to customize, that the transform API is complex to use and not suited to collaborative editing in the future, that serialization isn't considered by the core library in a nice way, that the flat document model made certain behaviors impossible, and that lots of the API feels very heavy to work with.
|
||||
- [**Draft.js**](https://facebook.github.io/draft-js/) — Slate borrowed a few concepts from Draft.js, namely its event system, its use of Immutable.js and React, and its goal of being a "framework" for creating editors. It also borrowed its plugin-centric design from the [Draft.js Plugins](https://github.com/draft-js-plugins/draft-js-plugins) project. But the issues I ran into while using Draft.js were: that lots of the logic around the schema is hardcoded in "core" and difficult to customize, that the transform API is complex to use and not suited to collaborative editing in the future, that serialization isn't considered by the core library in a nice way, that the flat document model made certain behaviors impossible, and that lots of the API feels very heavy to work with.
|
||||
|
||||
- [**Prosemirror**](http://prosemirror.net/) — Slate borrowed a few concepts from Prosemirror, namely its nested document tree, and its transform model. But the issues I ran into while using it were: that the API is hard to understand, that the codebase wasn't structured around common node module practices, that lots of magic was built into the core library that was hard to customize, that toolbars and buttons are too tied to the editor itself, and that the documentation isn't great. (It's still in beta though!)
|
||||
|
||||
|
@ -54,7 +54,7 @@ And now that we've our initial state, we define our `App` and pass it into Slate
|
||||
```js
|
||||
// Import React!
|
||||
import React from 'react'
|
||||
import { Editor, Raw } from 'state'
|
||||
import { Editor, Raw } from 'slate'
|
||||
|
||||
const initialState = Raw.deserialize([
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user