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

54 Commits

Author SHA1 Message Date
Jack Hanford
5ba551ad48
Update 10-normalizing.md (#3721)
Add `Transforms` to slate import so code runs when copy/pasted 😃
2020-06-04 18:36:30 -07:00
Kevin Simons
3c80c3e88b
Fix a few issues with the documentation (#3679)
* Fix a few issues with the documentation

* Add Kitemaker to the list of sites using Slate
2020-05-13 08:56:24 -07:00
CameronAckermanSEL
d82ffe49a5 Revert "Revert "TypeScript Improvement: Use [key: string]: unknown, not [key: string]: any (#3565)""
This reverts commit 81d2f9bb8f6a78590d7868deb289ec36fb208629.
2020-05-04 17:38:14 -07:00
CameronAckermanSEL
81d2f9bb8f Revert "TypeScript Improvement: Use [key: string]: unknown, not [key: string]: any (#3565)"
This reverts commit d8adf51add861c81b51e969de704d93a51a8990f.
2020-05-04 17:33:39 -07:00
Tim Buckley
d8adf51add
TypeScript Improvement: Use [key: string]: unknown, not [key: string]: any (#3566)
* Change all [key:string]:any -> unknown

Skipping slate-hyperscript, since it seems to be an appropriate use of key: any

* Minor typo fix docs/api/locations

* Check/assert unknown attributes when needed
2020-05-04 17:16:03 -04:00
Jolene Langlinais
970c2aac13
docs(concepts): include normalizing inline default behavior (#3637)
Signed-off-by: irmerk <jolenelanglinais@gmail.com>
2020-04-24 08:28:21 -07:00
Kirk Swenson
f6bfe034d7
Fix typos and other minor issues in docs (#3597)
Fixed typos and grammatical errors in the documentation
2020-04-10 09:05:03 -07:00
Charanjit Singh
f86f5ca065
Fix Typo (#3545)
Typo fix in documentation
2020-03-11 08:11:42 -07:00
琚致远
2d901f6520
Update 08-rendering.md (#3520) 2020-02-27 14:49:29 -08:00
Lucas Willems
c5249c745c
Update 06-editor.md (#3511) 2020-02-21 09:14:47 -08:00
Björn Theart
c4eb7b37bc
Update 06-editor.md (#3510) 2020-02-21 08:22:28 -08:00
Jonathan Wieben
612dbcb3a6 Chore: Typo in docs (#3411)
* Fix: Typo in docs

It should read edit instead of editor.

* Chore: Further typo fix
2020-01-27 15:22:36 -05:00
Ian Storm Taylor
dae32cd473 update docs for removal of commands 2019-12-19 14:34:34 -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
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
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
124ff37c3a update docs 2019-12-05 12:52:52 -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
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
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
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
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
Ian Storm Taylor
c22839c6eb add data model guide, update docs 2017-10-25 20:13:52 -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
68e4e090f0 update docs 2017-10-17 20:30:11 -07:00
Ian Storm Taylor
6c42f6c9c3 Rename Range to Leaf, and Selection to Range (#1231)
* rename Range to Leaf

* rename Selection to Range

* add findDOMRange, findNode, findRange helpers

* refactor to remove findDropPoint util

* revert findDOMNode to throwing errors

* export new helpers, fix linter

* update docs

* update examples
2017-10-14 15:36:27 -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
Ian Storm Taylor
560dbe5038 fix docs links, closes #1116 2017-09-12 08:55:15 -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
Jonas Keinholz
9d3677ee8b fix wrong link in docs 2016-12-01 14:35:27 +01:00
Ian Storm Taylor
cf0010728f add resources to docs 2016-11-18 12:11:59 -08:00
Max Gfeller
615d4d0d93 Tiny typo fix (#115) 2016-07-18 11:57:16 -07:00
Ian Storm Taylor
04dee735f5 fix install slate example 2016-07-17 14:03:18 -07:00
Ian Storm Taylor
348c3dec20 add faq to concepts list 2016-07-17 13:39:43 -07:00
Ian Storm Taylor
2322328e2e add faq 2016-07-17 13:39:30 -07:00
Andrew Murray
a42996f53d Fixed typos (#90) 2016-07-15 08:35:18 -07:00
Ian Storm Taylor
351c05785e update docsg 2016-07-13 17:04:23 -07:00
Ian Storm Taylor
b19026647a update document model concept docs 2016-07-13 16:34:44 -07:00
Ian Storm Taylor
1415b54b44 update leaf text nodes concept 2016-07-13 16:33:09 -07:00
Ian Storm Taylor
677ac96f4f update docs 2016-07-12 22:26:57 -07:00