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

77 Commits

Author SHA1 Message Date
Ian Storm Taylor
772aadb70a fix insertText to do nothing in void nodes 2016-08-05 10:32:00 -07:00
Ian Storm Taylor
90abc993b9 fix for insertBlockAtRange in empty blocks, closes #224 2016-08-05 10:25:52 -07:00
Ian Storm Taylor
c5f689e543 update void rendering tests 2016-08-04 14:13:58 -07:00
Ian Storm Taylor
9521b1abf6 fix selection handling for insertFragment and wrapInline 2016-08-01 19:23:21 -07:00
Ian Storm Taylor
c4e1e475eb add insertInline with tests 2016-08-01 18:53:05 -07:00
Ian Storm Taylor
560b28ce32 add debug points, remove unused deps, fix composition 2016-08-01 13:45:46 -07:00
Ian Storm Taylor
17d676b639 refactor rtl support, add rtl example 2016-07-29 12:05:01 -07:00
Ian Storm Taylor
e8e497131e Merge branch 'master' of github.com:ianstormtaylor/slate 2016-07-29 11:25:13 -07:00
Samy Pessé
845e284ee4 Add RTL support (#204)
* Add property textAlignment for the whole editor

* textAlignment should be set on Content

* Add basic for directionMap in State

* Add RTL to example

* Use setDocument for updating direction map when inserting blocks

* Remove debug log

* Only add 'dir' to node when is not default value

* Prevent tests from failing because of .DS_Store on OSX

* Add tests for rtl rendering

* Fix rendering tests

* Fix test for rendering "text-direction"

* Remove textAlignment prop on editor

* Don't use a directionMap but directly a "textDir" on nodes

* Remove .setDocument from State
2016-07-29 11:25:07 -07:00
Ian Storm Taylor
fb97c50c4c fix add support for rendering components as marks 2016-07-29 11:20:00 -07:00
Samy Pessé
4d58c0035c Add ability for renderMark to return a React component (#202)
* Switch rendering of leaf to use mark as component

* Backward compatibility with renderMark

Don’t fail on null marks

* Adapt tests for new rendering of marks

* Fix selection with new rendered marks

* Adapt rendering test for custom-mark-multiple

Don’t add span when renderMark return undefined
2016-07-29 10:46:56 -07:00
Ian Storm Taylor
e45e06d9e8 fix coding style 2016-07-29 08:56:27 -07:00
Robin Berjon
9ab6267271 do not throw too early while looking for a rule with which to serialize (#205) 2016-07-29 08:54:47 -07:00
Ian Storm Taylor
dfcd791b3b fix deleteAtRange to split only to common ancestor 2016-07-28 17:17:18 -07:00
Ian Storm Taylor
a892c6b800 change wrapping transform arguments for consistency 2016-07-28 16:24:24 -07:00
Ian Storm Taylor
4a519db4e1 fix custom void block rendering test 2016-07-28 15:42:13 -07:00
Ian Storm Taylor
5f73c63208 fix selection setting in wrapInline transform 2016-07-28 12:32:33 -07:00
Tyler Johnson
84829f5439 add tests for calling wrapInline twice (#197) 2016-07-28 11:43:44 -07:00
Ian Storm Taylor
1c86b2fcf7 fix deleting sibling inline node 2016-07-27 22:30:37 -07:00
Ian Storm Taylor
fc8fb18fda fix deleting sibling text node 2016-07-27 17:09:10 -07:00
Ian Storm Taylor
42cbcb7e8d change void nodes to have a single space, prevent text-less inlines 2016-07-27 16:21:55 -07:00
Ian Storm Taylor
8916ee0891 fix to remove extra empty text nodes, closes #171 2016-07-26 11:51:20 -07:00
Ian Storm Taylor
37251f8236 update rendering tests for position relative 2016-07-26 11:18:43 -07:00
Ian Storm Taylor
569e940fd1 add node component, cleanup draggable/void interactions 2016-07-25 16:46:17 -07:00
Ian Storm Taylor
98c78e4d96 refactor raw serializer to not be terse by default 2016-07-25 13:29:29 -07:00
Ian Storm Taylor
81c956228b more work on draggable nodes 2016-07-24 18:57:09 -07:00
Ian Storm Taylor
3bd000d118 add draggable nodes, first steps 2016-07-24 18:04:11 -07:00
Ian Storm Taylor
466f377ffa fixes for style and consistency 2016-07-24 17:59:26 -07:00
Mathieu Dutour
8407023e5f add setNodeByKey transform (#157)
* modifyNode transform

* create DOCUMENT_NODE_TRANSFORMS and use assertDescendant to get the node directly

* rename to setNodeByKey
2016-07-24 17:53:28 -07:00
Ian Storm Taylor
f8f01949e4 add tests for insertText with marks 2016-07-22 20:22:01 -07:00
Ian Storm Taylor
2a58f71c42 add support for spellcheck 2016-07-22 20:21:50 -07:00
Ian Storm Taylor
1784f25caa fix styles for void, fix tests for void rendering 2016-07-22 13:39:02 -07:00
Ian Storm Taylor
57b5c9a8bd add ability to omit ranges in raw json, closes #152 2016-07-21 16:37:42 -07:00
Ian Storm Taylor
0dc348dec8 add insertText transform tests 2016-07-21 16:08:12 -07:00
Ian Storm Taylor
eb95b79a00 add wrapInline transform tests 2016-07-21 16:03:02 -07:00
Ian Storm Taylor
1bf729db5f add wrapBlock transform tests 2016-07-21 15:50:08 -07:00
Ian Storm Taylor
dd189f7385 add unwrapInline transform tests 2016-07-21 15:48:05 -07:00
Ian Storm Taylor
49c5754c8e add unwrapBlock transform tests 2016-07-21 15:41:59 -07:00
Ian Storm Taylor
986e49aaac add splitBlock and splitInline transforms tests 2016-07-21 15:35:29 -07:00
Ian Storm Taylor
37829137c6 add setBlock and setInline transform tests 2016-07-21 15:15:50 -07:00
Ian Storm Taylor
f5ca91df8a add deleteForward and deleteBackward transform tests 2016-07-21 14:57:26 -07:00
Ian Storm Taylor
7615ce8611 add insertFragment transform tests 2016-07-21 14:57:17 -07:00
Ian Storm Taylor
33b1b1379b add delete() tests 2016-07-21 12:30:29 -07:00
Ian Storm Taylor
00261eded9 add toggleMarkAtRange remove tests 2016-07-21 12:26:11 -07:00
Ian Storm Taylor
4d69df224a add removeMark tests, update toggleMark tests 2016-07-21 12:23:47 -07:00
Ian Storm Taylor
4197921946 add selection assertions to addMark tests 2016-07-21 12:17:12 -07:00
Ian Storm Taylor
035ae4451a add more mark tests 2016-07-21 11:59:39 -07:00
Ian Storm Taylor
0ebe5b4b64 add toggleMark and toggleMarkAtRange transforms 2016-07-21 11:59:21 -07:00
Ian Storm Taylor
f1b961fc35 add memoization and clean up node methods (#141)
* cleanup node methods

* add first stab at memoization of node methods

* rename getTextNodes() to getTexts() for consistency
2016-07-20 21:36:52 -07:00
Ian Storm Taylor
d0c8ce0c08 add the ability to render based on multiple marks (#138)
closes #33
2016-07-20 15:11:13 -07:00