* 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.
* 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
Made a fix for the fact that if you were standing in a <li> wrapped in an <ul> with no text and pressed backspace, the <ul> would go away while the <li>'s stay.
* fixed some bugs with the input event handler on the embeds example, got rid of the non functional 'is selected and is focused' conditions for showing the input.
* fix linting error
Co-authored-by: DamareYoh <34608378+DamareYoh@users.noreply.github.com>
* 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: 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>