Skip to content

Commit

Permalink
Fix a few typos in the docs (#5463)
Browse files Browse the repository at this point in the history
* fix: typo in with-react docs

* fix: typo in range docs

* fix: typo in faq docs

* fix: typo in react-editor docs
  • Loading branch information
bsdahl authored Jun 30, 2023
1 parent 4bd15ed commit 711c229
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/api/locations/range.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Check if a `range` is exactly equal to `another`.

Check if a `range` includes a path, a point, or part of another range.

For clarity the definition of `includes` can mean partially includes. Another way to describe this is if one Range intersectns the other Range.
For clarity the definition of `includes` can mean partially includes. Another way to describe this is if one Range intersects the other Range.

#### `Range.isBackward(range: Range) => boolean`

Expand Down
2 changes: 1 addition & 1 deletion docs/general/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ A series of common questions people have about Slate:

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 the 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.
For the most part, this leads to increased flexibility 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 domain, 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 override the `insert_data` command and deserialize the `DataTransfer` object's `text/html` data as you wish.

Expand Down
2 changes: 1 addition & 1 deletion docs/libraries/slate-react/react-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const [editor] = useState(() => withReact(withHistory(createEditor())))
- [Check methods](react-editor.md#check-methods)
- [Focus and selection methods](react-editor.md#focus-and-selection-methods)
- [DOM translation methods](react-editor.md#dom-translation-methods)
- [DataTranfer methods](react-editor.md#datatransfer-methods)
- [DataTransfer methods](react-editor.md#datatransfer-methods)

## Static methods

Expand Down
2 changes: 1 addition & 1 deletion docs/libraries/slate-react/with-react.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ const [editor] = useState(() => withReact(withHistory(createEditor())))

The `clipboardFormatKey` option allows you to customize the `DataTransfer` type when Slate data is copied to the clipboard. By default, it is `application/x-slate-fragment` but it can be customized using this option.

This can be useful when a user copies from one Slate editor to a differently configured Slate editor. This could cause nodes to be inserted which are not correctly typed for the receiving editor, corrupting the document. By customizing the `clipboardFormatKey` one can ensure that the raw JSON data isn't cpied between editors with different schemas.
This can be useful when a user copies from one Slate editor to a differently configured Slate editor. This could cause nodes to be inserted which are not correctly typed for the receiving editor, corrupting the document. By customizing the `clipboardFormatKey` one can ensure that the raw JSON data isn't copied between editors with different schemas.

0 comments on commit 711c229

Please sign in to comment.