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

283 Commits

Author SHA1 Message Date
Ian Storm Taylor
560b28ce32 add debug points, remove unused deps, fix composition 2016-08-01 13:45:46 -07:00
Ian Storm Taylor
27df42bde0 remove console log 2016-08-01 12:44:06 -07:00
Ian Storm Taylor
40598d7198 fix isNative incorrectly being checked 2016-08-01 12:40:09 -07:00
Ian Storm Taylor
5593d501e1 fix shouldComponentUpdate check on content 2016-08-01 12:30:30 -07:00
Ian Storm Taylor
ecc9202db7 change placeholder to only render when visible 2016-07-29 12:44:08 -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
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
6c61e2772d update state wrap method arguments 2016-07-28 16:27:07 -07:00
Ian Storm Taylor
a892c6b800 change wrapping transform arguments for consistency 2016-07-28 16:24:24 -07:00
Ian Storm Taylor
acccb8f17c remove need for selection to be natively rendered 2016-07-28 16:04:41 -07:00
Ian Storm Taylor
c248b3de22 add embeds example, fix to not let events propagate out of voids 2016-07-28 15:38:17 -07:00
Ian Storm Taylor
5f73c63208 fix selection setting in wrapInline transform 2016-07-28 12:32:33 -07:00
Ian Storm Taylor
45433198b6 refactor normalization of arguments with better error handling 2016-07-28 11:42:52 -07:00
Ian Storm Taylor
386b671baa Merge branch 'master' of github.com:ianstormtaylor/slate 2016-07-28 11:13:50 -07:00
Samy Pessé
21a002ad63 Only create data once in setBlockAtRange and prevent its deletion (#196) 2016-07-28 11:13:45 -07:00
Ian Storm Taylor
c1f4bce3b8 change hasUndo and hasRedo to hasUndos and hasRedos 2016-07-28 11:13:12 -07:00
Samy Pessé
b2c1b844af Add properties hasUndo and hasRedo to State (#193)
* Add properties hasUndo and hasRedo to State

* Fix description fo hadRedo
2016-07-28 11:11:42 -07:00
Tyler Johnson
dca2efca0f fix isBackward in onSelect event selection (#195) 2016-07-28 11:09:47 -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
9bc410c582 add missing prop types to content 2016-07-27 16:22:12 -07:00
Ian Storm Taylor
c85671aba4 add fragment handling to core onPaste 2016-07-27 16:22:12 -07:00
Ian Storm Taylor
d20b8511bb refactor onKeyDown to use data object 2016-07-27 16:22:11 -07:00
Ian Storm Taylor
fba3fe7a13 move onCopy and onCut logic to core plugin, refactor onDrop 2016-07-27 16:22:11 -07:00
Ian Storm Taylor
6503ee2d80 change onBeforeInput to take data property 2016-07-27 16:22:11 -07:00
Ian Storm Taylor
ca9aaa9efb refactor to move onBlur to core plugin 2016-07-27 16:22:11 -07:00
Ian Storm Taylor
ee2192aa6e refactor core plugin for readability 2016-07-27 16:22:11 -07:00
Ian Storm Taylor
b9ae5d2af6 fix void node cursor navigation in firefox 2016-07-27 16:22:11 -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
eebb0bd985 fix character insertion when first in node, closes #182 2016-07-27 11:38:57 -07:00
Ian Storm Taylor
3448dac17b fix to greatly improve performance, and void selections in void nodes 2016-07-26 16:58:42 -07:00
Ian Storm Taylor
b506098a29 add plugins example, fix soft break handling 2016-07-26 12:15:21 -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
20ba3f6cac fix content shouldComponentUpdate logic 2016-07-26 11:30:31 -07:00
Ian Storm Taylor
8393a8baaf update placeholder positioning and offset key resolving 2016-07-26 11:07:31 -07:00
Ian Storm Taylor
cdebdb1400 fix undo rendering and leaf rendering logic 2016-07-25 18:42:31 -07:00
Ian Storm Taylor
e088366364 cleanup editor and content props 2016-07-25 17:04:10 -07:00
Tyler Johnson
ca837e2426 moved onSelect event handling to core plugin (#175) 2016-07-25 16:59:12 -07:00
Ian Storm Taylor
569e940fd1 add node component, cleanup draggable/void interactions 2016-07-25 16:46:17 -07:00
Ian Storm Taylor
c3cc301b5d remove unnecessary method from base 64 serializer 2016-07-25 14:46:10 -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