1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-03-06 05:49:47 +01:00

1028 Commits

Author SHA1 Message Date
Samy Pessé
42b5e893a3 Use different build for test/lint/benchmarks 2016-11-01 15:20:04 +01:00
Samy Pessé
37d99e0edb Lint after running tests and benchmarks 2016-11-01 15:02:07 +01:00
Samy Pessé
e9f05bc1b4 Don't normalize the selection twice when moving the cursor 2016-11-01 14:35:40 +01:00
Samy Pessé
247e546b3b Fix error 💣 in shouldComponentUpdate 2016-11-01 13:24:50 +01:00
Samy Pessé
af6b0e0388 Add unit test for undo of setNodeByKey 2016-11-01 11:53:36 +01:00
Samy Pessé
925189eb94 Don't normalize with schema when moving selection 2016-10-31 17:59:01 +01:00
Soreine
74695d80f0 Small optimization for deleteBackward/deleteForward 2016-10-31 16:38:57 +01:00
Samy Pessé
2aeaae445e Add node compare to improve normalize calls 2016-10-31 16:28:51 +01:00
Samy Pessé
d048d7bb35 Fix indent in src/utils/warning.js 2016-10-31 13:52:46 +01:00
Samy Pessé
74523dfe0c Use Immutable.is only in development for node comparaison 2016-10-31 11:45:18 +01:00
Samy Pessé
d6e7fb6bf0 Preserve node reference when splitting 2016-10-31 10:43:27 +01:00
Soreine
6d88672e83 Fix insert-text benchmark 2016-10-28 12:35:00 +02:00
Soreine
2a6fc88bfe Merge branch 'more-benchmarks' into schema-normalize 2016-10-28 12:34:27 +02:00
Soreine
2f3dda35aa Adapt benchmarks 2016-10-28 11:45:14 +02:00
Soreine
164ecc6d76 Fix _normalizeNodeWith 2016-10-28 10:30:33 +02:00
Soreine
ddb8522584 Recursive safety fixed, and throw error instead 2016-10-27 18:08:51 +02:00
Soreine
4fa097ab0b Add maximum number of recursivity for normalization 2016-10-27 17:11:08 +02:00
Soreine
eb9b97d79e Add newline for better readability in console 2016-10-27 16:14:00 +02:00
Soreine
8e963c75a6 Immutable check warning: Log concerned node 2016-10-27 16:06:42 +02:00
Soreine
4374eb9b33 Document wrapBlockByKey 2016-10-27 15:13:30 +02:00
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