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

113 Commits

Author SHA1 Message Date
Samy Pesse
25959c1e4e Replace all calls to memoized functions using nodes instead of keys 2016-11-03 00:32:01 +01:00
Samy Pessé
af6b0e0388 Add unit test for undo of setNodeByKey 2016-11-01 11:53:36 +01:00
Soreine
6a77aa1cf3 Export wrapBlockByKey and add tests 2016-10-27 14:56:04 +02:00
Soreine
19f56c8cdb Merge branch 'master' into schema-normalize 2016-10-27 10:36:58 +02:00
Tyler Johnson
db95f4bdec fix for deleting across an inline (#384)
* failing test for deleting across an inline

* fix deleting across inlines (#384)

* Add jsdom devDepencency

Required as peer dependency by mocha-jsdom
2016-10-26 12:59:03 -07:00
Nikita Zyulyaev
270c2ab219 Fix inserting fragment at the end of current text node (#405)
* fix insertFragment

* insert multi-block fragment at the end of current text node test case
2016-10-26 11:30:45 -07:00
Soreine
40456a0e4a Add tests for splitNode operation 2016-10-26 19:00:59 +02:00
Samy Pessé
440aebb685 Add test for selection inside a removeNodeByKey 2016-10-26 17:25:20 +02:00
Samy Pessé
e86269a168 Add basic tests for removeNodeByKey 2016-10-26 17:08:44 +02:00
Samy Pessé
6c43cd57e1 Merge remote-tracking branch 'origin/schema-normalize-selection-ops' into schema-normalize-selection-ops 2016-10-26 14:57:15 +02:00
Samy Pessé
29afc577b0 Add more tests for removeTextByKey 2016-10-26 14:57:06 +02:00
Soreine
b3e1b3ad08 Adapt existing tests 2016-10-26 14:48:50 +02:00
Soreine
947513fc58 Add test to joinNodeByKey 2016-10-26 14:48:49 +02:00
Samy Pessé
99e9a77639 Be inclusive for selection in insertText 2016-10-26 14:07:26 +02:00
Samy Pessé
e08ef88d54 Complete tests for selection and insertTextByKey 2016-10-26 13:42:48 +02:00
Samy Pessé
53d355511f Add unit test for selection in insertText 2016-10-26 13:37:45 +02:00
Samy Pessé
8bb5bc1840 Add test for selection after the insertion 2016-10-26 13:35:00 +02:00
Samy Pessé
20fc819c8c Add test for inserting text before selection 2016-10-26 13:11:32 +02:00
Samy Pessé
9ae17d2091 Add unit test for testing insertTextByKey with marks 2016-10-26 12:56:08 +02:00
Samy Pessé
7c046a7b98 Add more basic test for text insertion 2016-10-26 12:40:33 +02:00
Samy Pessé
8703c5390f Add basic test for insertTextByKey 2016-10-26 12:38:00 +02:00
Samy Pesse
a3905a8529 Adapt tests for unwrapInline 2016-10-25 22:50:47 +02:00
Samy Pesse
4c9e138d04 Merge remote-tracking branch 'slate/master' into schema-normalize 2016-10-25 21:55:53 +02:00
Samy Pessé
f380943926 Add transform "unwrapBlockByKey" and "unwrapInlineByKey" (#390)
* Add transform .unwrapInlineByKey with test and documentation

* Add transform .unwrapBlockByKey with test and documentation

* add failing test for unwrap limited to a range

* Improve creation of selection in unwrap[Inline|Block]ByKey

* Adapt unwrapInlineAtRange to take range in consideration

* Add test to unwrapInline only one in the document
2016-10-25 12:04:12 -07:00
Samy Pessé
c59ae7a544 Adapt transform deleteAtRange 2016-10-25 17:26:07 +02:00
Samy Pessé
11698bd6fc Merge branch 'pr393' into schema-normalize 2016-10-25 15:48:46 +02:00
Samy Pesse
684d51e4b6 Add another tests for removeTextByKey with inline 2016-10-24 23:23:13 +02:00
Samy Pesse
798a0a90f8 Adapt test for unwrapInline across blocks 2016-10-22 01:07:55 +02:00
Samy Pesse
0682f59954 Adapt tests for setBlock/setInline with isVoid 2016-10-22 01:03:52 +02:00
Samy Pesse
0f80230776 Remove transform "unwrapInlineByKey" done by another PR 2016-10-19 12:01:52 +02:00
Samy Pesse
d4dfdacdc3 Merge PR #354 2016-10-18 21:40:01 +02:00
Tyler Johnson
5eda68e4df fix deleteing across inlines for remove-normalize 2016-10-18 13:22:02 -06:00
Samy Pesse
7091c9489e Merge branch 'pr392' into schema-normalize 2016-10-18 18:35:28 +02:00
Samy Pesse
fc318ec78b Add transform .unwrapInlineByKey with test and documentation 2016-10-17 01:14:47 +02:00
Ian Storm Taylor
fa5d59c063 handle lots of splitting cases 2016-10-14 16:40:45 -07:00
Ian Storm Taylor
70ee777f37 handle joining and inserting text nodes for moveNodeByKey 2016-10-07 16:02:18 -07:00
Ian Storm Taylor
db3f00db6d handle joining text nodes when removing inlines between them 2016-10-06 18:19:31 -07:00
Ian Storm Taylor
e86add851f handle removing text nodes when removing all characters 2016-10-06 11:29:12 -07:00
Ian Storm Taylor
105fba0456 handle regenerating keys on insert 2016-10-06 11:11:10 -07:00
Ian Storm Taylor
9df223bce9 handle surrounding inline void nodes on insert 2016-09-23 11:33:29 -07:00
Ian Storm Taylor
2ed1efbdd4 add insert tests, and set inline void tests, and start normalize fix 2016-09-23 11:05:34 -07:00
Samy Pessé
d1c3700bd2 Fix #234: fix typing text near inline void nodes (#339)
* Add base tests for isVoid with around text node

* Ensure that void nodes are surrounded by text nodes in Node.normalize

* Only wrap inline void nodes with text

* Fix indentation

* Add emojis example

* Adapt unit test "transforms/fixtures/at-current-range/set-inline/with-is-void"

* Adapt unit test "transforms/fixtures/at-current-range/insert-inline/with-inline"

* Adapt unit test "transforms/fixtures/at-current-range/insert-inline/block-start"

* add passing parent to leaf nodes, for rendering breaks

* add zero-width spaces in empty text nodes, to allow selections

* add zero-width space handling to copy/cut

* fix delete handling around inline void nodes

* fix tests for inline void nodes

* fix style

* fix void cursor handling across browsers

* fix void rendering tests
2016-09-23 09:46:24 -07:00
Ian Storm Taylor
1aba4b9f94 fix deleting across nested blocks, closes #341 2016-09-22 16:08:52 -07:00
Nicolas Gaborit
bcb2fc39e5 Focus and blur should not clear marks on selection (#338)
* Do not clear mark on focus/blur

* Add tests
2016-09-21 11:43:03 -07:00
Tyler Johnson
27168a388d improvements to wrapBlockAtRange() (#343)
* add failing test for 340

* fix wrapBlockAtRange to handle multiple deep children (#340)

* failing test for wrapblock changes

* wrapBlockAtRange using top-most parent logic

* Revert "wrapBlockAtRange using top-most parent logic"

This reverts commit 4f056285f78e0ed2fc6ed34586f204c601fe8d29.
2016-09-20 15:39:54 -07:00
Ian Storm Taylor
f27ccd5140 fix deleting backward/forward multiple characters, fixes #326 2016-09-15 14:49:43 -07:00
Ian Storm Taylor
b6566b9a8e fix history to only merge contiguous inserts/removals, fixes #312 2016-09-14 16:46:42 -07:00
Ian Storm Taylor
7756f769ec fix setMarkByKey by adding tests, closes #319 2016-09-14 15:04:38 -07:00
Ian Storm Taylor
7b55316c18 Fix insert fragment multiple nested (#309)
* Add fixture for insertFragmentAtRange with multiple blocks in nested blocks

* Small fix for the fixture's `expected` output

* Rebase on master (0.14.x)

Moved tests to new appropriate location

* Output now expects that fragment are merged to adjacent blocks

* fix insert fragment for multiple children
2016-09-13 11:39:22 -07:00
Ian Storm Taylor
fbe3980c17 fix delete-at-range across depths, closes #306 2016-09-13 11:10:05 -07:00