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

26 Commits

Author SHA1 Message Date
Ian Storm Taylor
509d3d50fc remove rendering from schema & make it expressive (#1262)
* split rendering out of schema

* remove default components

* first stab at new schema

* make default normalizations smarter

* revert to forcing defaults to be verbose?

* refactor reason constants

* split nodes into blocks/inlines

* get tests passing

* restructure schema tests

* add parent test

* cleanup

* remove defaults from schema

* refactor schema rule.nodes validation, update example

* embed schema in state objects

* fixes

* update examples, and fixes

* update walkthroughs

* update docs

* remove old schemas doc page

* add more tests

* update benchmarks
2017-10-25 17:32:29 -07:00
Ian Storm Taylor
e815c2752c fix findNativePoint in empty blocks, add error reporting to examples 2017-10-13 18:34:35 -07:00
Ian Storm Taylor
e53cee3942 refactor decorations to use selections (#1221)
* refactor decorations to use selections

* update docs

* cleanup

* add Selection.createList

* fix tests

* fix for nested blocks

* fix lint

* actually merge

* revert small change

* add state.decorations, with search example
2017-10-13 12:04:22 -07:00
Ian Storm Taylor
7470a6dd53 Expose transforms (#836)
* refactor to extract applyOperation util

* change handlers to receive transform instead of state

* change onChange to receive a transform, update rich-text example

* fix stack iterationg, convert check-list example

* convert code-highlighting, embeds, emojis examples

* change operations to use full paths, not indexes

* switch split and join to be recursive

* fix linter

* fix onChange calls

* make all operations invertable, add src/operations/* logic

* rename "join" to "merge"

* remove .length property of nodes

* fix node.getFragmentAtRange logic

* convert remaining examples, fix existing changes

* fix .apply() calls and tests

* change setSave and setIsNative transforms

* fix insert_text operations to include marks always

* cleanup and fixes

* fix node inheritance

* fix core onCut handler

* skip constructor in node inheritance

* cleanup

* change updateDescendant to updateNode

* add and update docs

* eliminate need for .apply(), change history to mutable

* add missing file

* add deprecation support to Transform objects

* rename "transform" to "change"

* update benchmark

* add deprecation util to logger

* update transform isNative attr

* fix remaining warn use

* simplify history checkpointing logic

* fix tests

* revert history to being immutable

* fix history

* fix normalize

* fix syntax error from merge
2017-09-05 18:03:41 -07:00
Conor Cussell
a3a7949fc4 Add example of using plugin.render to /examples/plugins (#890) 2017-06-21 17:32:32 -04:00
Ian Storm Taylor
13a99a9b73 refactor examples, upgrade dependencies 2017-05-04 16:48:42 -07:00
Ian Storm Taylor
ef81dc856a fix check-lists example 2017-03-30 12:30:33 -04:00
AlbertHilb
f1b147860b Rewrite CheckListItem component. Only the area we really want to be editable (#696)
must lie inside contenteditable elements.
2017-03-30 10:35:01 -04:00
Ian Storm Taylor
30c2b206fb add check list example 2017-03-28 12:55:48 -04:00
Sunny Hirai
189af27ec7 Updated examples to add GitHub and Docs link + some styling. (#531) 2016-12-25 21:18:39 -08:00
Ian Storm Taylor
3aff3cbf91 add focus-blur example 2016-11-16 17:25:27 -08:00
Samy Pessé
d1c3700bd2 Fix #234: fix typing text near inline void nodes (#339)
* Add base tests for isVoid with around text node

* Ensure that void nodes are surrounded by text nodes in Node.normalize

* Only wrap inline void nodes with text

* Fix indentation

* Add emojis example

* Adapt unit test "transforms/fixtures/at-current-range/set-inline/with-is-void"

* Adapt unit test "transforms/fixtures/at-current-range/insert-inline/with-inline"

* Adapt unit test "transforms/fixtures/at-current-range/insert-inline/block-start"

* add passing parent to leaf nodes, for rendering breaks

* add zero-width spaces in empty text nodes, to allow selections

* add zero-width space handling to copy/cut

* fix delete handling around inline void nodes

* fix tests for inline void nodes

* fix style

* fix void cursor handling across browsers

* fix void rendering tests
2016-09-23 09:46:24 -07:00
Ian Storm Taylor
ccac6102a5 fixes 2016-08-14 13:21:46 -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
17d676b639 refactor rtl support, add rtl example 2016-07-29 12:05:01 -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
3bd000d118 add draggable nodes, first steps 2016-07-24 18:04:11 -07:00
Ian Storm Taylor
03393dabfb change void blocks to not be added automatically, and to handle focus 2016-07-22 13:24:22 -07:00
Ian Storm Taylor
54587c3318 add decorator rendering test 2016-07-18 16:18:55 -07:00
Ian Storm Taylor
7dc00a77d3 improve example tab bar styles 2016-07-06 14:54:13 -07:00
Ian Storm Taylor
aba40a2aaf got void components working 2016-06-30 10:43:24 -07:00
Ian Storm Taylor
27e71715a6 fix fragment pasting, remove <b> and <i> from paste html marks 2016-06-29 11:27:06 -07:00
Ian Storm Taylor
2f2437476e add paste html example with first stab at html serializer 2016-06-29 10:43:22 -07:00
Ian Storm Taylor
78a902d7a0 add start of image example 2016-06-28 18:26:56 -07:00
Ian Storm Taylor
85361bf749 add hovering menu example 2016-06-28 15:47:29 -07:00
Ian Storm Taylor
2743c3741d refactor examples 2016-06-24 10:22:48 -07:00