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

614 Commits

Author SHA1 Message Date
Tyler Hallada
d341cb1592 Fix links in slate-react readme (#3428)
Fixed the "Plugins" link and changed the "Constants" link (a folder which no longer exists) to a "Hooks" link.
2020-01-27 15:23:13 -05:00
Ian Storm Taylor
22d9095c39 v0.57.1 2019-12-20 12:39:32 -05:00
Ziad Beyens
101661ee27 fix: Slate editor props (#3359)
* fix: Slate editor props

 TS2322: Type 'Editor' is not assignable to type 'ReactEditor'.

* revert

* generic type

* generic type

* generic type

* extends Editor

* extends Editor

* infer

* infer
2019-12-20 12:17:00 -05:00
Johan Sörlin
5418e260d4 moved getLeaves from react to slate core package and added some basic tests (#3358) 2019-12-19 11:51:44 -05:00
Corentin.Andre
e54b07eba8 fix: undoing and redoing are switched (#3363) 2019-12-19 11:50:32 -05:00
Ian Storm Taylor
922d03e006 v0.57.0 2019-12-18 16:04:05 -05:00
Ian Storm Taylor
0bbe121d76
Remove commands (#3351)
* remove commands in favor of editor-level functions

* update examples

* fix lint
2019-12-18 15:00:42 -05:00
Ian Storm Taylor
c2d7905e19 v0.56.1 2019-12-18 14:59:46 -05:00
cvlmtg
0b7644e975 fix onBeforeInput memoization (#3347)
* fix memoization of onBeforeInput callback

* fix lint

* fix callbacks dependencies
2019-12-18 11:15:17 -05:00
Ian Storm Taylor
d765cbc3a8 v0.56.0 2019-12-17 23:03:12 -05:00
Ian Storm Taylor
235a578967
rename Node.text to Node.string (#3341) 2019-12-17 22:17:21 -05:00
Ian Storm Taylor
6f98363566 v0.55.3 2019-12-16 16:36:55 -05:00
Ian Storm Taylor
c77e1233d4 remove unused deps, fix peerDependencies 2019-12-16 16:32:44 -05:00
Ian Storm Taylor
72b4bf11db v0.55.2 2019-12-16 16:20:19 -05:00
Ian Storm Taylor
1f367a25fa v0.55.1 2019-12-16 16:05:01 -05:00
Ian Storm Taylor
40856cfa95 v0.55.0 2019-12-15 21:03:17 -05:00
Ian Storm Taylor
7d832b5e12
Standardize node matching APIs (#3327)
* add lowest mode and universal flag to `Editor.nodes`

* add `mode` handling to all transforms

* add extra `Editor.is*` helpers

* change `Editor.previous` to make all optional

* change `Editor.next` to make all optional

* change `Editor.match` to make all optional

* add `Editor.void` helper

* remove non-function match arguments

* remove NodeMatch interface

* change to lowest match by default everywhere

* rename `Editor.match` to `Editor.above`

* use new helpers

* cleanup

* make NodeEntry generic, cleanup

* fix NodeEntry generics

* ensure only ancestors are returned from Editor.above

* add type-narrowing to `Editor.nodes`, remove extras

* remove other Node entry types

* cleanup

* remove `Editor.block` and `Editor.inline` helpers
2019-12-15 19:36:05 -05:00
Ian Storm Taylor
b927fa3a11 Publish
- slate-history@0.54.6
 - slate-hyperscript@0.54.6
 - slate-react@0.54.6
 - slate@0.54.6
2019-12-13 19:15:11 -05:00
Ian Storm Taylor
00c5954f41 Publish
- slate-history@0.54.5
 - slate-hyperscript@0.54.5
 - slate-react@0.54.5
 - slate@0.54.5
2019-12-13 17:00:38 -05:00
Ian Storm Taylor
f05cefa7a8 Publish
- slate-history@0.54.4
 - slate-hyperscript@0.54.4
 - slate-react@0.54.4
 - slate@0.54.4
2019-12-13 16:08:08 -05:00
Ian Storm Taylor
54d8be1172 Publish
- slate-history@0.54.3
 - slate-hyperscript@0.54.3
 - slate-react@0.54.3
 - slate@0.54.3
2019-12-13 12:55:48 -05:00
Ian Storm Taylor
c20f771b0a Publish
- slate-history@0.54.2
 - slate-hyperscript@0.54.2
 - slate-react@0.54.2
 - slate@0.54.2
2019-12-12 20:23:18 -05:00
Ian Storm Taylor
262abdc687 Publish
- slate-history@0.54.1
 - slate-hyperscript@0.54.1
 - slate-react@0.54.1
 - slate@0.54.1
2019-12-12 17:13:18 -05:00
Ian Storm Taylor
c9ee503828 Publish
- slate-history@0.54.0
 - slate-hyperscript@0.54.0
 - slate-react@0.54.0
 - slate@0.54.0
2019-12-12 16:00:14 -05:00
Ian Storm Taylor
6552da940a
Add format_text command, and editor.marks state (#3308)
* add format_text command, refactor command extensions

* update onChange to not receive selection

* update docs

* fix tests
2019-12-12 15:37:55 -05:00
Ian Storm Taylor
26b67578d4 Publish
- slate-history@0.53.0
 - slate-hyperscript@0.53.0
 - slate-react@0.53.0
 - slate@0.53.0
2019-12-10 19:02:04 -05:00
Ian Storm Taylor
9d4a9d7a65 Publish
- slate-history@0.52.6
 - slate-hyperscript@0.52.6
 - slate-react@0.52.7
 - slate-schema@0.52.6
 - slate@0.52.6
2019-12-10 16:18:34 -05:00
Eddy Wilson
5bddee673f Make Editable accept 'as' prop (#3288)
* allow passing 'as' prop to render custom component

* Update editable.tsx
2019-12-10 16:09:58 -05:00
Ian Storm Taylor
6b37e46d5c Publish
- slate-react@0.52.6
2019-12-09 20:49:47 -05:00
Eddy Wilson
7f7f7c9e9d fix trailing new line (#3280) 2019-12-09 18:40:29 -05:00
Ian Storm Taylor
bf5cd700ca Publish
- slate-history@0.52.5
 - slate-hyperscript@0.52.5
 - slate-react@0.52.5
 - slate-schema@0.52.5
 - slate@0.52.5
2019-12-07 22:57:26 -05:00
Ian Storm Taylor
cfd4c3dd17 Publish
- slate-history@0.52.4
 - slate-hyperscript@0.52.4
 - slate-react@0.52.4
 - slate-schema@0.52.4
 - slate@0.52.4
2019-12-07 18:14:07 -05:00
Ian Storm Taylor
0856dd7115 Publish
- slate-history@0.52.3
 - slate-hyperscript@0.52.3
 - slate-react@0.52.3
 - slate-schema@0.52.3
 - slate@0.52.3
2019-12-07 11:47:18 -05:00
Ian Storm Taylor
e1918a7cf4 try to fix rollup ts declarations 2019-12-07 11:40:48 -05:00
Ian Storm Taylor
7fee65b87c Publish
- slate-history@0.52.2
 - slate-hyperscript@0.52.2
 - slate-react@0.52.2
 - slate-schema@0.52.2
 - slate@0.52.2
2019-12-06 17:57:37 -05:00
Eddy Wilson
56d798a943 implement isomorphic layout effect (#3262)
supresses warning on SSR when using useLayoutEffect by falling back
to useEffect when window is undefined

neither useLayoutEffect nor useEffect is run on server
2019-12-06 14:37:50 -05:00
Ian Storm Taylor
1389093f06 Publish
- slate-history@0.52.1
 - slate-hyperscript@0.52.1
 - slate-react@0.52.1
 - slate-schema@0.52.1
 - slate@0.52.1
2019-12-06 12:39:26 -05:00
Dylan Markow
eeecae023f Force a zero offset when inside a void node (#3261) 2019-12-06 11:13:03 -05:00
Ian Storm Taylor
8653e74f6c Publish
- slate-history@0.52.0
 - slate-hyperscript@0.52.0
 - slate-react@0.52.0
 - slate-schema@0.52.0
 - slate@0.52.0
2019-12-05 15:39:58 -05:00
Ian Storm Taylor
c2f962da58 update keywords 2019-12-05 15:38:14 -05:00
Ian Storm Taylor
c34b4b7462 Publish
- slate-history@0.51.0
 - slate-hyperscript@0.51.0
 - slate-react@0.51.0
 - slate-schema@0.51.0
 - slate@0.51.0
2019-12-05 12:52:03 -05:00
Ian Storm Taylor
f461ae5d45 fix ReactDOM batchedUpdates import 2019-12-05 12:02:41 -05:00
Ian Storm Taylor
7e6f680a1f update changelogs 2019-12-05 11:44:07 -05:00
Ian Storm Taylor
f3fc2c2a54
Change <Slate> to a controlled component (#3216)
* change <Slate> to be a controlled component

* add comment about unstable React API
2019-12-05 11:36:44 -05:00
Ian Storm Taylor
4c03b497d9
remove marks, in favor of text properties (#3235)
* remove marks, in favor of text properties

* fix lint

* fix more examples

* update docs
2019-12-05 11:21:15 -05:00
Dylan Markow
75e5015cc5 Handle autoFocus after mounting (#3226) 2019-12-04 15:01:41 -05:00
Ian Storm Taylor
f72ef80529 Publish
- slate-react@0.50.11
 - slate-schema@0.50.13
2019-12-03 21:35:23 -05:00
Ziad Beyens
2240ce2274 fix: ts (#3217) 2019-12-03 19:11:16 -05:00
Jokcy
12d21eac2d onCompositionEnd not need to insert text in firfox (#3202) 2019-12-03 01:49:23 -05:00
Ian Storm Taylor
20cb063a90 Publish
- slate-history@0.50.10
 - slate-hyperscript@0.50.8
 - slate-react@0.50.10
 - slate-schema@0.50.10
 - slate@0.50.8
2019-12-02 18:56:42 -05:00