1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-24 09:13:24 +01:00

619 Commits

Author SHA1 Message Date
Sunny Hirai
6b94fb17c8 Move Node Options up in documentation 2021-03-29 00:54:15 -07:00
Sunny Hirai
0895968900 Add links to anchors in Editor documentation 2021-03-29 00:50:29 -07:00
Sunny Hirai
0c5b8fcc84 Rename Miscellaneous to Operation now that it is the only thing on that page 2021-03-29 00:47:45 -07:00
Sunny Hirai
1258a74205 Move createEditor method in the Editor documentation where one would expect it 2021-03-29 00:45:18 -07:00
Sunny Hirai
b503d732da Alphabetize API reference children 2021-03-29 00:41:44 -07:00
Sunny Hirai
5b6b29d33d Split Location and Node onto its own page 2021-03-29 00:40:41 -07:00
Sunny Hirai
23cd50f5bb Move PointRef and RangeRef under Location in documentation summary 2021-03-29 00:34:01 -07:00
Sunny Hirai
ed7e4ab776 Improve wording around Editor schema-specific methods 2021-03-29 00:31:44 -07:00
Sunny Hirai
9caf2e8700 Add some clarifying documentation around Editor schema-specific methods 2021-03-29 00:29:48 -07:00
Sunny Hirai
fbb311359b Rename Path methods in API reference to be more consistent 2021-03-29 00:20:34 -07:00
Sunny Hirai
6f2c96d1a1 Rename Editor functions in documentation to be more consistent 2021-03-29 00:19:19 -07:00
Sunny Hirai
f890d3aca7 Move node transform jump to section documentation into correct page 2021-03-29 00:14:33 -07:00
Sunny Hirai
67c5a50fa9 Fix summary link anchors because they don't work in GitBook 2021-03-29 00:12:47 -07:00
Sunny Hirai
738e0d4332 Add direct links in summaries to types of Transforms in API reference 2021-03-29 00:06:57 -07:00
Sunny Hirai
0ef080723f Split API reference so each object has its own page 2021-03-29 00:02:43 -07:00
Sunny Hirai
2a8ba9c39b Add installing important plugins to TypeScript docs 2021-03-26 22:53:07 -07:00
Sunny Hirai
f77aa218aa Adjust object names in API summary 2021-03-26 22:44:45 -07:00
Sunny Hirai
6854825fbd Try showing Object names in API summary 2021-03-26 22:43:36 -07:00
Sunny Hirai
87f1b692fa Try improve Table of Contents info 2021-03-26 22:39:41 -07:00
Sunny Hirai
bb2f5d606a Try adding comments in table of contents 2021-03-26 22:36:38 -07:00
Sunny Hirai
daaeeaf5fe Remove unnecessary * in documentation 2021-03-26 22:30:28 -07:00
Sunny Hirai
2632fd18b4 Add documentation for Path 2021-03-26 22:27:18 -07:00
Sunny Hirai
8b070cc27e Fix heading levels in Locations docs to be consistent 2021-03-26 22:16:00 -07:00
Sunny Hirai
2eeb6833bd Fix heading levels in Node documentation to be consistent 2021-03-26 22:08:08 -07:00
Sunny Hirai
f700aa86c9 Add description for Editor onChange method 2021-03-26 22:06:01 -07:00
Sunny Hirai
287d69ed9e Add documentation for Editor static methods 2021-03-26 22:00:56 -07:00
Niko Kovačič
bc05f65831
Add empty text if children are empty (#3889)
If line 170 is not added issues like https://github.com/ianstormtaylor/slate/issues/3625 start surfacing. 
Because the deserialize example is mostly directly copy-pasted into projects, the added line would save many head-scratching down the lane.
2021-03-24 22:42:54 -07:00
Sunny Hirai
c52dcd330b Make editor.marks documentation more succinct 2021-03-22 00:07:24 -07:00
Sunny Hirai
f23227b325 Improve documentation for editor.marks 2021-03-22 00:02:16 -07:00
Sunny Hirai
4389fdd268 Update TypeScript documentation to add Custom Editor 2021-03-20 20:58:27 -07:00
Sunny Hirai
1940317d6a Update documentation for TypeScript availability in @next release only 2021-03-19 16:42:00 -07:00
Sunny Hirai
b0f35f6dbe Fix documentation 2021-03-13 19:37:09 -08:00
Sunny Hirai
1375ba7a40 Adjust CustomText in documentation 2021-03-13 18:44:14 -08:00
Sunny Hirai
03e774bed8 add import Descendant in TS docs 2021-03-13 12:27:59 -08:00
Sunny Hirai
73368a452f Add TypeScript Examples heading to TS documentation 2021-03-13 12:25:02 -08:00
Sunny Hirai
b5fc28d8ff Fix TS documentation mistake 2021-03-13 12:21:16 -08:00
Sunny Hirai
ec0d2d8e16 Improve documentation for TypeScript 2021-03-13 11:17:17 -08:00
Sunny Hirai
fc5d0e3a89 Fix TS documentation 2021-03-13 11:12:57 -08:00
Sunny Hirai
a72958e6c3
Improved Types (#4119)
* Experimental release to see if CustomTypes holds up through a publish

* Add experimental release script

* Fix lint

* v0.60.5-alpha.0

* Allow null properties in setNodes

* v0.60.6-alpha.0

* Revert null properties on Transforms.setNodes

* v0.60.7-alpha.0

* Update examples to use custom Element and Text with discriminated unions

* Add documentation for using TypeScript improvements

* Be explicit about typescript version in package.json

* Force lerna bootstrap to fix build issues on CI and fix a few type examples

* Add slate devDependencies with * back

* v0.60.7

* Switch to a non prerelease version to fix lerna not linking in root

* Add documentation for not using prerelease versions and on how to create experimental releases

* Try removing lerna bootstrap and see if it works
2021-03-11 11:48:31 -08:00
Jack
f697b074fc
Add discord to the list of products that use slate (#4101)
Discord uses slate
2021-02-27 17:51:15 -05:00
Sunny Hirai
08275f68f3
Custom TypeScript Types (#3835)
This PR adds better TypeScript types into Slate and is based on the proposal here: https://github.com/ianstormtaylor/slate/issues/3725

* Extend Slate's types like Element and Text

* Supports type discrimination (ie. if an element has type === "table" then we get a reduced set of properties)

* added custom types

* files

* more extensions

* files

* changed fixtures

* changes eslint file

* changed element.children to descendant

* updated types

* more type changes

* changed a lot of typing, still getting building errors

* extended text type in slate-react

* removed type assertions

* Clean up of custom types and a couple uneeded comments.

* Rename headingElement-true.tsx.tsx to headingElement-true.tsx

* moved basetext and baselement

* Update packages/slate/src/interfaces/text.ts

Co-authored-by: Brent Farese <25846953+BrentFarese@users.noreply.github.com>

* Fix some type issues with core functions.

* Clean up text and element files.

* Convert other types to extended types.

* Change the type of editor.marks to the appropriate type.

* Add version 100.0.0 to package.json

* Revert "Add version 100.0.0 to package.json"

This reverts commit 329e44e43d968700655b1c46f968bfd3147e7339.

* added custom types

* files

* more extensions

* files

* changed fixtures

* changes eslint file

* changed element.children to descendant

* updated types

* more type changes

* changed a lot of typing, still getting building errors

* extended text type in slate-react

* removed type assertions

* Clean up of custom types and a couple uneeded comments.

* Rename headingElement-true.tsx.tsx to headingElement-true.tsx

* moved basetext and baselement

* Update packages/slate/src/interfaces/text.ts

Co-authored-by: Brent Farese <25846953+BrentFarese@users.noreply.github.com>

* Fix some type issues with core functions.

* Clean up text and element files.

* Convert other types to extended types.

* Change the type of editor.marks to the appropriate type.

* Run linter.

* Remove key:string uknown from the base types.

* Clean up types after removing key:string unknown.

* Lint and prettier fixes.

* Implement custom-types

Co-authored-by: mdmjg <mdj308@nyu.edu>

* added custom types to examples

* reset yarn lock

* added ts to fixtures

* examples custom types

* Working fix

* ts-thesunny-try

* Extract interface types.

* Fix minor return type in create-editor.

* Fix the typing issue with Location having compile time CustomTypes

* Extract types for Transforms.

* Update README.

* Fix dependency on slate-history in slate-react

Co-authored-by: mdmjg <mdj308@nyu.edu>
Co-authored-by: Brent Farese <brentfarese@gmail.com>
Co-authored-by: Brent Farese <25846953+BrentFarese@users.noreply.github.com>
Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>
2020-11-24 12:30:06 -08:00
Song You
4ae58e5c95
Differentiate between useSlate and useEditor hooks (#3941)
* Rename useEditor function to useSlateStatic

* Expose useEditor hook with deprecated flag

* Clarify useEditor deprecation in file and in docs
2020-10-29 15:39:21 -04:00
CameronAckermanSEL
e40fd0534d fix #3830 2020-08-19 09:41:28 -07:00
Brent Farese
0468290eee
Replace Iterable with Generator. (#3726)
* Replace Iterable with Generator for correct types.
2020-08-06 20:17:50 -04:00
Jatin Shridhar
1e495a5cde
minor elaboration on decorations (#3747)
* minor elaboration on decorations

 highlights the difference with marks

* instead of pronoun use the word "Decorations"
2020-07-02 08:21:58 -07:00
wendellhu
c8a7883b2a
doc: fix parenthesis missing (#3754) 2020-07-02 08:21:20 -07:00
Frederik Eychenié
32e120af19
docs: remove unused "selection" from code example (#3731) 2020-06-13 09:49:00 -07:00
Frederik Eychenié
0954ffc191
docs: add GraphCMS to products using slate (#3732) 2020-06-13 09:48:12 -07:00
Jack Hanford
5ba551ad48
Update 10-normalizing.md (#3721)
Add `Transforms` to slate import so code runs when copy/pasted 😃
2020-06-04 18:36:30 -07:00
Ziad Beyens
557c51e7d4
slate-plugins-next (#3692)
Co-authored-by: Cameron Ackerman <cameron_ackerman@selinc.com>
2020-05-20 17:03:35 -07:00