1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-19 06:35:03 +01:00

42 Commits

Author SHA1 Message Date
Joel Gustafson
dd87e3b26d Update saving-and-loading-html-content.md (#1362)
Fixed a typo: should be `paragraph`, not `code`.
2017-10-31 22:24:32 -07:00
Ryan
49ebbf9595 update doc's text node key ranges -> leaves (#1343) 2017-10-30 09:06:50 -07:00
Ian Storm Taylor
adb2678732
Rename "state" to "value" everywhere (#1313)
* rename state to value in slate core, as deprecation

* rename all references to state to value in slate core

* migrate slate-base64-serializer

* migrate slate-html-serializer

* migrate slate-hyperscript

* migrate slate-plain-serializer

* migrate slate-prop-types

* migrate slate-simulator

* fix change.setState compat

* deprecate references to state in slate-react

* remove all references to state in slate-react

* remove `value` and `schema` from props to all components

* fix default renderPlaceholder

* fix tests

* update examples

* update walkthroughs

* update guides

* update reference
2017-10-27 13:39:06 -07:00
Ian Storm Taylor
509d3d50fc remove rendering from schema & make it expressive (#1262)
* split rendering out of schema

* remove default components

* first stab at new schema

* make default normalizations smarter

* revert to forcing defaults to be verbose?

* refactor reason constants

* split nodes into blocks/inlines

* get tests passing

* restructure schema tests

* add parent test

* cleanup

* remove defaults from schema

* refactor schema rule.nodes validation, update example

* embed schema in state objects

* fixes

* update examples, and fixes

* update walkthroughs

* update docs

* remove old schemas doc page

* add more tests

* update benchmarks
2017-10-25 17:32:29 -07:00
Ian Storm Taylor
54ec11e199 update walkthroughs, docs and changelog 2017-10-16 21:13:07 -07:00
Ian Storm Taylor
f69d2c4a12 remove keyboard data.* properties (#1235)
* update examples and walkthroughs

* deprecate data keyboard properties

* update examples

* add is-hotkey to resources doc

* udpate docs

* update docs

* fix split-block test
2017-10-15 19:23:07 -07:00
Yifeng Wang
58648bc23f fix minor doc typos (#1233) 2017-10-15 14:22:00 -07:00
Renaud Chaput
a68a6466f9 [Doc] Remove unused code in Plugins Walkthroughs (#1172)
The `BoldMark` function has been inlined below, it is no longer used here
2017-10-12 19:59:56 -07:00
Ian Storm Taylor
c98ad903c8 Upgrade docs (#1182)
* remove table of contents

* remove more hard-coded table of contents

* remove comparisons, rewrite "why" section to be more general

* update intro
2017-09-25 11:50:23 -07:00
Yifeng Wang
f34a716ee7 update import declaration in walkthrough (#1174) 2017-09-25 08:43:18 -07:00
Ian Storm Taylor
560dbe5038 fix docs links, closes #1116 2017-09-12 08:55:15 -07:00
Ian Storm Taylor
133831ee4e update docs 2017-09-10 15:29:42 -07:00
Ian Storm Taylor
976af2cda1 deprecate onDocumentChange and onSelectionChange, fixes #614 (#1081) 2017-09-07 11:51:45 -07:00
David Gertmenian-Wong
a75899f57a Update walkthrough docs to use change object instead of state (#1062) 2017-09-06 17:51:40 -07:00
Peter Klipfel
0ab70fd1af fixes errors for basic app with installation (#1056)
The old onChange function caused a bunch of `Uncaught TypeError: _this.state.state.change is not a function` errors. Adding the object destructure to the arguments fixes this.
2017-09-06 11:49:50 -07:00
Ian Storm Taylor
7470a6dd53 Expose transforms (#836)
* refactor to extract applyOperation util

* change handlers to receive transform instead of state

* change onChange to receive a transform, update rich-text example

* fix stack iterationg, convert check-list example

* convert code-highlighting, embeds, emojis examples

* change operations to use full paths, not indexes

* switch split and join to be recursive

* fix linter

* fix onChange calls

* make all operations invertable, add src/operations/* logic

* rename "join" to "merge"

* remove .length property of nodes

* fix node.getFragmentAtRange logic

* convert remaining examples, fix existing changes

* fix .apply() calls and tests

* change setSave and setIsNative transforms

* fix insert_text operations to include marks always

* cleanup and fixes

* fix node inheritance

* fix core onCut handler

* skip constructor in node inheritance

* cleanup

* change updateDescendant to updateNode

* add and update docs

* eliminate need for .apply(), change history to mutable

* add missing file

* add deprecation support to Transform objects

* rename "transform" to "change"

* update benchmark

* add deprecation util to logger

* update transform isNative attr

* fix remaining warn use

* simplify history checkpointing logic

* fix tests

* revert history to being immutable

* fix history

* fix normalize

* fix syntax error from merge
2017-09-05 18:03:41 -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
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
Ryan Yurkanin
17cd478fad tagName returns capitalized name now (#985) 2017-08-15 10:57:18 -07:00
Hans-Wilhelm Warlo
469d8b394c Refactor render arrow functions (#969) 2017-08-02 09:36:33 -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
Leon Koole
b6541854fa Fix missing isAltKey (#855) 2017-05-30 13:15:11 -07:00
Mike Hearn
4013d0b18a Minor update to Saving to Database doc (#831) 2017-05-23 18:36:13 -07:00
Asaf Katz
06c54bd991 Docs improvements suggestions (#801)
* Fix typo

* Make it clearer that addMark has changed too
2017-05-21 10:36:23 -07:00
Brian Kabiro
cb98408115 Update defining-custom-block-nodes.md (#776) 2017-05-03 16:51:13 -07:00
eden lane
eb03bd8ec4 Changed hotkey for code block in the walkthrough due to lack of support hotkey ⌘-C in Chrome on Mac (#741) 2017-04-21 21:14:04 -07:00
Conor Cussell
6333275aa0 use correct localStorage method for setting content (#684) 2017-03-24 16:19: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
Kyle Kelley
fa4f9dff6c docs: Delete dangling } (#642) 2017-03-02 17:18:16 -08:00
Victor Pontis
16d8496760 Fix typo on installing Slate documentation (#638) 2017-03-01 11:40:17 -08:00
Ian Storm Taylor
77ffcaae66 add preventDefault to all examples 2017-02-16 10:16:19 -08:00
Michael Plotke
da10eaeca9 Prevent an unexpected ampersand (#604) 2017-02-16 10:12:38 -08:00
Ian Storm Taylor
8bb92aea6d fix saving to a database example, closes #455 2016-11-28 11:17:36 -08:00
Ian Storm Taylor
6591f248bb update walkthroughs to remove function creation from render, closes #394 2016-11-17 18:56:09 -08:00
Matthew Kosloski
3c46d0544c fixed a few typos (#293) 2016-09-04 17:31:06 -07:00
Nick Passarella
43d5735cc9 Fixes a small error in a code example in HTML walkthrough. (#280) 2016-08-31 19:35:34 -07:00
npmcdn-to-unpkg-bot
0893418bca Replace npmcdn.com with unpkg.com (#284) 2016-08-31 19:35:22 -07:00
Ian Storm Taylor
9d293f5ede update docs 2016-08-25 22:59:36 -04:00
Ian Storm Taylor
cb0b9b9095 update keydown handler signature (#254)
* update keydown handler signature

* Update applying-custom-formatting.md

* Update defining-custom-block-nodes.md

* Update saving-to-a-database.md

* Update using-plugins.md
2016-08-18 09:40:19 -07:00
Anton Kulakov
597fbdec72 Fixed typo (#252) 2016-08-18 09:14:58 -07:00
Ian Storm Taylor
e3e9afba43 update walkthroughs and history 2016-08-14 18:25:12 -07:00
Ian Storm Taylor
06af3de5e5 start adding docs 2016-08-14 14:38:27 -07:00