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

160 Commits

Author SHA1 Message Date
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
Ian Storm Taylor
3b48a083f8 Publish
- slate-base64-serializer@0.1.7
 - slate-dev-logger@0.1.8
 - slate-html-serializer@0.1.7
 - slate-hyperscript@0.1.7
 - slate-plain-serializer@0.1.7
 - slate-prop-types@0.1.7
 - slate-react@0.1.7
 - slate-simulator@0.1.7
 - slate@0.25.0
2017-09-21 13:01:28 -07:00
Ian Storm Taylor
1320d56c4f fix tests 2017-09-21 12:59:41 -07:00
Ian Storm Taylor
a5f91ab7d4 update changelog 2017-09-21 12:55:30 -07:00
Ian Storm Taylor
a2b922276f remove pseudo-normalization from Node.create, fixes #1155 (#1158) 2017-09-21 12:52:51 -07:00
Per-Kristian Nordnes
c070ae7aba Add replaceNodeByKey change (#1117) 2017-09-21 12:52:41 -07:00
Ian Storm Taylor
31c1f6e9b7 Publish
- slate-base64-serializer@0.1.6
 - slate-dev-logger@0.1.7
 - slate-html-serializer@0.1.6
 - slate-hyperscript@0.1.6
 - slate-plain-serializer@0.1.6
 - slate-prop-types@0.1.6
 - slate-react@0.1.6
 - slate-simulator@0.1.6
 - slate@0.24.6
2017-09-21 11:56:10 -07:00
Ian Storm Taylor
375573f9ee fix copying text with leading/trailing white space, fixes #1153 (#1157)
* fix copying text with leading/trailing white space, fixes #1153

* remove extra removeChild
2017-09-21 11:55:22 -07:00
Ian Storm Taylor
3aa5f41cff refactor deleteAtRange() to remove unnecessary splits, fixes #1152 (#1156) 2017-09-21 11:32:26 -07:00
AlbertHilb
4212c63872 Move code used to render text nodes into a separate React component (#1150)
* Move code used to render text nodes from `Node` into a separate
React component.

* Fix comments.
2017-09-21 10:02:29 -07:00
Benjamin Kniffler
13fd6d3a62 Fix warning with latest react due to autocorrect being bool (#1148)
`Received 'true' for non-boolean attribute 'autoCorrect'. If this is expected, cast the value to a string.`

Latest react won't autocast the bool to on/off
2017-09-20 08:29:03 -07:00
Ian Storm Taylor
007c71a928 Publish
- slate-base64-serializer@0.1.5
 - slate-dev-logger@0.1.6
 - slate-html-serializer@0.1.5
 - slate-hyperscript@0.1.5
 - slate-plain-serializer@0.1.5
 - slate-prop-types@0.1.5
 - slate-react@0.1.5
 - slate-simulator@0.1.5
 - slate@0.24.5
2017-09-19 08:53:51 -07:00
AlbertHilb
1663e4b81c Make Void block component width 100%. (#1142)
* Make `Void` block component width `100%`.

* Update tests.
2017-09-19 08:53:07 -07:00
Gabin Aureche
33a36679d9 Add a way to customize shouldComponentUpdate logic (#1140)
* Add a way to customize shouldComponentUpdate logic

* Clean

* Warn when returning false in shouldNodeComponentUpdate

* Clean
2017-09-19 08:52:38 -07:00
Nicolas Gaborit
9eaf2b70fa Mention change in core block normalization (#1141)
The following change surprised me in some of my tests concerning normalization:

https://github.com/ianstormtaylor/slate/blame/master/packages/slate/src/schemas/core.js#L55-L60

I thought it was worth mentioning.
2017-09-19 08:14:42 -07:00
Ian Storm Taylor
cb3baf4de4 Publish
- slate-base64-serializer@0.1.4
 - slate-dev-logger@0.1.5
 - slate-html-serializer@0.1.4
 - slate-hyperscript@0.1.4
 - slate-plain-serializer@0.1.4
 - slate-prop-types@0.1.4
 - slate-react@0.1.4
 - slate-simulator@0.1.4
 - slate@0.24.4
2017-09-18 15:13:34 -07:00
Ian Storm Taylor
cb93e9f5c3 add target property to split_node operations (#1138) 2017-09-18 15:12:57 -07:00
Ian Storm Taylor
56bbf57623 Publish
- slate-base64-serializer@0.1.3
 - slate-dev-logger@0.1.4
 - slate-html-serializer@0.1.3
 - slate-hyperscript@0.1.3
 - slate-plain-serializer@0.1.3
 - slate-prop-types@0.1.3
 - slate-react@0.1.3
 - slate-simulator@0.1.3
 - slate@0.24.3
2017-09-18 12:33:01 -07:00
Ian Storm Taylor
1c2e42e008 update slate peer dep in packages to prevent lerna from bumping it 2017-09-18 12:32:25 -07:00
Ian Storm Taylor
042c10b14c fix getFragmentByRange logic for same text node, closes #1123 2017-09-18 12:28:38 -07:00
Ian Storm Taylor
9ae40a8b94 Publish
- slate-base64-serializer@0.1.2
 - slate-dev-logger@0.1.3
 - slate-html-serializer@0.1.2
 - slate-hyperscript@0.1.2
 - slate-plain-serializer@0.1.2
 - slate-prop-types@0.1.2
 - slate-react@0.1.2
 - slate-simulator@0.1.2
 - slate@0.24.2
2017-09-18 11:58:29 -07:00
Ian Storm Taylor
19307197ed fix tests 2017-09-18 11:57:26 -07:00
Ryan Yurkanin
ca4075eb47 moving over weird ghost text node if keys are the same (#1131) 2017-09-18 11:20:30 -07:00
AlbertHilb
fd7981782c Call scrollToSelection on selection update. (#1134) 2017-09-18 09:22:01 -07:00
Ian Storm Taylor
ee2c4e6bc7 fix preserveSelection in tests 2017-09-18 09:12:47 -07:00
Ian Storm Taylor
f52967c9e6 Publish
- slate-base64-serializer@0.1.1
 - slate-dev-logger@0.1.2
 - slate-html-serializer@0.1.1
 - slate-hyperscript@0.1.1
 - slate-plain-serializer@0.1.1
 - slate-prop-types@0.1.1
 - slate-react@0.1.1
 - slate-simulator@0.1.1
 - slate@0.24.1
2017-09-14 14:18:51 -07:00