1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-03-29 01:22:27 +01:00

140 Commits

Author SHA1 Message Date
Ivan Voskoboinyk
91e388ecd9
Rename <Slate> component value prop to initialValue (#5421)
* Rename `slate-react` Slate component `value` prop to `initialValue`

Fixes #4992

* Update documentation: `value` -> `initialValue`

* Add a changeset record

* Make props order consistent
2023-05-26 07:53:39 -07:00
Ravi Lamkoti
869d1240d3
chore: rename imageElmnts to imageElements in 04-transforms.md (#5431)
It will make code more readable and character difference is very less so it's worth changing.
2023-05-25 10:55:24 -07:00
Alexey Volkov
26ace0db28
docs(concepts): fix code example on the Editor page (#5377) 2023-04-03 11:01:50 -07:00
Amandeep Singh
1d8010be85
Fix the nodeName from lower to upper case (#5348)
The node name should be `STRONG` instead of `strong` in the example deserialize function.
2023-03-08 06:51:37 -07:00
Ziad Beyens
84f811a79c
More control on editor.normalizeNode (#5295)
* feat

* fix

* Create two-books-bow.md

* docs

* feat

* fix
2023-02-22 04:54:35 -07:00
Kyle McLean
9c4097a26f
Simplify implementation of custom editor styling (#5278)
* 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
2023-01-31 19:17:27 -07:00
Shakirul Hasan Khan
a1b558ac72
doc: syntax highlighting fix on concepts/04-transforms page (#5266)
* doc: syntax highlighting fix on concepts/04-transforms page

* fix: changes made by code formatter
2023-01-26 05:11:26 -07:00
Spencer Zeng
766e0b6d9a
Fix broken selection transforms link in editor docs (#5234) 2022-12-21 22:44:22 -07:00
Lagu Longa
c8c75e9e2d
remove duplicate useState import (#5194) 2022-11-17 09:21:51 -07:00
Jacob Carpenter
d8dbbb19f7
Docs: fix incorrect name. (#5182)
A reference to the sample above incorrectly mentions `Editor.unwrapNodes` instead of `Transforms.unwrapNodes`.
2022-11-08 05:38:52 -07:00
Brian Bucknam
346f6572fc
Allow void elements to receive marks (#5135)
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
2022-11-08 05:38:15 -07:00
Doug Reeder
469bec3d04
Adds an example using SlateNode.common() with the editor selection (#5176) 2022-11-01 05:13:15 -07:00
Denis Sokolov
d868c930f6
Fix a typo in docs on Normalizing (#5164) 2022-10-28 08:47:09 -07:00
Liy
f273647984
Fix wrong 'Transforms' name. (#5065) 2022-07-28 05:06:42 -07:00
Gabin Aureche
22308b3417
Replace useMemo with useState in the docs (#5022)
* Replace useMemo with useState

* Fix formatting
2022-06-11 07:58:19 -07:00
Johan Davidsson
d460bb42f0
Doc serializing fix (#4937)
Fixing a never ending recursive function in the serializing documentation.
2022-04-12 08:55:26 -07:00
Doug Reeder
2b94e17874
Documents how to implement a Void Element. (#4924)
* Documents how to implement a Void Element.

* Tightens up phrasing
2022-04-03 16:34:33 -07:00
Eric Meier
f17413086e
Update examples in docs, editable voids example (#4925)
* Update examples in docs, editable voids example

* Update typescript docs
2022-04-03 09:57:38 -07:00
Bryan Haakman
20acca4bc8
Add soft break as a separate overridable editor method (#4873)
add changeset
2022-03-20 04:30:08 -07:00
Jan Paepke
df1720d311
DOCS: improved deserialization example (#4856)
* Updated deserialize function

* forgot the .flat()

* made prettier happier
2022-03-03 18:27:19 -07:00
Jim Fisher
b8020ee6fc
Document additional schema constraints due to design of operations (#4838)
As discussed in https://github.com/ianstormtaylor/slate/issues/4836
2022-02-16 09:22:08 -07:00
Doug Reeder
5d3eccf262
Documents use of Editor.withoutNormalizing in conjunction with normalization (#4737) 2021-12-16 22:15:22 -07:00
Doug Reeder
7d9d25e179
Adds clarification & examples to demystify Transforms. (#4653)
* 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>
2021-11-16 02:20:43 -07:00
Doug Reeder
43e740c88d
docs: clarifies not setting editor values directly & plugin order (#4571)
* 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>
2021-10-11 17:40:38 -07:00
Sunny Hirai
8e02c65184 docs: Fix lint maybe. 2021-10-10 21:22:32 -07:00
Sunny Hirai
8a81b0ea3d docs: updated concepts so Editor Interface matches API reference 2021-10-10 15:27:36 -07:00
Dylan Schiemann
5f6d7b4770
Fix typo in TypeScript concepts documentation (#4468)
Fixed #4467
2021-08-24 21:40:00 -07:00
Pulkit Singh
69ee04ac14
Update 02-nodes.md (#4442)
* Update 02-nodes.md

* Update 02-nodes.md
2021-08-11 12:55:41 -07:00
Pulkit Singh
706f2fc072
Update 01-interfaces.md (#4424)
* Update 01-interfaces.md

* Update docs/concepts/01-interfaces.md

* Update docs/concepts/01-interfaces.md

* Update docs/concepts/01-interfaces.md

* Update docs/concepts/01-interfaces.md

Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
2021-08-08 14:48:16 -07:00
Chase Adams
5169cf5ddb
fix sentence order in doc (#4363) 2021-08-04 21:55:37 -07:00
Sunny Hirai
106dd9cb37 docs: describe how empty element children normalization executes before all other normalizations 2021-07-19 17:52:53 -07:00
Sunny Hirai
acfcd9aaf6 docs: Small change to 12-typescript.md to test linting 2021-07-08 22:47:01 -07:00
Sunny Hirai
e377c8f6d2 docs: Small change to test lint staging 2021-07-08 22:45:47 -07:00
Sunny Hirai
7ea482c3e3 docs: Improve wording on TypeScript docs 2021-07-08 20:05:32 -07:00
Coury Ditch
03eed53cf1
Fix typescript docs (#4303)
* Add docs on annotations for useState and initial editor value

* Typescript docs: Use initialValue
2021-07-08 19:50:13 -07:00
Sunny Hirai
438722df87 Add links from concepts/editor to Editor API Reference 2021-05-20 23:54:42 -07:00
Sunny Hirai
53324cb7ca Adjust link references to be consistent with other by adding Robot emoji and blockquote 2021-05-20 23:50:18 -07:00
Sunny Hirai
76cfab15b4 Fix link target in concepts/nodes 2021-05-20 23:46:18 -07:00
Sunny Hirai
fcdcbc128d Fix link in concepts/nodes 2021-05-20 23:43:45 -07:00
Sunny Hirai
ecf26bf6cf Fix another link in concepts/transforms 2021-05-20 23:42:06 -07:00
Sunny Hirai
5dea3d2fc8 Another attempt to fix broken links using .md extension 2021-05-20 23:39:26 -07:00
Sunny Hirai
f12a9ed9b1 Attempt to fix broken links in GitBook to API Reference 2021-05-20 23:34:56 -07:00
Sunny Hirai
832597fe91 Add link to Selection Transforms API Reference in Transforms Concepts 2021-05-20 23:31:11 -07:00
Rickert Mulder
351d0a1c36
Fix typo (#4252)
complience -> compliance
2021-05-13 07:08:09 +10:00
Michal Srb
bcb7c4e4c5
Fix range API link (#4194) 2021-04-13 09:56:59 -04:00
Ian Storm Taylor
68e39215bb
Update 04-transforms.md 2021-04-12 14:14:31 -04:00
Ian Storm Taylor
9613d832e5 update docs 2021-04-07 18:16:45 -04:00
Ian Storm Taylor
41aa2754ee update docs 2021-04-07 18:16:24 -04:00
Ian Storm Taylor
4b3dc18f73 update docs 2021-04-07 18:15:03 -04:00
Ian Storm Taylor
787a79fede update docs 2021-04-07 18:13:33 -04:00