If you have, for example, a bold mark, and you hit "Enter", the new
block won't carry over the formatting. Instead, it should (at least if
you start typing right away).
Fixes#1269.
* provide polyfill for btoa and atob
* add fallback for Buffer.from
* fix listing issues
* remove window usage for URIComponent
* remove monkeyPatching and add window check
* fix linter warnings
* update to use isomorphic-base64
In `slate-react@0.6.0`: The data argument to event handlers has been removed...
The event handlers generated in the slate-simulator `Simalator` object was
still passing a data argument.
* Save marks when creating native ranges in onNativeBeforeInput
When we used native ranges in onNativeBeforeInput, we weren't carrying
over the marks from Slate's selection. This made it impossible to know
that the next character typed should have a set of marks.
Fixes#1270.
* Ensure marks are cleared after successfully entering text
* Stop setting marks in findRange
Adding the selection's marks inside findRange was too broad of a
change, and would keep marks after doing things like moving a
selection around. We should use selection.marks directly in
insertTextAtRange instead.
* Update find-range.js
* 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
* 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#1176Fixes#1177
* Fix lint error.