* fix issue #3651 where initial click on a void block can cause the editor to crash
* simplify non null cast for editor to element weakmap retrieve
* get prettier to shut up
* fixed comment
* 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
* fix issue where inline voids can no longer be selected by allowing the zero width space to be an editable target
Co-authored-by: damareyoh <chackerman@wsu.edu>
* 3536 support flat functionality + beforeinput in Edge
* 3536 support flat functionality + beforeinput in Edge
* 3536 remove support for flat functionality
* 3536 added description of regexp
Co-authored-by: Pavlyna Bevz <pavlynabevz@pbevz-mbp.local>
The cloned dom node constructed when copying must be attached to the dom for getComputedStyle to work.
This adds the div to the body as a hidden element and removes after computing its text representation.
Since Immer freezes the selection, we will get a TypeError if we try to mutate
the selection. Also, there's no need to mutate it directly in
Transforms.setPoint.
* handle plaintext-only pastes using onPaste handler, regardless of browser
* remove extra console.log; merge code paths in onPaste - they contain the same code
* Allow zero as offset on <anchor> and <focus> inside <selection>
When creating a selection using the <selection> hyperscript tag, you couldn't
set zero as offset on <anchor> and <focus>, because of a faulty falsiness
check. This is fixed by checking if the offset is falsy and explicitly not zero.
* Make sure offset can't be null or undefined on <anchor> and <focus>
Throw exception when offset is strictly null or undefined, on <anchor> and
<focus> when creating a <selection>.
* 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
* 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