* empty
* empty
* empty
* Begin move from cypress to playwright.
* Switch remaining tests to playwright, remove old cypress suppport files.
* Clean up playwright config
* Enable ff, and safari when on mac.
* Fix safari/ff mentions test
* Fix code-highlighting test on ff/safari
* Add a local retry as a few tests are flaky.
* Replace cypress w/ playwright in gitignore.
* Update to latest yarn to fix ci install?
* Update yarn.lock w/ yarn command.
* Fix mocha tests.
* Fix prettier
* Fix Editor.above with point
Editor.above should ignore checking text nodes (they're never above
anything) and continue looking for ancestors.
Otherwise it won't be able to find any above nodes when starting to look
from a text node.
* Add changeset
* Stop trying to call bind on undifined when getBoundingClientRect is not defined. This is happening when testing slate with react testing library
* Add changeset
* Use stylesheet to give Editable components a default style
* Give Editors a unique id
* Use per-editor stylesheets to give editors a min-height
* Make editor min-height respond to changes in placeholder height
* Add changeset for stylesheet changes
* Prevent unnecessary creations of ResizeObservers
* Update yarn.lock
Since this really just calls setNodes, it seems like it should offer the same options.
Without this change, doing something like applying a mark to the contents of a selected block with `hanging` works one way, while trying to do the reverse (remove the mark) cannot include the "hang".
`Editor.unhangRange()` could decide to proceed with an adjustment in cases where the range was not hanging.
Because the algorithm it uses *always* skips over the first node it encounters, this meant the selection was adjusted in non-hanging cases.
This change reduces the chances of an incorrect decision to adjust.
Transforms now pass the `voids` flag to `unhangRange()` as it seems logical that the adjusted range should reflect the intention of the operation.
This fixes a unit test I added for markable voids that had to be skipped because of the `unhangRange()` error, and fixes a couple other long-skipped tests.
* Update `isHistory` to match new interface.
This change merely preserves the original functionality and does not add verification of Batch's new `selectionBefore` property.
* Add changeset.
* Create new function hasSelectableTarget and use it instead of hasEditableTarget. Fixes Copy/pasting void elements is not working https://github.com/ianstormtaylor/slate/issues/4808
* Add changeset
* Revert a change that made editable void not editable and add cypress test for editing editable void
* Extract methoods into easily overridable with help from @alex-vladut
Some void elements are effectively stand-ins for text, such as with the mentions example,
where the mention element renders the character's name. Users might want to format Void
elements like this with bold, or set their font and size, so `editor.markableVoid` tells
Slate whether or not to apply Marks to the text children of void elements.
- Adds `markableVoid()` as a schema-specific overrideable test.
- Changes `addMark` and `removeMark` so marks can apply to voids. Also changes behavior
of collapsed selection so that if a markable Void is selected, the mark will be applied /
removed.
- Shows how `markableVoid()` can work in the mentions example