Soreine
6a77aa1cf3
Export wrapBlockByKey and add tests
2016-10-27 14:56:04 +02:00
Soreine
6e0799010c
Add transform wrapBlockByKey
, to wrap any node
...
This can be used to simply wrap a Text node. This is not possible with
the current implementation of `wrapBlockAtRange`, which wraps the
closest parent block of the text node.
2016-10-27 14:38:02 +02:00
Samy Pessé
081ade234e
Update condition for shouldComponentUpdate and immutable.is
2016-10-27 11:59:51 +02:00
Soreine
19f56c8cdb
Merge branch 'master' into schema-normalize
2016-10-27 10:36:58 +02:00
Samy Pessé
6a5a7f37b2
Add warning log when references are different in shouldComponentUpdate( Fix #373 )
2016-10-27 10:17:08 +02:00
Samy Pessé
e5abd9e0b4
Merge pull request #1 from GitbookIO/schema-normalize-selection-ops
...
Update selection in low-level operations
2016-10-27 09:56:30 +02:00
Samy Pessé
379640d7e1
Simplify deleteForward and deleteBackward
2016-10-27 09:55:25 +02:00
Ian Storm Taylor
d4eb53fd6f
0.14.16
v0.14.16
2016-10-26 13:02:01 -07: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
Nicolas Gaborit
8851855b5b
Node methods optimizations ( #364 )
...
* Node.getParent exits earlier
* Add Node.getAncestors method
* Remove numerous getParent in Node.getClosest
* Remove use of assertDescendant in getPath
Still throws when not finding the descendant though
* Remove assertDescendant from Node.updateDescendant
* Remove assertDescendant from Node.removeDescendant
* Fix Node.findDescendant, which always returned first level descendants
* Add Node.findDescendantDeep
* Memoize Node.getAncestors
* Implement and use Node.get{First|Last}Text
* Add jsdom devDepencency
Required as peer dependency by mocha-jsdom
2016-10-26 12:46:40 -07:00
jasonphillips
dca60c42ce
Html serializer: optionally return React elements ( #408 )
...
* Html serializer optionally returns React elements
* update heredoc to indicate optional return value of array
* update documentation for html serializer to include React return option
* move returnElements argument to render:false
2016-10-26 12:46:24 -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
Soreine
559c8ecd82
Update selection on splitNode
2016-10-26 17:28:30 +02:00
Samy Pessé
440aebb685
Add test for selection inside a removeNodeByKey
2016-10-26 17:25:20 +02:00
Samy Pessé
f84f9fd1ef
Remove double space in warning message
2016-10-26 17:19:20 +02:00
Samy Pessé
e86269a168
Add basic tests for removeNodeByKey
2016-10-26 17:08:44 +02:00
Samy Pessé
668bd0dc01
Merge remote-tracking branch 'origin/schema-normalize-selection-ops' into schema-normalize-selection-ops
2016-10-26 16:55:55 +02:00
Samy Pessé
41df908e33
Move selection in moveNode operation
2016-10-26 16:55:42 +02:00
Soreine
62b8ed205e
setNode cannot be used to update key and nodes
2016-10-26 16:17:05 +02:00
Soreine
97aa3ecd93
Deprecating using setNode to update nodes
2016-10-26 15:59:06 +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
a50d381d8e
Remove console.log
2016-10-26 14:48:49 +02:00
Soreine
947513fc58
Add test to joinNodeByKey
2016-10-26 14:48:49 +02:00
Soreine
7e5f0b4779
Update selection in joinNode
operation
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é
9f5807e008
Use moveEnd/Start in removeText
2016-10-26 14:01:31 +02:00
Samy Pessé
0e1602c964
Merge branch 'schema-normalize-selection-ops' of https://github.com/GitbookIO/slate into schema-normalize-selection-ops
2016-10-26 13:59:05 +02:00
Samy Pessé
59583760f2
Adapt selection in removeText operation
2016-10-26 13:58:32 +02:00
Soreine
644b4b3cab
Rename extend...Offset
to move...Offset
2016-10-26 13:55:12 +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 Pessé
8c9cea2aaa
Add test.js for insertTExtByKey
2016-10-26 12:19:57 +02:00
Samy Pessé
36d6d8eb3c
Update selection in insertText operation
2016-10-26 12:15:28 +02:00
Samy Pesse
6d2b70c750
Fix merge in "docs/reference/models/transform.md"
2016-10-25 22:59:08 +02:00
Samy Pesse
a3905a8529
Adapt tests for unwrapInline
2016-10-25 22:50:47 +02:00
Samy Pesse
e873de519f
Add options with normalize to unwrapBlockByKey and unwrapInlineByKey
2016-10-25 21:58:34 +02:00
Samy Pesse
4c9e138d04
Merge remote-tracking branch 'slate/master' into schema-normalize
2016-10-25 21:55:53 +02:00
Soreine
b2b4a4d565
Fix rule INLINE_VOID_TEXTS_AROUND
...
Added an additional test. Was working previously because the
normalization was called several times recursively.
2016-10-25 21:13:14 +02:00
Soreine
b7693213a0
No lint in npm run test. Lint is done on Travis
2016-10-25 21:13:14 +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 Pesse
5477754f63
Fix #397 : resolve to leaf text in selection methods
2016-10-25 18:50:03 +02:00
Samy Pessé
0e32043315
Merge branch 'schema-normalize' of https://github.com/GitbookIO/slate into schema-normalize
2016-10-25 17:52:03 +02:00