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

691 Commits

Author SHA1 Message Date
Sunny Hirai
cc7f035229 Added a warning for Android in faq (#3356) 2019-12-18 21:18:35 -05:00
Ian Storm Taylor
0bbe121d76
Remove commands (#3351)
* remove commands in favor of editor-level functions

* update examples

* fix lint
2019-12-18 15:00:42 -05:00
Ian Storm Taylor
235a578967
rename Node.text to Node.string (#3341) 2019-12-17 22:17:21 -05:00
Ian Storm Taylor
4ee9f8b4e6 fix LOC estimates with new version of cloc 2019-12-16 16:41:35 -05:00
Ian Storm Taylor
7d832b5e12
Standardize node matching APIs (#3327)
* add lowest mode and universal flag to `Editor.nodes`

* add `mode` handling to all transforms

* add extra `Editor.is*` helpers

* change `Editor.previous` to make all optional

* change `Editor.next` to make all optional

* change `Editor.match` to make all optional

* add `Editor.void` helper

* remove non-function match arguments

* remove NodeMatch interface

* change to lowest match by default everywhere

* rename `Editor.match` to `Editor.above`

* use new helpers

* cleanup

* make NodeEntry generic, cleanup

* fix NodeEntry generics

* ensure only ancestors are returned from Editor.above

* add type-narrowing to `Editor.nodes`, remove extras

* remove other Node entry types

* cleanup

* remove `Editor.block` and `Editor.inline` helpers
2019-12-15 19:36:05 -05:00
Ian Storm Taylor
6552da940a
Add format_text command, and editor.marks state (#3308)
* add format_text command, refactor command extensions

* update onChange to not receive selection

* update docs

* fix tests
2019-12-12 15:37:55 -05:00
Ian Storm Taylor
e68a5cd305
remove the slate-schema package (#3291) 2019-12-10 17:53:27 -05:00
Ian Storm Taylor
faf73d4521 fix normalizing guide 2019-12-10 14:26:09 -05:00
Ian Storm Taylor
c35ca628f2 typo 2019-12-10 14:01:21 -05:00
Ian Storm Taylor
dbac72cc8e add normalizing guide to docs 2019-12-10 13:55:44 -05:00
Ryan Gurney
1141f59f4f Small docs changes (#3279)
* Small docs changes

Fixes a couple of small typos in the plugins documentation.

* Update 07-plugins.md
2019-12-09 13:16:50 -05:00
Yoz Grahame
ff516ccad8 Fix introduction links to examples (#3266)
Existing links (to Github) were 404ing, so I changed them to point to slatejs.org.
Removed the final list item linking to the rest of the examples, since I can't see a page on slatejs.org that does that. Instead, I added a line after the examples list that talks about "View Source" and links to the Github folder listing.
2019-12-06 17:22:56 -05:00
Ian Storm Taylor
be8b7222ee update walkthroughs 2019-12-06 12:06:53 -05:00
Tim Buckley
ed974222a9 Custom Format docs typo fix: leaf -> props (#3257)
* Custom Format docs typo fix: leaf -> props

* Update 04-applying-custom-formatting.md
2019-12-05 19:13:34 -05:00
Ryan Gurney
6aae94156b Change B to I in code example (#3256)
Fixes a ridiculously small typo in the rendering code example.
2019-12-05 18:58:41 -05:00
Ian Storm Taylor
12af78609f fix gitbook sidebar 2019-12-05 13:11:10 -05:00
Ian Storm Taylor
fad4e7fc80 fix gitbook sidebar 2019-12-05 12:59:14 -05:00
Ian Storm Taylor
124ff37c3a update docs 2019-12-05 12:52:52 -05:00
Ian Storm Taylor
7e6f680a1f update changelogs 2019-12-05 11:44:07 -05:00
Ian Storm Taylor
f3fc2c2a54
Change <Slate> to a controlled component (#3216)
* change <Slate> to be a controlled component

* add comment about unstable React API
2019-12-05 11:36:44 -05:00
Ian Storm Taylor
4c03b497d9
remove marks, in favor of text properties (#3235)
* remove marks, in favor of text properties

* fix lint

* fix more examples

* update docs
2019-12-05 11:21:15 -05:00
Ian Storm Taylor
6fc935a4b8 remove Editor.toggleMarks from docs 2019-12-02 22:23:58 -05:00
Ian Storm Taylor
22b2ae507e fix links in migrating guide 2019-12-02 20:03:46 -05:00
Wee
434ce21cec feat: allow MarkTransforms methods to take a single mark (resolve #3175) (#3183) 2019-12-01 13:49:29 -05:00
Ian Storm Taylor
68569f286e improve Editor.marks and Editor.nodes abstraction 2019-11-29 23:15:08 -05:00
sherwinyu
0da1dd128c Update Adding Event Handlers walkthrough (#3169)
The previous example no longer uses `onChange`, so don't reference it in this walkthrough.
2019-11-29 17:25:40 -05:00
sherwinyu
2ad7735869 Fix typos in Installing Slate walkthrough (#3168) 2019-11-29 15:07:16 -05:00
Marton Langa
f7a72a1977 Fix typo in docs (#3166) 2019-11-29 12:41:52 -05:00
Ian Storm Taylor
5e5f1d9046 fix guides links 2019-11-29 08:11:37 -05:00
Irwan Fario Subastian
cedc7dc2a5 lint & example fixes (#3160)
* fix import extensions of eslint

* revert next.config.cjs

* fix eslint globbing

* add migrating to docs’ sidebar

* fix prettier error on Contributing.md

* put quotes for glob matching for windows user

* remove type: module from  package.json
2019-11-29 00:16:39 -05:00
Marton Langa
6608a5df39 Remove controlled value state (#3153) 2019-11-28 17:21:12 -05:00
Marton Langa
5de91cb4ee Fix variable name (#3156) 2019-11-28 17:20:54 -05:00
Ian Storm Taylor
7f2bbcfef2 fix linter 2019-11-28 12:38:12 -05:00
Matt Mazzola
d457bc52b9 Docs fixes for 0.50.0 (#3133)
* docs: typos

* docs: markdown inline code formatting

https://meta.stackexchange.com/questions/82718/how-do-i-escape-a-backtick-within-in-line-code-in-markdown

* docs: remove unused value, move comment, add deps to callback

* docs: add deps to renderMark callback
2019-11-28 10:37:35 -05:00
tepythai
15a8e0ee72 Fix typo in XX-migrating.md (#3136)
In ### Hooks section, I suppose it is "they use React's Context API" rather than "the use React's Content API". Please ignore this if it is not a typo. Thanks.
2019-11-28 10:31:54 -05:00
Charley DAVID
b2c5d57788 Add Slite.com as example of usage (#3142) 2019-11-28 10:30:15 -05:00
Ian Storm Taylor
4ff6972096
Next (#3093)
* remove some key usage from core, refactor Operations.apply

* undeprecate some methods

* convert more key usage to paths

* update deprecations

* convert selection commands to use all paths

* refactor word boundary selection logic

* convert many at-range commands to use paths

* convert wrapBlock and wrapInline to not use keys

* cleanup

* remove chainability from editor

* simplify commands, queries and middleware

* convert deleteAtRange

* remove key usage from schema, deprecate *ByKey methods

* migrate *ByKey tests, remove index from *ByPath signatures

* rename at-current-range tests

* deprecate mode key usage, migrate more tests away from keys

* deprecate range and point methods which rely on keys to work

* refactor insertBlock, without fixing warnings

* add pathRef/pointRef, fix insertBlock/Inline deprecations, work on insertFragment

* refactor insertFragment

* get rich-text example rendering

* fix lint

* refactor query files, fix more tests

* remove unused queries, refactor others

* deprecate splitDescendantsByPath

* merge master

* add typescript, convert slate, slate-hyperscript, slate-plain-serializer

* add Point, Path, Range, Annotation tests

* add Annotation, Change, Element, Fragment, Mark, Range, Selection, Value interfaces tests

* add Operation and Text tests

* add Node tests

* get operations and normalization tests working for slate

* get *AtPath command tests passing

* rename *AtPath command tests

* rename

* get *AtPoint tests working

* rename

* rename

* add value queries tests

* add element, mark and path queries tests

* convert most on-selection tests

* convert on-selection commands

* rename

* get addMarks and delete commands working

* rename

* rename

* rename

* refactor value.positions(), work on delete tests

* progress on delete tests

* more delete work

* finish delete tests

* start converting to at-based commands

* restructure query tests

* restructure operations tests

* more work converting to multi-purpose commands

* lots of progress on converting to at-based commands

* add unwrapNodes

* remove setValue

* more progress

* refactor node commands to use consistent matching logic

* cleanup, get non-fragment commands passing

* remove annotations and isAtomic

* rename surround/pluck to cover/uncover

* add location concept, change at-path to from-path for iterables

* refactor batches

* add location-based queries

* refactor hanging logic

* more location query work

* renaming

* use getMatch more

* add split to wrap/unwrap

* flip levels/ancestors ordering

* switch splitNodes to use levels

* change split to always:false by default

* fix tests

* add more queries tests

* fixing more delete logic

* add more splitNodes tests

* get rest of delete tests passing

* fix location-based logic in some commands

* cleanup

* get previous packages tests passing again

* add slate-history package

* start slate-schema work

* start of react working

* rendering fixes

* get rich and plain text examples working

* get image example working with hooks and dropping

* refactor onDrop to be internal

* inline more event handlers

* refactor lots of event-related logic

* change rendering to use render props

* delete unused stuff

* cleanup dom utils

* remove unused deps

* remove unnecessary packages, add placeholder

* remove slate-react-placeholder package

* remove unused dep

* remove unnecessary tests, fix readonly example

* convert checklists example

* switch to next from webpack

* get link example working

* convert more examples

* preserve keys, memoized leafs/texts, fix node lookup

* fix to always useLayoutEffect for ordering

* fix annotations to be maps, memoize elements

* remove Change interface

* remove String interface

* rename Node.entries to Node.nodes

* remove unnecessary value queries

* default to selection when iterating, cleanup

* remove unused files

* update scroll into view logic

* fix undoing, remove constructor types

* dont sync selection while composing

* add workflows

* remove unused deps

* convert mentions example

* tweaks

* convert remaining examples

* rename h to jsx, update schema

* fix schema tests

* fix slate-schema logic and tests

* really fix slate-schema and forced-layout example

* get start of insertFragment tests working

* remove Fragment interface

* remove debugger

* get all non-skipped tests passing

* cleanup deps

* run prettier

* configure eslint for typescript

* more eslint fixes...

* more passing

* update some docs

* fix examples

* port windows undo hotkey change

* fix deps, add basic firefox support

* add event overriding, update walkthroughs

* add commands, remove classes, cleanup examples

* cleanup rollup config

* update tests

* rename queries tests

* update other tests

* update walkthroughs

* cleanup interface exports

* cleanup, change mark transforms to require location

* undo mark transform change

* more

* fix tests

* fix example

* update walkthroughs

* update docs

* update docs

* remove annotations

* remove value, move selection and children to editor

* add migrating doc

* fix lint

* fix tests

* fix DOM types aliasing

* add next export

* update deps, fix prod build

* fix prod build

* update scripts

* update docs and changelogs

* update workflow and pull request template
2019-11-27 20:54:42 -05:00
Kamil Kamiński
88b7efa975 Change renderNode docs to renderBlock and renderInline (#3083) 2019-11-09 17:59:31 -05:00
Stewart Sum
6fc0bc85e6 Update saving-and-loading-html-content.md (#3064)
Change the name of the first argument of the serialize function from 'object' to 'obj' in the description to match what is used in the code.
2019-11-09 17:56:18 -05:00
Yue
d134f64cd7 Added onMouseUp into available hooks. (#3047) 2019-10-06 09:08:25 -04:00
Sebastian Seilund
7f201f139b Fixed typo in docs: addMarkAt_Ar_ange -> addMarkAt_R_ange (#3033) 2019-10-06 09:03:49 -04:00
Tim Saunders
549359d19e Capitalise references to Mark for consistency (#3031) 2019-10-06 09:03:29 -04:00
往日。
03ee011834 Correct the document mentioned by #3029 (#3035) 2019-09-30 09:25:59 -07:00
Akumatus
3fa6ff17e1 fix broken core-plugin link in doc and add one item to the products list (#3017) 2019-09-21 13:46:21 -04:00
Mitchell Donaldson
58b0f9f1a3 Remove range parameter from getTexts documentation (#3016) 2019-09-21 13:45:50 -04:00
Brent Farese
ca73f2a671 Update range.md (#2996)
It appears that references to point.normalize(document) should be range.normalize(document).
2019-09-08 10:07:24 -07:00
Dragos Bulugean
8d0899fee9 Add Archbee to resources.md (#2994) 2019-09-08 10:04:36 -07:00
Sunny Hirai
7a6cd1ea2d
Improve data model docs (#2992)
* Improve data model docs

* Fix linting
2019-08-30 22:19:57 -07:00
Lionel
1aa1783c9c Update installing-slate.md (#2975)
Just noticed a missing word in this doc, thought I'd add a quick fix.
2019-08-21 22:40:18 -04:00
Devin Morgan
9d9d6067e4 Update glossary.md with definition of match (#2964)
`match` get's used a number of times within the slate/schema.md but it does not appear to be explicitly defined anywhere. This term seems like a great candidate for the Glossary.
2019-08-19 10:20:46 -06:00