1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-03-19 12:49:42 +01:00

3471 Commits

Author SHA1 Message Date
dependabot[bot]
41af0584d2
build(deps): bump handlebars from 4.7.6 to 4.7.7 (#4249)
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.7.6 to 4.7.7.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.7.6...v4.7.7)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-07 09:54:30 -04:00
Bjørn Stabell
b4eeccb017
Ensure round-trip tests don't mutate output before checking against it => reveals 4 tests are broken (#4188)
* Ensure round-trip tests don't mutate output before checking against it.  Need deep copy instead of shallow.

* Skip the 4 tests that are broken - they should perhaps be fixed in a separate PR
2021-05-07 09:52:55 -04:00
Juan J. Jimenez-Anca
1808d0ed9e
Update transforms.md (#4247)
Clarify the different usage for `select` and `setSelect`
2021-05-07 09:49:13 -04:00
Ulion
e6413d4625
Fix addMark/removeMark caused unexpected onChange. (#4227)
* Fix addMark/removeMark caused unexpected onChange.

* Create three-parrots-remember.md

Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>
2021-05-05 20:30:17 -04:00
Dylan Schiemann
623960a7d1
Update IS_FIREFOX_LEGACY flag to prevent FF crash (#4237)
* Update IS_FIREFOX_LEGACY flag to prevent FF crash

#4118 and #4150 introduced IS_FIREFOX_LEGACY, but this block of code was not updated to reflect that. This breaks insertion of emoji and unicode characters in slate-react. This change fixes #3855.

* Update editable.tsx

* Create forty-mails-roll.md

* Update editable.tsx

Apologies, in my tests I was using yarn patch and didn't need to modify the import statement, hopefully this will pass CI now.

Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>
2021-05-05 19:56:10 -04:00
dependabot[bot]
3b3c94a72c
Bump immer from 7.0.7 to 8.0.1 (#4050)
Bumps [immer](https://github.com/immerjs/immer) from 7.0.7 to 8.0.1.
- [Release notes](https://github.com/immerjs/immer/releases)
- [Commits](https://github.com/immerjs/immer/compare/v7.0.7...v8.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-05 19:52:00 -04:00
Andrew Herron
feb293aaa2
Apply no-children normalization fix before normalization (#4208)
* Test cases for failure condition

* Before normalizing ensure all elements have at least one text child. This is a normalization requirement that some normalization fixes require, so it must be done as an initial dedicated pass.
2021-05-05 19:39:37 -04:00
Andrew Herron
796389c7d3
Added insert_node path checking to match how other operations are applied (#4230)
* Added try/finally to editor.apply and Editor.withoutNormalizing for state cleanup

* Added insert_node path checking to match how other operations are applied
2021-05-05 19:31:13 -04:00
Claudéric Demers
c14e1fbc77
Fix duplicated content and other bugs related to drag and drop handling (#4238)
* Fix drag and drop logic

* Add changeset
2021-05-05 19:26:43 -04:00
github-actions[bot]
f2d110100b
Version Packages (#4198)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate@0.62.1 slate-react@0.62.1
2021-05-05 19:10:11 -04:00
Claudéric Demers
1c32b97d23
Collapse expanded selection before move word (#4211) 2021-05-03 15:29:27 -04:00
Julian Krispel-Samsel
737aaa9cde
Fix iframe crash (#4219)
* fixes #4170

* add smoke test for iframe example

* add changeset

* update changeset wording
2021-04-26 14:47:12 +01:00
katsew
c70e30f83d
fix: shadow-dom example not found in examples (#4226) 2021-04-26 10:35:54 +01:00
Sunny Hirai
de159f99f8 docs: Simplify heading names in Editor API docs 2021-04-23 22:57:01 -07:00
Julian Krispel-Samsel
ea2eefefb8
Add renderPlaceholder (#4190) 2021-04-23 21:22:11 +01:00
Sunny Hirai
3c5cb198df docs: Add link to normalizing docs from API reference 2021-04-22 16:54:31 -07:00
Sunny Hirai
b3d068f75c docs: Fix TOC on Editor and second attempt to fix GitBook link 2021-04-22 16:52:20 -07:00
Sunny Hirai
502ff6dc89 docs: fix links 2021-04-22 16:47:40 -07:00
Sunny Hirai
f198d0bd1f
docs: improve editor docs (#4218) 2021-04-22 16:41:11 -07:00
Julian Krispel-Samsel
602f170156
Update readonly example and add test (#4212)
* fixes #4039, update readonly example

* add cypress test for readonly mode
2021-04-21 09:29:19 +01:00
Julian Krispel-Samsel
4181107e56
4196 integration tests with cypress (#4206)
* - update gitignore
- add cypress configuration and example test

* add integration tests to ci workflow

* add note about running integration tests

* Update docs/general/contributing.md

Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>

* Update .gitignore

Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>

* Update cypress.json

Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>

* add baseUrl, remove goTo command

Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>
2021-04-16 11:17:24 +01:00
Bjørn Stabell
1fe6d0cef1
refactor: New Editor.positions based off PR#3644 (#4199)
Also fixes `Editor.positions` bug #3458 that was fixed in parallel in #4073,
but includes refactorings as discussed in #3644.

vs #3458
- Updated to include changes from later PRs (#3957)
- Does not add test cases (relies on those from #4073)
- Minor improvements on comments
2021-04-14 11:30:16 -04:00
Julian Krispel-Samsel
25a69949d7
removes redundant travis config file (#4201) 2021-04-14 11:00:19 -04:00
kamilkazmierczak
6a1376332b
Make HAS_BEFORE_INPUT_SUPPORT flag more generic. (#4118)
* Change "HAS_BEFORE_INPUT_SUPPORT" flag to more generic.

* Fix patterns and styles issues.

* Fix lint issues.

* Create dirty-rabbits-speak.md

* Update dirty-rabbits-speak.md

* Update editable.tsx

Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>
2021-04-13 11:20:09 -04:00
Ian Storm Taylor
d79267c144
Update silent-bees-sing.md 2021-04-13 11:17:02 -04:00
Ridham Bhat
95f402c594
Correcting the splitting logic in setNodes (#4168)
* Defined conditions to always split nodes

Those conditions are:
- When the anchor does not lie at the start of a node.
- When the focus does not lie at the end of a node.

* prev variable now points to correct updated node.

Previously, in the case the previous node gets merged in last iteration,
prev pointer could be pointing to the wrong node.
That posed problems, especially when normalizing empty text nodes.
So, now in every iteration, we get a copy of updated node structure,
and take value of prev from that.

* Test to check splitting and normalization logic.

- In this, since anchor and focus bleeds on both sides, splits happen.
- Empty text nodes are introduced on either side.
- New properties are set in the new node selection.
- Normalization happens and takes care of those empty text nodes.

* Create two-lies-appear.md

* Update two-lies-appear.md

Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>
2021-04-13 11:15:47 -04:00
Bjørn Stabell
fd70dc0b2c
Save some remove_text calls if the text is zero length (#4193)
* Save some remove_text calls if the text is zero length.

* Remove unnecessary !text check - text is always string, and add similar check to 'insert_text' as well

* Create giant-adults-matter.md

Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>
2021-04-13 11:14:30 -04:00
Andrew Herron
2dad21d1d7
set_node operations did not invert correctly after serialization (#4078)
* Use null instead of undefined as the old value for set_node operations that add a property

* Changelog

* Omit undefined values from `set_node` operations completely. Delete missing property values in `Transforms.apply()` instead.

* Add tests for removing set_node properties with null and undefined
2021-04-13 11:06:07 -04:00
Scott Grant
b9f07af5ac
Updates outdated TypeScript link in first walkthrough document (#4197) 2021-04-13 11:04:45 -04:00
Githoniel
ea6dc08913
fix ime double input with mark (#4158)
* fix ime double when apply mark

* add changeset

* refactor to use auto-incrementing key and add comments for it

* Update lovely-walls-knock.md

* Update lovely-walls-knock.md

Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>
2021-04-13 10:59:07 -04:00
Githoniel
de5cc7e5ed
feat: sync selection to extactly matched DOM selection (#4157)
* feat: sync selection to extractly dom selection

* revert mistakenly modified files

* add changeset

* toSlatePoint will throw error again when not extractMatch

* Fix misspellings, rename extractMatch to exactMatch

* rename option to match code style

* Update four-poets-move.md

Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>
2021-04-13 10:58:46 -04:00
case
6a6d9f614d
Fix Underline <FormatButton /> in Hovering Toolbar Example (#4128)
* Fix Underline <FormatButton /> in `Hovering Toolbar Example`

* Update hovering-toolbar.tsx

Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>
2021-04-13 10:57:39 -04:00
Michal Srb
734bfb5788
Stop basic installation from throwing typescript errors (#4185) 2021-04-13 10:12:42 -04:00
Bjørn Stabell
4945a1a275
Fix permissions (was executable, but doesn't have to be) (#4192) 2021-04-13 10:00:23 -04:00
Michal Srb
bcb7c4e4c5
Fix range API link (#4194) 2021-04-13 09:56:59 -04:00
Ian Storm Taylor
68e39215bb
Update 04-transforms.md 2021-04-12 14:14:31 -04:00
hoangbits
8c3c7ada87
Update images.tsx (#4180) 2021-04-08 19:59:36 -04:00
Sunny Hirai
c9af0cfbf7 docs: Move Node.matches into the Check methods section 2021-04-07 23:03:59 -07:00
Ian Storm Taylor
9613d832e5 update docs 2021-04-07 18:16:45 -04:00
Ian Storm Taylor
41aa2754ee update docs 2021-04-07 18:16:24 -04:00
Ian Storm Taylor
4b3dc18f73 update docs 2021-04-07 18:15:03 -04:00
Ian Storm Taylor
787a79fede update docs 2021-04-07 18:13:33 -04:00
Ian Storm Taylor
f183bde599
add transforms concept docs (#4179) 2021-04-07 18:03:57 -04:00
Ian Storm Taylor
a59ee4d8c6 update release comment workflow to checkout pr 2021-04-07 11:18:12 -04:00
Ian Storm Taylor
451af772f5 update comment workflow 2021-04-07 10:59:46 -04:00
Ian Storm Taylor
cfdbc51f12 update comment workflow 2021-04-07 10:58:56 -04:00
Ian Storm Taylor
31fb3c91d2 update comment workflow 2021-04-07 10:56:01 -04:00
Ian Storm Taylor
fcbee8c550 Merge branch 'main' of github.com:ianstormtaylor/slate into main 2021-04-07 10:51:34 -04:00
Ian Storm Taylor
cf21d5cfd5 add commenting release workflow 2021-04-07 10:51:26 -04:00
Sunny Hirai
f7b6f438ef docs: Add single quotes around option value that is a string 2021-04-06 22:03:03 -07:00