1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-01-29 11:18:25 +01:00

7 Commits

Author SHA1 Message Date
Joe Anderson
b52e08b0ea
Add support for read-only and non-selectable elements (#5374)
* Add `isElementReadOnly`

fix delete while selected

fix type while selected

fix failing test

add tests

add e2e test

linter fixes

add changeset

* fix yarn build:next

* Add `isSelectable`
2023-04-03 11:02:26 -07:00
Ed Hager
5a0d3974d6
Fix/delete all closes keyboard (#5368)
* fix: clean up ref handling in leaf

* fix: delay rendering of placeholder to allow selections to settle

* fix: move placeholder height calculation into layout effect

* fix: add change set

* fix: handle placeholder resizing in a better way

* fix: fix placeholder integration test
2023-03-20 09:23:54 -07:00
Joe Anderson
a9c0e37472
Fix markdown-shortcuts.test.ts for webkit (#5367)
* Fix test failure on webkit

* Increase Playwright timeout
2023-03-16 16:20:41 -07:00
Sergei Dedkov
9635b992a0
Compare only decorations offsets in MemoizedText. Code highlighting example improvements. (#5271)
* add basePath prop to Range inside slate-react custom types, calculate absolute ranges on passing them into TextComponent

* code highlighting example improvements, minor markdown preview refactoring

* changeset added

* Revert "add basePath prop to Range inside slate-react custom types, calculate absolute ranges on passing them into TextComponent"

This reverts commit afa085c289bc67ce3d27dd33b1f074ab8153efe8.

* add basePath prop to Point inside slate-react custom types, resolve relative ranges on passing them to TextComponent

* Update changeset

* linter fixes

* remove redundant checks inside renderElement function

* custom types fixes for Range and Point in examples

* wrap intervals and ranges extractors in useMemo hook for running them only if editor.children is changed

* revert basePath changes, compare only offsets for MemoizedText decorations

* use an element as a key in decorations ranges map instead of id

* simplify code highlighting implementation, make code block nested

* fix code-highlighting example, add toolbar code block button

* remove redundant code

* fix code highlighting playwright integration test
2023-02-09 11:53:21 -07:00
Sergei Dedkov
fc84fdbd99
fix hovering-toolbar playwright integration test (#5284) 2023-02-07 22:13:09 -07:00
Kyle McLean
9c4097a26f
Simplify implementation of custom editor styling (#5278)
* Switch back to using inline styles for default editor styles

* Add example page and test for editor styling

* Add section in docs for editor styling

* Add test for editor height being set to placeholder height

* Add changeset
2023-01-31 19:17:27 -07:00
Gary Borton
5dc4396f6b
Switch from cypress to playwright. (#5248)
* 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
2023-01-13 20:36:04 -07:00