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

74 Commits

Author SHA1 Message Date
Ian Storm Taylor
11b2003f53 Remove data (#1244)
* remove data from event handler signatures

* standardize known transfer types

* add setEventTransfer to docs

* update examples, fix drag/drop

* fix tests and draggable attribute setting
2017-10-16 21:04:16 -07:00
Ian Storm Taylor
ba5263e0f6 Publish
- slate-react@0.5.5
2017-10-16 20:37:03 -07:00
Ian Storm Taylor
fb0bdfa28b fix linter 2017-10-16 20:35:18 -07:00
Ian Storm Taylor
276ed274b1 fix drag/drop 2017-10-16 20:33:04 -07:00
Ian Storm Taylor
6422de5b56 Publish
- slate-react@0.5.4
2017-10-16 19:57:10 -07:00
Ian Storm Taylor
1d140e70fb fix missing return true for before plugin 2017-10-16 19:56:28 -07:00
Ian Storm Taylor
045c1879f4 update changelog and docs 2017-10-16 18:58:31 -07:00
Ian Storm Taylor
c315a38bb5 Publish
- slate-base64-serializer@0.1.16
 - slate-dev-logger@0.1.17
 - slate-html-serializer@0.2.2
 - slate-hyperscript@0.2.2
 - slate-plain-serializer@0.2.2
 - slate-prop-types@0.2.2
 - slate-react@0.5.3
 - slate-simulator@0.1.16
 - slate@0.27.2
2017-10-16 18:51:54 -07:00
Ian Storm Taylor
b462c2ce19 deprecate data, add getEventRange and getEventTransfer helpers (#1243) 2017-10-16 18:50:29 -07:00
Ian Storm Taylor
617fba2ac0 Split core plugin (#1242)
* split core into before/after, add onBeforeInput to before

* migrate handlers to before plugin, add event handlers constants

* cleanup

* refactor hotkeys into constants file

* fix serializer, disable core plugin tests

* fix linter
2017-10-16 17:31:43 -07:00
Ian Storm Taylor
6097f127ef Publish
- slate-react@0.5.2
2017-10-16 13:43:37 -07:00
Ryan Grove
6378c12a98 Use native beforeinput events to handle text insertion when possible (#1232)
* Add support for finding a Slate range from a native StaticRange

* Add a `SUPPORTED_EVENTS` environment constant

This is an object mapping of DOM event names to booleans indicating
whether the browser supports that event.

* Use native `beforeinput` events to handle text insertion when possible

In browsers that support it (currently only Safari has full support),
the native `beforeinput` DOM event provides much more useful information
about text insertion than React's synthetic `onBeforeInput` event.

By handling text insertion with the native event instead of the
synthetic event when possible, we can fully support autocorrect,
spellcheck replacements, and related functionality on iOS without
resorting to hacks.

See the discussion in #1177 for more background on this change.

Fixes #1176
Fixes #1177

* Fix lint error.
2017-10-16 13:38:23 -07:00
Ian Storm Taylor
78cee7d5fb Publish
- slate-react@0.5.1
2017-10-16 10:36:23 -07:00
Ian Storm Taylor
fe24e82d16 fix to check range count before getting ranges, closes #1237 (#1239) 2017-10-16 10:31:27 -07:00
Yifeng Wang
4fe6ac36ec disable ios compat behaviour on desktop (#1236) 2017-10-15 21:47:39 -07:00
Ian Storm Taylor
ca6ae43b74 Publish
- slate-base64-serializer@0.1.15
 - slate-dev-logger@0.1.16
 - slate-html-serializer@0.2.1
 - slate-hyperscript@0.2.1
 - slate-plain-serializer@0.2.1
 - slate-prop-types@0.2.1
 - slate-react@0.5.0
 - slate-simulator@0.1.15
 - slate@0.27.1
2017-10-15 19:24:52 -07:00
Ian Storm Taylor
95f550c427 update changelog 2017-10-15 19:24:10 -07:00
Ian Storm Taylor
f69d2c4a12 remove keyboard data.* properties (#1235)
* update examples and walkthroughs

* deprecate data keyboard properties

* update examples

* add is-hotkey to resources doc

* udpate docs

* update docs

* fix split-block test
2017-10-15 19:23:07 -07:00
Ian Storm Taylor
8dceea3c67 update changelogs 2017-10-14 15:40:48 -07:00
Ian Storm Taylor
f57b53c219 Publish
- slate-base64-serializer@0.1.14
 - slate-dev-logger@0.1.15
 - slate-html-serializer@0.2.0
 - slate-hyperscript@0.2.0
 - slate-plain-serializer@0.2.0
 - slate-prop-types@0.2.0
 - slate-react@0.4.0
 - slate-simulator@0.1.14
 - slate@0.27.0
2017-10-14 15:38:20 -07:00
Ian Storm Taylor
6c42f6c9c3 Rename Range to Leaf, and Selection to Range (#1231)
* rename Range to Leaf

* rename Selection to Range

* add findDOMRange, findNode, findRange helpers

* refactor to remove findDropPoint util

* revert findDOMNode to throwing errors

* export new helpers, fix linter

* update docs

* update examples
2017-10-14 15:36:27 -07:00
Ian Storm Taylor
8b9fc09377 Publish
- slate-react@0.3.4
2017-10-14 11:22:35 -07:00
Ian Storm Taylor
35e8978655 remove void spacers in readonly, add tests 2017-10-14 10:10:47 -07:00
Ian Storm Taylor
3fef03174e Publish
- slate-react@0.3.3
2017-10-13 18:35:49 -07:00
Ian Storm Taylor
e815c2752c fix findNativePoint in empty blocks, add error reporting to examples 2017-10-13 18:34:35 -07:00
Ian Storm Taylor
576fb5a133 tweak void styles, fix tests 2017-10-13 18:05:05 -07:00
Ian Storm Taylor
5c1d43e3f9 fix block void node spacing, closes #1226 2017-10-13 18:00:51 -07:00
AlbertHilb
aa2ae9f4a1 Move onDragStart handler from Node to Void. (#1167) 2017-10-13 16:59:31 -07:00
Ian Storm Taylor
a8fd9de61f Publish
- slate-react@0.3.2
2017-10-13 15:44:28 -07:00
Ian Storm Taylor
41b3c80f11 fix tests 2017-10-13 15:43:59 -07:00
Ian Storm Taylor
545469ffe0 fix findNativePoint for void nodes 2017-10-13 15:22:16 -07:00
Ian Storm Taylor
d65931c74a Publish
- slate-base64-serializer@0.1.13
 - slate-dev-logger@0.1.14
 - slate-html-serializer@0.1.16
 - slate-hyperscript@0.1.13
 - slate-plain-serializer@0.1.14
 - slate-prop-types@0.1.13
 - slate-react@0.3.1
 - slate-simulator@0.1.13
 - slate@0.26.1
2017-10-13 15:03:20 -07:00
Renaud Chaput
e960918f87 Upgrade to React 16 (#1178)
* Allow React 16 in peerDeps and use it for dev

* Make tests pass with React 16

Changes are cosmetic:
- React 16 no longer adds a trailing `;` to `style` attributes
- React 16 outputs `0` and not `0px` for sizes in `style`
2017-10-13 15:01:18 -07:00
Ian Storm Taylor
de573f2bfc Publish
- slate-base64-serializer@0.1.12
 - slate-dev-logger@0.1.13
 - slate-html-serializer@0.1.15
 - slate-hyperscript@0.1.12
 - slate-plain-serializer@0.1.13
 - slate-prop-types@0.1.12
 - slate-react@0.3.0
 - slate-simulator@0.1.12
 - slate@0.26.0
2017-10-13 12:26:03 -07:00
Ian Storm Taylor
c62ab65a53 update slate-react changelog 2017-10-13 12:24:29 -07:00
Ian Storm Taylor
e53cee3942 refactor decorations to use selections (#1221)
* refactor decorations to use selections

* update docs

* cleanup

* add Selection.createList

* fix tests

* fix for nested blocks

* fix lint

* actually merge

* revert small change

* add state.decorations, with search example
2017-10-13 12:04:22 -07:00
Ian Storm Taylor
65ab5681d9 Publish
- slate-base64-serializer@0.1.11
 - slate-dev-logger@0.1.12
 - slate-html-serializer@0.1.14
 - slate-hyperscript@0.1.11
 - slate-plain-serializer@0.1.12
 - slate-prop-types@0.1.11
 - slate-react@0.2.2
 - slate-simulator@0.1.11
 - slate@0.25.4
2017-10-13 10:51:48 -07:00
Ian Storm Taylor
28b865269c Merge branch 'master' of github.com:ianstormtaylor/slate 2017-10-13 10:35:06 -07:00
AlbertHilb
671c5857eb Rewrite drag&drop code related to void nodes. (#1193)
* Remove `onDragEnter`, `onDragLeave` and `onDrop` `Void` handlers.
Add `getDropPoint` to `utils`.

* Resolved caret position can be inside a void node even if the DOM
drop target isn't inside it. So resolve first the caret position,
then, if necessary, adjust the Slate drop target.
2017-10-13 10:34:56 -07:00
Per-Kristian Nordnes
79562f51de Fix copy single marked word bug (Chrome/Safari) (#1164) 2017-10-13 10:21:13 -07:00
Ian Storm Taylor
b1469d62eb fix tests 2017-10-12 20:03:18 -07:00
Ian Storm Taylor
c36362a425 fix void blocks to node be inline-block, closes #1210 2017-10-12 14:24:38 -07:00
Ian Storm Taylor
f9894ed443 Publish
- slate-react@0.2.1
2017-09-29 11:13:30 -07:00
Ian Storm Taylor
ed77bf0fa1 fix change queueing in <Editor> (#1196) 2017-09-29 11:12:13 -07:00
Ian Storm Taylor
fbefe18110 Publish
- slate-base64-serializer@0.1.10
 - slate-dev-logger@0.1.11
 - slate-html-serializer@0.1.13
 - slate-hyperscript@0.1.10
 - slate-plain-serializer@0.1.11
 - slate-prop-types@0.1.10
 - slate-react@0.2.0
 - slate-simulator@0.1.10
 - slate@0.25.3
2017-09-29 09:18:17 -07:00
Ian Storm Taylor
3c3093448f update changelog 2017-09-29 09:12:06 -07:00
Ian Storm Taylor
f442255739 re-add the onBeforeChange handling for normalizing to the <Editor> (#1195)
* re-add the onBeforeChange handling for normalizing to the <Editor>

* fix syntax

* add normalization with core schema too

* fix lint warning
2017-09-29 09:11:41 -07:00
Ian Storm Taylor
c90f5f0825 Publish
- slate-base64-serializer@0.1.9
 - slate-dev-logger@0.1.10
 - slate-html-serializer@0.1.11
 - slate-hyperscript@0.1.9
 - slate-plain-serializer@0.1.10
 - slate-prop-types@0.1.9
 - slate-react@0.1.10
 - slate-simulator@0.1.9
 - slate@0.25.2
2017-09-27 08:41:36 -07:00
Ryan Yurkanin
f1f2db807e Adding regular build to the prepublish flow (#1184) 2017-09-26 18:37:42 -07:00
Ian Storm Taylor
9df4b6f65a Publish
- slate-html-serializer@0.1.10
 - slate-plain-serializer@0.1.9
 - slate-react@0.1.9
2017-09-26 10:08:19 -07:00