When documenting how to apply character-level styling, use `addMark` and `removeMark` instead of `setNodes`. This avoids new users creating code that only works in the simplest cases.
Similarly, update the Hovering Toolbar example to apply marks instead of setting nodes.
This change was prompted by a discussion on Slack where the developer was disappointed that `markableVoid` did not appear to be working. The problem was they were using `setNodes` to apply Marks, and did not use the same `match` function that `addMark` uses.
* Switch back to using inline styles for default editor styles
* Add example page and test for editor styling
* Add section in docs for editor styling
* Add test for editor height being set to placeholder height
* Add changeset
Some void elements are effectively stand-ins for text, such as with the mentions example,
where the mention element renders the character's name. Users might want to format Void
elements like this with bold, or set their font and size, so `editor.markableVoid` tells
Slate whether or not to apply Marks to the text children of void elements.
- Adds `markableVoid()` as a schema-specific overrideable test.
- Changes `addMark` and `removeMark` so marks can apply to voids. Also changes behavior
of collapsed selection so that if a markable Void is selected, the mark will be applied /
removed.
- Shows how `markableVoid()` can work in the mentions example
* Adds clarification & examples to demystify Transforms.
* Fleshes out documentation of NodeOptions for Transforms
* Update docs/concepts/04-transforms.md
Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
* Uses 'API' in the title of all API documents
Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
* Updates "Saving to a Database" example to distinguish actual content changes.
* Update docs/walkthroughs/06-saving-to-a-database.md
* Update docs/walkthroughs/06-saving-to-a-database.md
* Update docs/walkthroughs/06-saving-to-a-database.md
* Runs prettier
* docs: clarifies not setting editor values directly & plugin order
* Changes reccommended order of withReact & withHistory, to match current knowleged
Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>