1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-24 01:02:31 +01:00

3456 Commits

Author SHA1 Message Date
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
Sunny Hirai
18fb41cc2a docs: Change format of options to be more intuitive 2021-04-06 22:02:14 -07:00
Sunny Hirai
5635f9011d docs: Fix link to Range reference 2021-04-06 21:49:26 -07:00
Sunny Hirai
4bfd21534a docs: Fix link in Nodes to be a relative link so it doesn't open a new tab 2021-04-06 21:47:36 -07:00
Sunny Hirai
d0ea3ccb5e docs: Fix link in installing slate 2021-04-06 21:44:48 -07:00
Sunny Hirai
4e6ec4fe53 docs: Fix links in Nodes documentation 2021-04-06 21:43:31 -07:00
Sunny Hirai
d034c19616 docs: Try to fix links issue one more time using relative links 2021-04-06 18:56:32 -07:00
Sunny Hirai
b77d1ca4d9 docs: Another attempt at fixing links in docs 2021-04-06 18:41:56 -07:00
Sunny Hirai
320c3aee29 docs: Another try at modifying links but without the preceding slash 2021-04-06 18:40:30 -07:00
Sunny Hirai
8a9b0c973e docs: Fox links in locations docs 2021-04-06 18:31:14 -07:00
Sunny Hirai
1371abee2f docs: Move the option descriptions underneath the options 2021-04-06 18:24:52 -07:00
Sunny Hirai
a1b8291a0a docs: Specify the meaning of the mode option on Editor.nodes 2021-04-06 18:19:16 -07:00
Udayan Shevade
1a4c67f5fa
docs: update readme contributing link (#4167) 2021-04-03 15:25:15 -07:00
Sunny Hirai
0b0328b2d0 docs: Improve wording on TypeScript migrating 2021-04-01 20:11:51 -07:00
Sunny Hirai
b16051e00b docs: Improve formatting on the TypeScript migration instructions 2021-04-01 18:21:13 -07:00
Sunny Hirai
6e64c85b77 docs: Added migrating gotchas to typescript documentation 2021-04-01 18:18:42 -07:00