1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-08 08:16:30 +02:00
Commit Graph

145 Commits

Author SHA1 Message Date
Abner Yang
cd93871ae6 Fix relative url to normalizing-11.md (#5596) 2024-01-27 23:05:04 -07:00
Dylan Schiemann
c4c14882ed Update dependencies to React 18, Node 20, TS 5.2, etc. (#5528)
* incremental upgrade to React 18, TS 4.9, etc.

* update yarn config

* fix build

* minor cleanup in type definitions

* incremental updates for TS 5.0

* fix build

* upgrade to typescript 5.2

* update dependencies

* fix lint issues

* update to latest Playwright version

* update changesets dep

* update emotion/css

* incremental dependency updates

* more small dependency updates

* upgrade prettier and eslint

* fix lint issues

* update dependencies rollup

* fix @types/node resolution to restore linting

* update tiny-invariant dependency

* update dependencies

* update dependencies lerna

* upgrade react-router-dom

* update @types/react and @types/node

* update babel dependencies

* udpate simple-git-hooks

* update @types/node resolution

* update lint-staged

* remove cypress from dependency list

* update @types/node to support Node 20

* update workflows to Node 20

* set resolutions for @types/react

* downgrade @types/react to 18.2.28

* update mocha

* update rimraf

* update @types/js-dom

* remove .lintstagedrc.js

* upgrade next to latest

* v0.61.4

* update lerna

* update faker and rollup

* update immer

* fix yarn clean command

* attempt to fix integration tests

* attempt to stabilize integration tests

* wip fix integration tests

* skip unstable integration test

* Add changeset

---------

Co-authored-by: Dalibor Tosic <dalibortosic00@gmail.com>
Co-authored-by: Nikola <nikolabijelic14@gmail.com>
2023-10-20 08:34:24 -07:00
Ben Dahl
711c2298dd Fix a few typos in the docs (#5463)
* fix: typo in with-react docs

* fix: typo in range docs

* fix: typo in faq docs

* fix: typo in react-editor docs
2023-06-30 00:03:00 -07:00
Dylan Schiemann
25e5eee4af Fix docs typo for unref (#5448) 2023-06-12 18:58:28 -07:00
Ziad Beyens
01f0210bcc Consistent insert* methods (#5415)
* feat: add reviewpad.yml file

* Update reviewpad.yml

*  options to `Editor.insert*`

* 📝 options to `Editor.insert*`

*  getDefaultInsertLocation

*  getDefaultInsertLocation

*  getDefaultInsertLocation

* 📝 consistent selection

* Create tasty-lizards-remain.md

* Update tasty-lizards-remain.md

---------

Co-authored-by: reviewpad[bot] <104832597+reviewpad[bot]@users.noreply.github.com>
Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
2023-05-06 15:41:42 -07:00
Sunny Hirai
f89aca22f6 Improve table of content links inside Operation Types docs 2023-04-12 19:09:56 -07:00
Sunny Hirai
4383127876 Reorganize Operation docs 2023-04-12 19:06:18 -07:00
Sunny Hirai
2ba167eadb Add API reference for Operation types 2023-04-12 18:50:52 -07:00
Sunny Hirai
dd2dfbdfc7 Prefix operation static methods in docs with Operation. 2023-04-12 09:37:38 -07:00
Sunny Hirai
7c2beea54e Update Operation docs to add a table of contents and to fix the heading names 2023-04-12 09:34:31 -07:00
Ziad Beyens
0ac72a626c fix: normalizeNode (#5311)
* fix

* Create large-worms-jog.md

* Update large-worms-jog.md

* Update large-worms-jog.md

* Update large-worms-jog.md

* fix
2023-02-23 16:10:08 -07:00
Ziad Beyens
84f811a79c More control on editor.normalizeNode (#5295)
* feat

* fix

* Create two-books-bow.md

* docs

* feat

* fix
2023-02-22 04:54:35 -07:00
Sim Ho
55effa953c Update Operation API documentation (#5239)
* fix typo in implementation

* doc based on implementation

* fix doc typo
2022-12-29 16:38:03 -07:00
Emmanuel Meric de Bellefon
66fbc0a5b9 Update range-ref.md (#5200) 2022-11-21 09:44:24 +00:00
Brian Bucknam
fbc9838fd7 Add hanging option to unsetNodes (#5189)
Since this really just calls setNodes, it seems like it should offer the same options.
Without this change, doing something like applying a mark to the contents of a selected block with `hanging` works one way, while trying to do the reverse (remove the mark) cannot include the "hang".
2022-11-17 10:19:01 -07:00
Brian Bucknam
346f6572fc Allow void elements to receive marks (#5135)
Some void elements are effectively stand-ins for text, such as with the mentions example,
where the mention element renders the character's name. Users might want to format Void
elements like this with bold, or set their font and size, so `editor.markableVoid` tells
Slate whether or not to apply Marks to the text children of void elements.

- Adds `markableVoid()` as a schema-specific overrideable test.
- Changes `addMark` and `removeMark` so marks can apply to voids. Also changes behavior
of collapsed selection so that if a markable Void is selected, the mark will be applied /
removed.
- Shows how `markableVoid()` can work in the mentions example
2022-11-08 05:38:15 -07:00
Doug Reeder
469bec3d04 Adds an example using SlateNode.common() with the editor selection (#5176) 2022-11-01 05:13:15 -07:00
Brian Bucknam
2f8f6913e4 Simplify / clarify wording (#5170)
Slight improvement to editor documentation
2022-10-26 16:33:33 -07:00
魔王卷子
588a808b2f Update transforms.md (#5030) 2022-06-26 20:51:02 +01:00
Alexander Campbell
fe13a8f9e7 implement scrubber for end user data in exceptions (#4999) 2022-05-26 14:44:22 -07:00
Haakon Borch
f5ccab241c update docs on Node.ancestors/levels and Path.ancestors (#4987) 2022-05-17 16:23:47 -07:00
Horacio Herrera
0e598ab229 feat(docs): add missing Element methods (#4943) 2022-04-13 10:56:59 -07:00
Sunny Hirai
bb4f1934c9 Moved documentation for refs in the Editor into its own section 2022-04-10 15:35:48 -07:00
Sunny Hirai
daa68dab89 Add descriptions of affinity to PathRef, PointRef and RangeRef documentation 2022-04-10 15:31:43 -07:00
Sunny Hirai
e7aa292323 Fixed several broken and missing links in the Location Types API Reference 2022-04-10 15:09:43 -07:00
Doug Reeder
2b94e17874 Documents how to implement a Void Element. (#4924)
* Documents how to implement a Void Element.

* Tightens up phrasing
2022-04-03 16:34:33 -07:00
Bryan Haakman
20acca4bc8 Add soft break as a separate overridable editor method (#4873)
add changeset
2022-03-20 04:30:08 -07:00
Jim Fisher
465cf777cd Define "hanging range" and intended behavior of unhangRange (#4852)
There is currently no definition of this in the docs, so it's very hard
to understand what this function is supposed to do, and whether it's
buggy. I've written this definition based on Ian Taylor's messages on
Slack [1]:

    Jason: Why does unhangRange only unhang the end of a range and not
    the start as well? Trying to tell if this is a bug or some logic I'm
    not following. If the start of the range is at the last index of a
    text shouldn't unhangRange advance that to the next node?

    ianstormtaylor: I don’t believe it’s a bug. It was designed to
    handle ranges that result from triple-clicks. Not that there might
    not be improvements, or that there might not be some other better
    way to solve for triple-clicks, or that there might be a better
    name for it

    Jason: When you say triple-click handling you mean the fact that
    the browser selection by default gets placed from start of line to
    start of next line? In that cause yes the end of the selection is
    where the problem is. If looked at as a more generic implementation
    it seems like unhanging the start in cases where you have
    {text: 'foo|'}, {text: 'bar|', bold: true} and it makes sense to
    normalize the selection to {text: 'foo'},
    {text: '|bar|', bold: true} which helps in some cases by avoiding
    splits that immediately get merged back, etc.

    ianstormtaylor: Yup, that’s exactly right. It was created for the
    triple-click case. I agree that something to handle the
    start-edged cases would be nice too. But folks in GitHub
    discussions have been kind of assuming that the code meant to be
    written for both, and that it’s a bug to fix, which isn’t true.
    I’m not sure if there are gotchas to expanding the scope to
    handle both edges

[1]: https://slate-js.slack.com/archives/CC58ZGGU9/p1632188507024300
2022-02-23 13:13:09 -07:00
Doug Reeder
c90ec8e837 Adds documentation for PathRef (#4740) 2021-12-22 05:04:14 -07:00
Doug Reeder
228cee56a1 Clarifies when to use Editor.insertNode vs. Transforms.insertNodes (#4731) 2021-12-18 07:05:10 -07:00
Doug Reeder
5d3eccf262 Documents use of Editor.withoutNormalizing in conjunction with normalization (#4737) 2021-12-16 22:15:22 -07:00
Doug Reeder
e04671ffe8 Clarifies docs for RangeRef & PointRef; fixes TOC for Editor API (#4724) 2021-12-10 05:53:37 -07:00
Doug Reeder
7d9d25e179 Adds clarification & examples to demystify Transforms. (#4653)
* Adds clarification & examples to demystify Transforms.

* Fleshes out documentation of NodeOptions for Transforms

* Update docs/concepts/04-transforms.md

Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>

* Uses 'API' in the title of all API documents

Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
2021-11-16 02:20:43 -07:00
Jim Fisher
08f67d9cbc Fix typo (#4598) 2021-10-13 15:46:53 -07:00
Doug Reeder
8b85aeb205 Adds an example to the docs for Transforms.select (#4507) 2021-09-10 17:49:13 -07:00
Dylan Schiemann
4d133e02fc Fix broken plugins link in Editor documentation (#4335) 2021-08-04 21:59:10 -07:00
Sunny Hirai
354b0092ee docs: Fix links in Span API docs 2021-07-26 23:40:17 -07:00
Sunny Hirai
06a376d727 docs: add Span to documentation 2021-07-26 23:37:14 -07:00
Sunny Hirai
03e8230196 docs: Improve documentation around Editor.before and Editor.after 2021-07-08 13:12:11 -07:00
Sunny Hirai
7d14bef63b docs: Improve documentation for Editor.previous and Editor.next 2021-07-08 13:06:41 -07:00
Sunny Hirai
26f4b2521c docs: Clarified that Editor.positions in reverse with a word changes the returned positions 2021-06-07 08:59:27 -07:00
Sunny Hirai
06121a3d82 docs: Fix typo 2021-06-06 22:57:30 -07:00
Sunny Hirai
c86d0b040b docs: Improve styling and wording in Editor.positions 2021-06-06 22:52:20 -07:00
Sunny Hirai
1f08442ab2 docs: Add detailed description of how Editor.positions works 2021-06-06 22:42:32 -07:00
Sunny Hirai
1e6f60aa6d docs: Try options syntax with defaults 2021-06-06 19:42:19 -07:00
Sunny Hirai
665b6c81ab docs: Experiment with alternate Options syntax for documentation 2021-06-06 18:04:18 -07:00
Sunny Hirai
614260f771 docs: Experiment with using ts for showing API signature 2021-06-06 17:53:21 -07:00
Sunny Hirai
e2ae33043a docs: Experiment with alternate options documentation format 2021-06-06 17:50:49 -07:00
Sunny Hirai
3baf1301bc docs: Add docs for Text.isTextList 2021-06-06 17:33:02 -07:00
Sunny Hirai
3156bd0b94 docs: Describe Text.matches in detail and describe 'loose' option in Text.equals 2021-06-06 17:27:01 -07:00