1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-02 22:28:46 +01:00

1744 Commits

Author SHA1 Message Date
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
Conor Cussell
1e3cdafb59 Omit version on gzip size badge (#947)
I noticed that the file size badge didn't change when Cheerio was removed in 0.21.0. Because I stupidly pinned it to version 0.19.0 😳  - this will now always show the gzip size of the latest release
2017-07-25 09:51:32 -07:00
Ian Storm Taylor
3eebb71a9c update issue template and contributing docs 2017-07-20 10:30:40 -07:00
Ian Storm Taylor
6123985c4f add reboo editor to resources 2017-07-20 10:03:40 -07:00
Ian Storm Taylor
1a01c6f6d2 add showcase to resources 2017-07-20 10:01:59 -07:00
Ian Storm Taylor
f376911566 0.21.0 v0.21.0 2017-07-20 09:51:24 -07:00
Ian Storm Taylor
8003117c56 update changelog 2017-07-20 09:50:06 -07:00
Zach Schneider
4bbf7487ea Replace cheerio with parse5 (#934)
* Replace cheerio with parse5

* Convert to dependency injection for HTML parser
* Add options.domParser to HTML serializer
* Fallback to native DOMParser if present and no option provided
* Error if no DOM parser is available (option or native)
* Update tests to pass parse5 as config option

* Update test so it passes.
Cheerio interprets `<p><hr /></p>` as one `p` node with a child `hr`
node, but both parse5 and native DOMParser interpret it as 3 nodes: a
blank `p` node, `hr` node, and second blank `p` node. Update test
expectation to match new API.

* Remove cheerio-esque compatibility conversion.

* Use `application/xml` in native DOMParser
Using `text/html` causes it to wrap the fragment in html, body, etc

* Change error message to single line.
Was inserting an undesired newline char

* Add documentation for new `domParser` option to html serializer
Also boyscout missing documentation for `defaultBlockType` option

* Rename `domParser` option to `parseHtml`
Rename the option to make it clearer what it does, since it accepts a
function and not a `DOMParser` analogue object.
2017-07-20 09:46:02 -07:00
Ian Storm Taylor
cf85c6e3fb 0.20.7 v0.20.7 2017-07-20 09:41:28 -07:00
Ian Storm Taylor
55dcd70fad Rename History.md to Changelog.md 2017-07-19 08:31:13 -07:00