1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-04-21 22:02:05 +02:00

31 Commits

Author SHA1 Message Date
Raffaele De Feo
85b901a4d0 Don't rely on CSS positioning to hide text caret inside Void Inline nodes,
instead make it invisible setting spacer `color` property to `transparent`.
In Chrome, replace zero-with space with hair space to avoid graphics glitches.
Update tests.
2017-02-14 21:12:36 +01:00
Stan Chang Khin Boon
3a23c21848 Add props “autoCorrect” to editor and content. (#596)
This allow user to turn off predictive text input on iOS thus mitigating #540…
2017-02-13 16:30:20 -08:00
Ian Storm Taylor
99bae0e892 fix tests 2017-02-07 10:08:20 -08:00
Raffaele De Feo
4f439ab3ca Set the display ccs property of the void inline wrappers to inline-block.
Update tests.
2017-02-07 18:08:14 +01:00
Samy Pessé
98995e7c08 Add props "tabIndex" and "role" (#552)
* Add prop "tabIndex" to editor

* Add prop "role"

* Typo

* Adapt rendering tests
2017-01-18 17:29:37 -08:00
Ian Storm Taylor
5808e64635 change zero-width spaces to use data attributes for consistency 2016-12-07 21:16:04 -08:00
Ian Storm Taylor
bd44acb92a fix void rendering tests 2016-12-07 20:45:10 -08:00
Ian Storm Taylor
d0ccfac77f rename data-slate-content to data-slate-editor 2016-12-07 15:20:57 -08:00
AlbertHilb
a1638dd906 Add an attribute to uniquely identify divs used to render content component (#470)
* Add `data-slate-content` attribute to the divs used to render `content` components.
Use that attribute to uniquely identify them.
Update test expected results.

* Fix lint complaints.
2016-12-07 15:16:40 -08:00
Ian Storm Taylor
55fd06449b update tests to use jest and be async, closes #495 (#502)
* update tests to use jest and be async, closes #495

* add read-metadata for perf and fragments
2016-12-06 15:21:08 -08:00
Ian Storm Taylor
8096761a97 fix lots of tests with inline behavior 2016-12-02 13:09:24 -08:00
Ian Storm Taylor
a9f28722e5 tweak inline void component rendering, fix rendering tests 2016-09-26 21:50:21 -07: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
5091587814 simplify schema rules, update docs 2016-08-14 15:51:07 -07:00
Ian Storm Taylor
ccac6102a5 fixes 2016-08-14 13:21:46 -07:00
Ian Storm Taylor
c5f689e543 update void rendering tests 2016-08-04 14:13:58 -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
4a519db4e1 fix custom void block rendering test 2016-07-28 15:42:13 -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
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
d0c8ce0c08 add the ability to render based on multiple marks (#138)
closes #33
2016-07-20 15:11:13 -07:00
Ian Storm Taylor
54587c3318 add decorator rendering test 2016-07-18 16:18:55 -07:00
Ian Storm Taylor
68e87ebfb8 add more rendering tests 2016-07-14 15:06:44 -07:00
Ian Storm Taylor
2aa8239448 fix wrapInline selecting, add rendering tests 2016-07-13 18:56:03 -07:00