mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-31 10:51:44 +02:00
Lint JSON, CSS and Markdown files with Prettier (#1612)
* Process and Lint CSS, Markdown and JSON files with Prettier * Run `yarn prettier` to re-format Markdown, CSS and JSON files
This commit is contained in:
committed by
Ian Storm Taylor
parent
fc264841b6
commit
de4c9e478a
@@ -1,12 +1,10 @@
|
||||
|
||||
# FAQ
|
||||
|
||||
A series of common questions people have about Slate:
|
||||
|
||||
- [Why is content pasted as plain text?](#why-is-content-is-pasted-as-plain-text)
|
||||
- [What can a `Block` node have as its children?](#what-can-a-block-node-have-as-its-children)
|
||||
- [What browsers and devices does Slate support?](#what-browsers-and-devices-does-slate-support)
|
||||
|
||||
* [Why is content pasted as plain text?](#why-is-content-is-pasted-as-plain-text)
|
||||
* [What can a `Block` node have as its children?](#what-can-a-block-node-have-as-its-children)
|
||||
* [What browsers and devices does Slate support?](#what-browsers-and-devices-does-slate-support)
|
||||
|
||||
### Why is content pasted as plain text?
|
||||
|
||||
@@ -16,14 +14,12 @@ For this most part, this leads to increased flexbility without many downsides, b
|
||||
|
||||
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/slate-react/editor.md#onpaste) handler that parses the content as you wish.
|
||||
|
||||
|
||||
### What can a `Block` node have as its children?
|
||||
|
||||
With Slate, you can use `Block` node to created complex nested structures. Block nodes may contain nested block nodes (both void and non-void), inline nodes, text nodes and just regular DOM elements (with `contentEditable = {false}`).
|
||||
|
||||
If you have an element that is not going to be editable, you can choose between a `void` node or just a DOM element with `contentEditable = {false}`. Opt for the `void` node if you would like it represented in the Slate schema, and for Slate to be aware of it.
|
||||
|
||||
|
||||
### What browsers and devices does Slate support?
|
||||
|
||||
Slate's goal is to support all the modern browsers on both desktop and mobile devices.
|
||||
|
Reference in New Issue
Block a user