1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-20 22:21:20 +02:00
Commit Graph

4195 Commits

Author SHA1 Message Date
Ian Storm Taylor
a481581803 0.19.17 v0.19.17 2017-04-11 21:45:53 -07:00
Ian Storm Taylor
2b75499e60 fix block warning for void nodes 2017-04-11 21:43:21 -07:00
Victor Pontis
2f296972c0 Keep selection while applying Transform.unwrapNodeByKey (#717)
Transforms should be applied in an order so that the selection is
preserved. This replaces "remove --> insert" with "move --> remove".

Close #670
2017-04-11 21:37:29 -07:00
Victor Pontis
3e573453a8 Remove space after first char when copying from Slate (#716)
Right now if you copy "This thing" from Slate and paste
into a plain text app you will get "T his thing" because
Slate is making the first character a data holding span.

This diff makes the data containing span empty to eliminate
this extra space.

Closes #562
2017-04-11 21:37:08 -07:00
Ian Storm Taylor
5c7e31b332 Update .npmignore 2017-04-11 16:41:10 -07:00
Ian Storm Taylor
50593f9335 speed up decorator examples 2017-04-06 11:21:41 -07:00
Ian Storm Taylor
d24dffc390 0.19.16 v0.19.16 2017-04-03 09:34:05 -07:00
Aliaksei Simanchyk
7794ebe3be use refs for div component instead findDOMNode (#708) 2017-04-03 09:30:20 -07:00
Aliaksei Simanchyk
affb2eb56a Fix forgotten props 'block' for Leaf (#707) 2017-04-03 09:26:57 -07:00
Ian Storm Taylor
7b4beffabf 0.19.15 v0.19.15 2017-04-02 15:48:29 -07:00
Ian Storm Taylor
f81e52a51e change normalize logic to use mutable objects for performance 2017-04-02 15:45:48 -07:00
Ian Storm Taylor
1fb04f663d 0.19.14 v0.19.14 2017-04-02 15:04:36 -07:00
Ian Storm Taylor
059ee96db8 a handful of performance improvements (#705)
* update large example

* pass block down to <Text> for performance, closes #700

* add get-ranges benchmark

* optimize getRanges(), closes #699

* add serialization benchmarks

* optimize Raw.deserializeRanges() by computing marks once, closes #701

* change .merge calls to .set for performance

* change updateDescendant() to use getAncestors() for memoization

* change getPath() to use getAncestors() for memoization

* switch getTexts() and friends to use arrays while iterating

* rename split-block benchmark

* update benchmark compare script
2017-04-02 14:57:36 -07:00
Ian Storm Taylor
8687fac1a2 add more to docs intro 2017-03-31 17:18:13 -07:00
Ian Storm Taylor
ea4ecb2476 0.19.13 v0.19.13 2017-03-30 14:15:06 -04:00
Ian Storm Taylor
2743348d65 add markdown example, fix selection handling with decorators 2017-03-30 14:12:56 -04:00
Ian Storm Taylor
1ec92f2414 0.19.12 v0.19.12 2017-03-30 12:58:30 -04:00
Ian Storm Taylor
8af2026371 fix re-rendering of last text nodes, closes #682 2017-03-30 12:55:15 -04:00
Ian Storm Taylor
4e81f4a0fd 0.19.11 v0.19.11 2017-03-30 12:46:53 -04:00
Ian Storm Taylor
b0adb9252c cleanup 2017-03-30 12:44:55 -04: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
AlbertHilb
83a94f0737 When editor contains nested editable elements, in some situations, (#693)
the focus goes to those elements. In firefox, this causes issues
with keyboard navigation and therefore it must be prevented.
2017-03-30 10:23:56 -04:00
AlbertHilb
11de44acdd If editor contains nested editable components and the native selection enters (#692)
one of these, focus moves from the `Content` DOM element to the new active
element but editor doesn't really lose focus and selection must not be blurred.
2017-03-30 10:23:46 -04:00
AlbertHilb
8a81d73ec1 Fix mismatched event parameter. (#694) 2017-03-30 10:22:09 -04:00
Ian Storm Taylor
f80951ab82 0.19.10 v0.19.10 2017-03-30 00:43:12 -04:00
Ian Storm Taylor
6198708086 change selection updating logic to happen at the top-level, closes #662 2017-03-30 00:41:06 -04:00
Ian Storm Taylor
fccca74b8f 0.19.9 v0.19.9 2017-03-29 13:03:11 -04:00
Ian Storm Taylor
392fd75722 fix getPoint to work around in-editable content 2017-03-29 13:01:16 -04:00
Ian Storm Taylor
3c49ca8ed1 update history 2017-03-28 14:08:15 -04:00
Ian Storm Taylor
2c584f3f73 0.19.8 v0.19.8 2017-03-28 12:58:40 -04:00
Ian Storm Taylor
30c2b206fb add check list example 2017-03-28 12:55:48 -04:00
Conor Cussell
6333275aa0 use correct localStorage method for setting content (#684) 2017-03-24 16:19:23 -07:00
Stan Chang Khin Boon
a28075edc1 Fixed autocorrect causing dupe text (#655)
* Refactored out `getPoint` from components/content to utils so as to make it more reusable.

* Fixed autocorrect causing dupe text. (#540)

During autocorrection (in iOS’s Safari), `onSelect` event is triggered after `onBeforeInput` event.
The plugins/core updates the state during `onBeforeInput` event, thus causing selection triggered by autocorrect to be lost/overridden.
This behaviour caused dupe text bug during autocorrection.

To overcome this issue, we try to query the selection and conditionally fix out of sync cases with an additional transform before inserting the text.

* Removes Content#getPoint and use the new utility function instead.

* Renames local variable nextTransform to transform.

* Describe the solution to the autocorrect issue in a more descriptive manner.
2017-03-23 10:49:23 -07:00
Prayag Verma
3d96d2a309 Fix a typo in walkthroughs/saving-to-a-database (#681)
intial → initial
2017-03-23 10:43:34 -07:00
Ian Storm Taylor
dcdcab2baa 0.19.7 v0.19.7 2017-03-22 18:51:53 -07:00
Ian Storm Taylor
afb54f238d fix data transfer type checking, closes #680 2017-03-22 18:49:27 -07:00
Ian Storm Taylor
5cc2133cfe 0.19.6 v0.19.6 2017-03-21 23:18:43 -07:00
Ian Storm Taylor
d8812a7f20 Perf get blocks (#678)
* improve perf of getBlocks and getInlines

* add getBlocksByType, getInlinesByType, fix getMarksByType
2017-03-21 23:15:58 -07:00
Ian Storm Taylor
f432aac6e2 0.19.5 v0.19.5 2017-03-21 22:35:02 -07:00
Ian Storm Taylor
579d741ca2 improve perf on marks functions on nodes (#677)
* refactor benchmarks, add get-marks benchmarks

* fix benchmark running

* cleanup benchmarks

* switch getMarks implementation, add getMarksByType
2017-03-21 22:32:14 -07:00
Ian Storm Taylor
6ab686ae77 Refactor benchmarks (#675)
* first stab

* refactor to nanobench

* refactor to matcha

* use hand-rolled comparison logic, ugh

* update threshold

* remove unused dependencies

* remove benchmarks from travis ci
2017-03-21 17:38:39 -07:00
Anuj
14193c30f0 Fix getFragmentAtRange to not return early when selection is in void node or collapsed (#673) 2017-03-21 17:27:50 -07:00
Ian Storm Taylor
376eada539 change getMarks to return an ordered set (#672) 2017-03-21 17:25:59 -07:00
Ian Storm Taylor
8f7cf95ee6 0.19.4 v0.19.4 2017-03-21 11:31:59 -07:00
Ian Storm Taylor
8e2dce111d fix data transfer files support, closes #669 2017-03-21 11:29:23 -07:00
Aliaksei Simanchyk
21c6762e15 Remove warning in getFragmentAtRange for node (#652) (#657)
* remove warning in getFragmentAtRange for node (#652)

* fix typo
2017-03-18 17:02:12 -07:00
Tyler Johnson
0f59ef6447 use pageXOffset instead of scrollX for ie support (#664) 2017-03-18 17:01:44 -07:00
yāλu
5ce7d165aa added onFocus, and docs. fixes #650 (#666)
* added onFocus, and docs. fixes #650

* sorted prop types declarations alphabetically
2017-03-18 16:55:22 -07:00
Ian Storm Taylor
812c881d7f add the deserialize normalize option to the docs 2017-03-05 17:02:52 -08:00