1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-23 16:55:23 +01:00

590 Commits

Author SHA1 Message Date
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
Scott Parker
76acd9c449
Remove Outline since they switched to ProseMirror (#3694) 2020-05-20 17:01:56 -07:00
Ali Muqaddas
9834fe4e95
Fix: ESlint Error (#3688)
Value is defined in the upper scope
2020-05-17 08:51:07 -07:00
Jolene Langlinais
c00f246c7e
docs(resources): adjust editor link (#3687)
Adjusting for the new monorepo for Accord Project Markdown Editor.
2020-05-14 23:12:29 -07:00
Kevin Simons
3c80c3e88b
Fix a few issues with the documentation (#3679)
* Fix a few issues with the documentation

* Add Kitemaker to the list of sites using Slate
2020-05-13 08:56:24 -07:00
CameronAckermanSEL
d82ffe49a5 Revert "Revert "TypeScript Improvement: Use [key: string]: unknown, not [key: string]: any (#3565)""
This reverts commit 81d2f9bb8f6a78590d7868deb289ec36fb208629.
2020-05-04 17:38:14 -07:00
CameronAckermanSEL
81d2f9bb8f Revert "TypeScript Improvement: Use [key: string]: unknown, not [key: string]: any (#3565)"
This reverts commit d8adf51add861c81b51e969de704d93a51a8990f.
2020-05-04 17:33:39 -07:00
Tim Buckley
d8adf51add
TypeScript Improvement: Use [key: string]: unknown, not [key: string]: any (#3566)
* Change all [key:string]:any -> unknown

Skipping slate-hyperscript, since it seems to be an appropriate use of key: any

* Minor typo fix docs/api/locations

* Check/assert unknown attributes when needed
2020-05-04 17:16:03 -04:00
Jolene Langlinais
aacfde3bad
docs(libraries): init docs for slate sub-libraries (#3645)
* docs(libraries): init docs for slate sub-libraries

Signed-off-by: irmerk <jolenelanglinais@gmail.com>

* docs(libraries): reword slate history summary

Co-authored-by: Cameron Ackerman <cameron_ackerman@selinc.com>

Co-authored-by: Cameron Ackerman <cameron_ackerman@selinc.com>
2020-05-01 12:16:36 -07:00
Jolene Langlinais
970c2aac13
docs(concepts): include normalizing inline default behavior (#3637)
Signed-off-by: irmerk <jolenelanglinais@gmail.com>
2020-04-24 08:28:21 -07:00
Jolene Langlinais
c04672b1f7
docs(resources): add product and editor (#3632)
Signed-off-by: irmerk <jolenelanglinais@gmail.com>
2020-04-23 21:26:31 -07:00
George Rodier
9a6e8fba92
Import Transforms in custom elements walkthough (#3630) 2020-04-22 09:09:42 -07:00
Kirk Swenson
f6bfe034d7
Fix typos and other minor issues in docs (#3597)
Fixed typos and grammatical errors in the documentation
2020-04-10 09:05:03 -07:00
Ken Aoki
5da89b8656
Update 01-installing-slate.md (#3554) 2020-03-24 18:12:06 -07:00
Charanjit Singh
f86f5ca065
Fix Typo (#3545)
Typo fix in documentation
2020-03-11 08:11:42 -07:00
Cameron Ackerman
1e7d21f7cd
Add API documentation for Slate core package (#3524)
* Create transforms.md

* Create initial documentation for transforms

* Remove extra whitespace in transforms.md

* Create initial documentation for interfaces

* Rearrange API docs by category of interface

* Add documentation of static methods

* Use 'static' notation for transforms
2020-03-05 09:30:29 -08:00
琚致远
2d901f6520
Update 08-rendering.md (#3520) 2020-02-27 14:49:29 -08:00
Ondrej Stanek
ad881564d8
Fix invalid example link (#3517)
Hovering menu => Hovering toolbar
2020-02-26 07:47:59 -08:00
Lucas Willems
c5249c745c
Update 06-editor.md (#3511) 2020-02-21 09:14:47 -08:00
Björn Theart
c4eb7b37bc
Update 06-editor.md (#3510) 2020-02-21 08:22:28 -08:00
Xleine
217bdd611b fix some doc's bug (with v0.57.1) (#3393)
* fix: code blocks's info string
this info string. should be `jsx`

* fix: editor's exec invoke
now, editor.exec() is not available in Slate v0.57.1
so, use editor.insertText() to instead it

*  refactor: delete a nerver used value

* update add new chinese translate
      update chinese translate to `v0.57.1`

Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>
2020-01-27 15:24:15 -05:00
Aykut Kardaş
f813af790e An unused state was deleted. (#3413) 2020-01-27 15:22:54 -05:00
Jonathan Wieben
612dbcb3a6 Chore: Typo in docs (#3411)
* Fix: Typo in docs

It should read edit instead of editor.

* Chore: Further typo fix
2020-01-27 15:22:36 -05:00
David Calhoun
27db5e6c45 docs: walkthroughs: make implicit React dependencies explicit (#3402) 2020-01-27 15:21:08 -05:00
Leon
8cd9b79352 Update 04-applying-custom-formatting.md (#3371) 2020-01-03 23:02:40 -08:00
Ian Storm Taylor
e1f4ff1f6c fix docs 2019-12-19 14:37:10 -05:00
Ian Storm Taylor
fa4ab37b02 Merge branch 'master' of github.com:ianstormtaylor/slate 2019-12-19 14:34:38 -05:00
Ian Storm Taylor
dae32cd473 update docs for removal of commands 2019-12-19 14:34:34 -05:00
Sunny Hirai
3ffd73cd7d
Fix broken link in introduction of docs (#3357) 2019-12-18 18:23:05 -08:00
Sunny Hirai
cc7f035229 Added a warning for Android in faq (#3356) 2019-12-18 21:18:35 -05:00