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

322 Commits

Author SHA1 Message Date
Ian Storm Taylor
cb1d641e43 cleanup, update code highlighting example 2016-08-13 17:18:20 -07:00
Ian Storm Taylor
4f83f54683 refactor mark component normalization 2016-08-13 17:15:27 -07:00
Ian Storm Taylor
722bf0cf83 add rendering of marks from schema 2016-08-13 17:11:22 -07:00
Ian Storm Taylor
eeb97c0611 add rendering of components from schema 2016-08-13 16:48:21 -07:00
Ian Storm Taylor
1008a2fb14 more fixes, before adding components 2016-08-13 16:29:15 -07:00
Ian Storm Taylor
8692d1a98a working on moving components into the schema 2016-08-13 16:18:07 -07:00
Ian Storm Taylor
f4b584a00b got first stab at schema working with tests 2016-08-12 15:58:45 -07:00
Ian Storm Taylor
8b5305f239 first stab at adding a schema to core 2016-08-12 11:33:48 -07:00
Ian Storm Taylor
944bbc8a75 add isModAlt 2016-08-11 18:55:12 -07:00
Ian Storm Taylor
7ee58a55e2 fix insertFragment for nested blocks 2016-08-11 14:41:51 -07:00
Ian Storm Taylor
17bfdee659 fix html serializer called with invalid arguments 2016-08-11 12:56:19 -07:00
Ian Storm Taylor
6ab2d963cd fix html serializer for cases without children 2016-08-11 12:28:41 -07:00
Ian Storm Taylor
018390c8ee fix cursor mark preservation logic 2016-08-10 14:58:50 -07:00
Ian Storm Taylor
0886242657 fix text nodes to rerender with changes decorations 2016-08-09 16:17:06 -07:00
Ian Storm Taylor
5d89fab5e9 fix data transfer with empty html strings 2016-08-09 12:45:46 -07:00
Ian Storm Taylor
454bc8020b add full support for file data transfers 2016-08-09 12:25:08 -07:00
Ian Storm Taylor
90d4eced95 add wrapTextAtRange tests, cleanup wrapText style and backwards handling 2016-08-09 09:32:46 -07:00
Samy Pessé
17f703cecb WIP: Add transform wrapText (#227)
* Add basic implementation of wrapText

* Default suffix for wrapText to prefix

* Add more tests for afterText

* Add tests "whole-block" and "empty-block" for wrapText

* Add tests for across-blocks and across-inlines

* Preserve selection on wrapText

* Remove comment about cursor position

* Document transformation "wratTextAtRange"
2016-08-09 09:11:21 -07:00
Suwijak Chaipipat
10cfb6e48b Change concat into insertChildrenAfter and insertChildrenBefore (#232)
* Change concat into insertChildrenAfter and insertChildrenBefore

* Update input and out yaml of insert block at range block-end

* Update input and out yaml of insert block at range block-start
2016-08-09 09:10:03 -07:00
Ian Storm Taylor
030beab8cd fix bundled file, add bundled installation guide 2016-08-07 17:25:43 -07:00
Ian Storm Taylor
f17629a42d fix documentation references for "fragments", closes #228 2016-08-07 13:13:06 -07:00
Ian Storm Taylor
55ab4aafd5 update iframe rendering logic, refactor iframes example 2016-08-05 12:40:54 -07:00
Ian Storm Taylor
30453d6821 Merge branch 'add/render-to-iframe' of https://github.com/vleletko/slate into add-iframe 2016-08-05 10:46:40 -07:00
Ian Storm Taylor
3dc930a859 fix <Void> to always get latest state onClick, closes #223 2016-08-05 10:37:56 -07:00
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
9a70188f34 loosen default shouldComponentUpdate for nodes, and make Void implicit 2016-08-04 14:12:27 -07:00
Ian Storm Taylor
917906e378 refactor onBeforeChange 2016-08-04 13:18:20 -07:00
Samy Pessé
f25c5d9a64 Add handler "onBeforeChange" (#219)
* Add handler "onReceiveState"

* Change onReceiveChange to onBeforeChange and call it before onChange as well

* Dont'call props.onBeforeChange since it's added to CorePlugin

* Update documentation for onBeforeChange
2016-08-04 13:11:23 -07:00
Ian Storm Taylor
e6bac8180a update the scroll position on content changes 2016-08-04 12:57:52 -07:00
Djamil Legato
5a92083686 Drop deprecated escape and unescape (#217) 2016-08-04 11:20:08 -07:00
Vladimir
9cb361dc29 Lint errors fixes. 2016-08-03 04:03:43 +03:00
Vladimir
186f1a7c6d Core component will deduce the context from the dispatched event.target element 2016-08-03 03:27:33 +03:00
Ian Storm Taylor
197515e096 fix leaf to re-render when DOM is mismatched 2016-08-02 10:31:25 -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
789c4b3002 fix void leaf selection handling 2016-08-01 18:26:27 -07:00
Ian Storm Taylor
4e6ca3953b fix onBeforeInput decorations logic, fix initial onSelect logic 2016-08-01 18:09:30 -07:00
Ian Storm Taylor
39aaa916ec fix to only double new lines on last leaf 2016-08-01 15:18:37 -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
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