mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-29 01:50:06 +02:00
add resources to docs
This commit is contained in:
15
docs/general/faq.md
Normal file
15
docs/general/faq.md
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
# FAQ
|
||||
|
||||
A series of common questions people have about Slate:
|
||||
|
||||
- [Why is content pasted as plain text?](#how-come-content-is-pasted-as-plain-text)
|
||||
|
||||
|
||||
### Why is content pasted as plain text?
|
||||
|
||||
One of Slate's core principles is that, unlike most other editors, it does **not** prescribe a specific "schema" to the content you are editing. This means that Slate's core has no concept of "block quotes" or "bold formatting".
|
||||
|
||||
For this most part, this leads to increased flexbility without many downsides, but there are certain cases where you have to do a bit more work. Pasting is one of those cases.
|
||||
|
||||
Since Slate knows nothing about your schema, it can't know how to parse pasted HTML content (or other content). So, by default whenever a user pastes content into a Slate editor, it will parse it as plain text. If you want it to be smarter about pasted content, you need to define an [`onPaste`](../reference/components/editor.md#onpaste) handler that parses the content as you wish.
|
9
docs/general/resources.md
Normal file
9
docs/general/resources.md
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
# Resources
|
||||
|
||||
A few resources that are helpful when using Slate.
|
||||
|
||||
|
||||
## Development
|
||||
|
||||
- [Immutable.js Console Extension](https://github.com/mattzeunert/immutable-object-formatter-extension) — this greatly improves the `console.log` output when working with [Immutable.js](https://facebook.github.io/immutable-js/) objects, which Slate's data model is based on.
|
Reference in New Issue
Block a user