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

1803 Commits

Author SHA1 Message Date
Ryan Yurkanin
05ab702e40 fixing a breaking change in node/mark properties (#1049) 2017-09-05 16:43:24 -07:00
Ian Storm Taylor
e72266802d 0.21.5 v0.21.5 2017-09-05 11:26:00 -07:00
Ryan Yurkanin
aec3b702c4 Fixing onDrop for Inline Nodes, Harder type checking in normalize fun… (#1033)
* Fixing onDrop for Inline Nodes, Harder type checking in normalize functions, Omitting Pseudo-symboles from nodeProperties/markProperties

* Refactoring code

* Making normalize blacklist clearer

* Update normalize.js

* Update core.js

* Linting fixes, no trailing spaces
2017-09-05 09:59:35 -07:00
mjadobson
43dbfbcb58 Fix drop contents insertion (#929)
Now drop fragments insert at correct location
2017-09-05 09:51:44 -07:00
AlbertHilb
8a6024fe85 Always call preventDefault() on onDrop events. (#1043) 2017-09-05 09:26:20 -07:00
Per-Kristian Nordnes
f6ca563c4d Remove event.preventDefault which causes cursor not to be shown when dragging (#1040) 2017-09-05 09:23:48 -07:00
Per-Kristian Nordnes
a0c4073f22 Fix bug where insertBlock and insertBlockAtRange always inserted the block below the target, even though focus was collapsed to start (#1037) 2017-09-05 09:22:58 -07:00
Per-Kristian Nordnes
e79ec24f39 Add tests for collapseToStart/End when selected node is void (#1038) 2017-09-05 09:21:26 -07:00
Per-Kristian Nordnes
044ffbf62c Fix bug where void nodes would not deleted, even though they were selected (#1041) 2017-09-05 09:20:39 -07:00
Per-Kristian Nordnes
10ff951661 Fix bug where up and down arrow keys would incorrectry select neighbouring void blocks (#1042) 2017-09-05 09:17:58 -07:00
Tobias Andersen
d85fcda0c0 fix: reset drag counter properly in void nodes (#1035) 2017-09-05 09:14:29 -07:00
Ryan Yurkanin
9faaccd8ed Adding , adding documentation, adding some basic tests (#1045) 2017-09-05 09:13:40 -07:00
Ian Storm Taylor
7cfbbfc5e4 0.21.4 v0.21.4 2017-08-25 12:13:18 -07:00
Irwan Fario Subastian
2076cdbc99 expose onKeyUp (#1026)
* expose onKeyUp to be used by plugin

* Update plugin.md
2017-08-24 22:24:15 -07:00
Ian Storm Taylor
b0d481978b 0.21.3 v0.21.3 2017-08-22 17:06:34 -07:00
Yifeng Wang
e5c42c416d Add .babelrc into .npmignore (#1020) 2017-08-22 16:57:47 -07:00
Lauren
d58f37b1c2 Add a missing dependency which was causing errors (#1017)
Because `src/serializers/html.js` depends on `ReactDOMServer.renderToStaticMarkup`, which is no longer bundled with ReactDOM, ReactDOMServer is needed to avoid errors when the HTML serializer is used.
2017-08-22 16:56:55 -07:00
Dan Burzo
5712bcb2af Fixes #1010 — adds debuginfo to Contributing.md (#1011) 2017-08-22 16:48:26 -07:00
Dan Burzo
239d97fcad Add State.characters to docs (#1006) 2017-08-18 08:51:13 -07:00
David Gertmenian-Wong
74d697b4b8 Use parent node to find text node parent (#1004) 2017-08-17 14:51:13 -07:00
Kirill Volkovich
577b5c7570 IE11 compat (#996)
* Convert "for ... of" loops to simple "for(;;)"

* Add .editorconfig

* Convert "for ... of" loops to simple "for(;;)"; Array.find => filter

* Replace Array.prototype.find via local "find" method implementation

* Replase utils/find by lodash/find

* Remove .editorconfig

* Fix lint errors
2017-08-17 11:49:44 -07:00
Kirill Volkovich
31601d9a26 Add .editorconfig and .gitattributes (#997)
* Add .editorconfig and .gitattributes

* Remove .gitattributes

* Update .editorconfig

* Update .editorconfig
2017-08-17 10:37:38 -07:00
Tobias Andersen
bf24e77518 Improve documentation (#1000)
* Fix typos in docs

* Add missing Editor properties in docs
2017-08-17 10:24:31 -07:00
Zach Schneider
e6a4009d75 Consistently use toLowerCase in tag name comparisons. (#1001)
* Consistently use toLowerCase in tag name comparisons.

* Add quick note about tagName casing.
2017-08-17 10:23:38 -07:00
Craig
8469c64d9e Custom wrapper component (#978)
* Provide prop to pass in custom wrapper component

* Fix linting

* Fix lint

* PR Feedback - change propName container -> tagName; remove custom-wrapper example

* Reset examples/index.js
2017-08-16 09:53:28 -07:00
Dan Burzo
31aa33b4d3 Add link to IME reference page in Contributing.md (#995) 2017-08-16 09:39:34 -07:00
Dan Burzo
b7db3feb36 Don't break macOS emoji insert nor composition when fixing #938 (#994)
* Don't break macOS emoji insert nor composition when fixing #938

* Simpler solution for this

* Remove data.isComposing
2017-08-16 09:39:10 -07:00
David Gertmenian-Wong
458c022013 When the isInEditor parameter is a text node use its parent only if the parent exists (#974)
* When the parameter passed to `isInEditor` is a text node use its parent if the parent exists

* Add comment on `parentElement` text node browser compatibility
2017-08-15 12:23:01 -07:00
Dan Burzo
169a59a596 Document Raw serializer options (#993)
* Document Raw serializer options

* Update raw.md
2017-08-15 11:16:10 -07:00
Ryan Yurkanin
17cd478fad tagName returns capitalized name now (#985) 2017-08-15 10:57:18 -07:00
Dan Burzo
979dadf2d6 Fixes #938 chrome eating first line of text on space at beginning of line (#991) 2017-08-15 10:42:33 -07:00
Dan Burzo
aafdc4a224 Fixes #817; fragment matcher regex (#992) 2017-08-15 10:39:46 -07:00
Ian Storm Taylor
ace2144e75 Update ISSUE_TEMPLATE.md 2017-08-15 10:38:44 -07:00
Ian Storm Taylor
f0e1965e4c Update Contributing.md 2017-08-15 10:36:10 -07:00
Ryan Yurkanin
ff57cd697f Allow Data to be passed to Marks when using HTML Deserializer (#986)
* making it possible to pass in data to marks on deserialize

* adding a test to make sure this doesn't happen again
2017-08-15 10:26:49 -07:00
Ian Storm Taylor
18f41e72ce 0.21.2 v0.21.2 2017-08-09 12:16:12 -07:00
Ian Storm Taylor
d7a82e81fa Merge branch 'cdd-master' 2017-08-09 12:11:50 -07:00
Ian Storm Taylor
207f459625 alphabetize package.json scripts 2017-08-09 12:08:35 -07:00
jacobbloomCDD
e0d993617d Speed up getting blocks at a range
Old implementation was far too slow if a selection included many nodes.
The performance hit occurred when converting each and every text node
into a block.  This is now avoided by using the same logic as
getTextsAtRangeAsArray for getBlocksAtRangeAsArray, but using blocks
directly.
2017-08-08 11:37:45 -07:00
Ryan Yurkanin
3eb72a8642 Remove instanceOf checks to allow Slate objects to be identifiable across module instances (#930)
* putting in the correct type pseudo-symbols

* getting the pseudo symbols everywhere that the instance of's are

* Making Ian's suggestions on checking types with static methods

* cleaning up leftover hard checks

* adding in slate proptypes, cleaning up unneeded whitespace

* updating documentation, moving keys to prototypes finally, al tests passing

* organizing types, prop-types, more succint type names

* eslint fix

* fixing model-types bug, changing proptype names
2017-08-02 10:49:09 -07:00
Hans-Wilhelm Warlo
469d8b394c Refactor render arrow functions (#969) 2017-08-02 09:36:33 -07:00
Ian Storm Taylor
f89f0f875c update prosemirror description in readme 2017-08-02 09:27:22 -07:00
Ian Storm Taylor
5d25699e5a update prosemirror description in docs 2017-08-02 09:25:32 -07:00
Ian Storm Taylor
c59ca5628e update prosemirror comparison in readme 2017-08-02 09:24:39 -07:00
Ian Storm Taylor
85fce2dd46 0.21.1 v0.21.1 2017-08-01 09:47:28 -07:00
Phil Mahlero
6a2de0ac4d Fix for HTML pasting not working in IE (#882)
* imported babel-polyfill to make examples run in IE

* Fix for HTML pasting not working in IE

* Revert "imported babel-polyfill to make examples run in IE"

This reverts commit a8405075d6a44de8cae8092e3773829b56dadd93.

* Refactored and corrected comments of fix: HTML pasting not working in IE

* Removed handleData and tuned getTransferData call of fix: HTML pasting not working in IE
2017-08-01 09:09:12 -07:00
Zach Schneider
78bb1508ac Remove unneeded check. (#961)
Even if the el.tagName is a span, it will fall through to the child
text node so the check is unneeded.
2017-08-01 09:06:55 -07:00
Zach Schneider
56fa2c4208 Upgrade react-frame-component. (#962)
Gets rid of warning in dev about directly accessing `React.PropTypes`
2017-08-01 09:06:39 -07:00
Ryan Yurkanin
af84cf2511 adding forced-layout-example (#954) 2017-07-31 18:19:45 -07:00
Zach Schneider
f8b103d75e Reckon with inconsistencies between parse5 and native DOMParser (#952) 2017-07-31 18:18:30 -07:00