1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-01 21:52:44 +01:00

85 Commits

Author SHA1 Message Date
Ian Storm Taylor
a825b95845 Update Changelog.md 2017-10-14 15:58:29 -07:00
Ian Storm Taylor
8dceea3c67 update changelogs 2017-10-14 15:40:48 -07:00
Ian Storm Taylor
f57b53c219 Publish
- slate-base64-serializer@0.1.14
 - slate-dev-logger@0.1.15
 - slate-html-serializer@0.2.0
 - slate-hyperscript@0.2.0
 - slate-plain-serializer@0.2.0
 - slate-prop-types@0.2.0
 - slate-react@0.4.0
 - slate-simulator@0.1.14
 - slate@0.27.0
2017-10-14 15:38:20 -07:00
Ian Storm Taylor
6c42f6c9c3 Rename Range to Leaf, and Selection to Range (#1231)
* rename Range to Leaf

* rename Selection to Range

* add findDOMRange, findNode, findRange helpers

* refactor to remove findDropPoint util

* revert findDOMNode to throwing errors

* export new helpers, fix linter

* update docs

* update examples
2017-10-14 15:36:27 -07:00
Ian Storm Taylor
8b9fc09377 Publish
- slate-react@0.3.4
2017-10-14 11:22:35 -07:00
Ian Storm Taylor
35e8978655 remove void spacers in readonly, add tests 2017-10-14 10:10:47 -07:00
Ian Storm Taylor
3fef03174e Publish
- slate-react@0.3.3
2017-10-13 18:35:49 -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
576fb5a133 tweak void styles, fix tests 2017-10-13 18:05:05 -07:00
Ian Storm Taylor
5c1d43e3f9 fix block void node spacing, closes #1226 2017-10-13 18:00:51 -07:00
AlbertHilb
aa2ae9f4a1 Move onDragStart handler from Node to Void. (#1167) 2017-10-13 16:59:31 -07:00
Ian Storm Taylor
a8fd9de61f Publish
- slate-react@0.3.2
2017-10-13 15:44:28 -07:00
Ian Storm Taylor
41b3c80f11 fix tests 2017-10-13 15:43:59 -07:00
Ian Storm Taylor
545469ffe0 fix findNativePoint for void nodes 2017-10-13 15:22:16 -07:00
Ian Storm Taylor
d65931c74a Publish
- slate-base64-serializer@0.1.13
 - slate-dev-logger@0.1.14
 - slate-html-serializer@0.1.16
 - slate-hyperscript@0.1.13
 - slate-plain-serializer@0.1.14
 - slate-prop-types@0.1.13
 - slate-react@0.3.1
 - slate-simulator@0.1.13
 - slate@0.26.1
2017-10-13 15:03:20 -07:00
Renaud Chaput
e960918f87 Upgrade to React 16 (#1178)
* Allow React 16 in peerDeps and use it for dev

* Make tests pass with React 16

Changes are cosmetic:
- React 16 no longer adds a trailing `;` to `style` attributes
- React 16 outputs `0` and not `0px` for sizes in `style`
2017-10-13 15:01:18 -07:00
Ian Storm Taylor
de573f2bfc Publish
- slate-base64-serializer@0.1.12
 - slate-dev-logger@0.1.13
 - slate-html-serializer@0.1.15
 - slate-hyperscript@0.1.12
 - slate-plain-serializer@0.1.13
 - slate-prop-types@0.1.12
 - slate-react@0.3.0
 - slate-simulator@0.1.12
 - slate@0.26.0
2017-10-13 12:26:03 -07:00
Ian Storm Taylor
3b8749c6f4 fix deprecations in tests 2017-10-13 12:25:18 -07:00
Ian Storm Taylor
c62ab65a53 update slate-react changelog 2017-10-13 12:24:29 -07:00
Ian Storm Taylor
253971135f update changelog, add deprecation logging 2017-10-13 12:21:54 -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
65ab5681d9 Publish
- slate-base64-serializer@0.1.11
 - slate-dev-logger@0.1.12
 - slate-html-serializer@0.1.14
 - slate-hyperscript@0.1.11
 - slate-plain-serializer@0.1.12
 - slate-prop-types@0.1.11
 - slate-react@0.2.2
 - slate-simulator@0.1.11
 - slate@0.25.4
2017-10-13 10:51:48 -07:00
Ian Storm Taylor
28b865269c Merge branch 'master' of github.com:ianstormtaylor/slate 2017-10-13 10:35:06 -07:00
AlbertHilb
671c5857eb Rewrite drag&drop code related to void nodes. (#1193)
* Remove `onDragEnter`, `onDragLeave` and `onDrop` `Void` handlers.
Add `getDropPoint` to `utils`.

* Resolved caret position can be inside a void node even if the DOM
drop target isn't inside it. So resolve first the caret position,
then, if necessary, adjust the Slate drop target.
2017-10-13 10:34:56 -07:00
Per-Kristian Nordnes
79562f51de Fix copy single marked word bug (Chrome/Safari) (#1164) 2017-10-13 10:21:13 -07:00
David O'Trakoun
13025d79a6 Some fixes (#1225)
Ensure el has a tagName (e.g. textnode will not have a tagName) - found in slack channel

Strict equality checks for strings
2017-10-13 10:07:12 -07:00
Ian Storm Taylor
b1469d62eb fix tests 2017-10-12 20:03:18 -07:00
Ryan Yurkanin
b45e63c472 reversing return only logic (#1206) 2017-10-12 19:56:18 -07:00
Ian Storm Taylor
d6859bef53 Merge branch 'master' of github.com:ianstormtaylor/slate 2017-10-12 14:25:06 -07:00
Ian Storm Taylor
c36362a425 fix void blocks to node be inline-block, closes #1210 2017-10-12 14:24:38 -07:00
David O'Trakoun
9587bc4a50 Sanitize tagName check (#1212)
`In XML (and XML-based languages such as XHTML), tagName preserves case. On HTML elements in DOM trees flagged as HTML documents, tagName returns the element name in the uppercase form.`
2017-10-09 22:00:42 -07:00
Ian Storm Taylor
f9894ed443 Publish
- slate-react@0.2.1
2017-09-29 11:13:30 -07:00
Ian Storm Taylor
ed77bf0fa1 fix change queueing in <Editor> (#1196) 2017-09-29 11:12:13 -07:00
Ian Storm Taylor
fbefe18110 Publish
- slate-base64-serializer@0.1.10
 - slate-dev-logger@0.1.11
 - slate-html-serializer@0.1.13
 - slate-hyperscript@0.1.10
 - slate-plain-serializer@0.1.11
 - slate-prop-types@0.1.10
 - slate-react@0.2.0
 - slate-simulator@0.1.10
 - slate@0.25.3
2017-09-29 09:18:17 -07:00
Ian Storm Taylor
3c3093448f update changelog 2017-09-29 09:12:06 -07:00
Ian Storm Taylor
f442255739 re-add the onBeforeChange handling for normalizing to the <Editor> (#1195)
* re-add the onBeforeChange handling for normalizing to the <Editor>

* fix syntax

* add normalization with core schema too

* fix lint warning
2017-09-29 09:11:41 -07:00
Ian Storm Taylor
563e2bc5c0 Publish
- slate-html-serializer@0.1.12
2017-09-28 23:05:09 -07:00
Ian Storm Taylor
6d04cae274 fix html-serializer for jsdom use 2017-09-28 23:04:34 -07:00
Ian Storm Taylor
c90f5f0825 Publish
- slate-base64-serializer@0.1.9
 - slate-dev-logger@0.1.10
 - slate-html-serializer@0.1.11
 - slate-hyperscript@0.1.9
 - slate-plain-serializer@0.1.10
 - slate-prop-types@0.1.9
 - slate-react@0.1.10
 - slate-simulator@0.1.9
 - slate@0.25.2
2017-09-27 08:41:36 -07:00
Ian Storm Taylor
b8841cb300 curse you lerna 2017-09-27 08:40:43 -07:00
Ryan Yurkanin
f1f2db807e Adding regular build to the prepublish flow (#1184) 2017-09-26 18:37:42 -07:00
Ian Storm Taylor
9df4b6f65a Publish
- slate-html-serializer@0.1.10
 - slate-plain-serializer@0.1.9
 - slate-react@0.1.9
2017-09-26 10:08:19 -07:00
Nicolas Gaborit
dba3497b77 Apply stack.onBeforeChange in editor.onChange (#1183) 2017-09-26 10:06:05 -07:00
Ian Storm Taylor
4652f96d8d add benchmarks for html and plain serializers, fixes #1168 (#1169) 2017-09-22 18:38:41 -07:00
Ryan Yurkanin
8a68d8a749 Text nodes aware if the parent reference has changed to reupdate (#1166) 2017-09-22 07:55:13 -07:00
Ian Storm Taylor
4f730d9c64 Publish
- slate-html-serializer@0.1.9
2017-09-21 14:48:38 -07:00
Ian Storm Taylor
f16a902d35 ocd 2017-09-21 14:47:50 -07:00
Ryan Grove
6f889454d0 Fix error when pasted HTML includes a doctype (#1160)
* Fix error when pasted HTML includes a doctype

When pasted HTML includes a doctype definition, `parsed.childNodes[0]`
is the doctype node, not the `<html>` node, so it's not safe to assume
that `parsed.childNodes[0].childNodes[1]` is the `<body>` node.

Using `parsed.body` ensures that we always get the `<body>` node no
matter where it is in the document.

* Update index.js
2017-09-21 14:41:08 -07:00
Ian Storm Taylor
c3f188c39f Publish
- slate-base64-serializer@0.1.8
 - slate-dev-logger@0.1.9
 - slate-html-serializer@0.1.8
 - slate-hyperscript@0.1.8
 - slate-plain-serializer@0.1.8
 - slate-prop-types@0.1.8
 - slate-react@0.1.8
 - slate-simulator@0.1.8
 - slate@0.25.1
2017-09-21 13:30:49 -07:00
Ian Storm Taylor
f983a58d3b remove unnecessary changes from deleteAtRange 2017-09-21 13:30:20 -07:00