Skip to content

Commit 448ee56

Browse files
docs: punctuation and general clarification
Co-authored-by: Mikołaj Szydłowski <9szydlowski9@gmail.com>
1 parent a1069d8 commit 448ee56

3 files changed

Lines changed: 13 additions & 15 deletions

File tree

docs/docs/fundamentals/core-concepts.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ lists exactly what it produces and accepts.
4747

4848
Sanitizing HTML is your responsibility. The library doesn't guarantee safe HTML on mobile, so
4949
sanitize anything you persist, render elsewhere, or accept from untrusted
50-
sources. To learn how sanitization is handled on Web, see [Web support](/core-functionalities/web-support)
50+
sources. To learn how sanitization is handled on Web, see [Web support](/core-functionalities/web-support).
5151

5252
:::
5353

@@ -61,9 +61,9 @@ All supported and canonical tags are listed in [Supported tags](/fundamentals/ht
6161

6262
## Two components, one HTML format
6363

64-
The library is split into an editor and a viewer:
64+
The library is split into an editor and a display:
6565

66-
- **`EnrichedTextInput`** - the interactive editor from the previous page.
66+
- **`EnrichedTextInput`** - an interactive editor that emits HTML.
6767
- **`EnrichedText`** - a read-only display component that renders the input's
6868
HTML.
6969

@@ -73,13 +73,13 @@ The HTML format that both components expect is identical, what allows you to int
7373

7474
Not every style can be combined with every other. For example, a paragraph can't be both a heading and a list item, code blocks don't support inline formatting such as bold or italic. The editor tracks this and reports it through `onChangeState`, which gives each style three booleans:
7575

76-
- **`isActive`** - the style is applied at the current selection. Use it to
76+
- **`isActive`** - whether the style is applied at the current selection. Use it to
7777
highlight a toolbar button.
78-
- **`isBlocking`** - another active style forbids this one entirely, so toggling
79-
it would do nothing. For example bold is blocked inside a code block. Use it
80-
to disable a button.
81-
- **`isConflicting`** - this style would replace an active one if toggled on.
82-
For example switching a blockquote paragraph to a heading removes the
78+
- **`isBlocking`** - whether another active style forbids this one entirely, so toggling
79+
it would do nothing. For example, bold is blocked inside a code block. Use it
80+
to disable a toolbar button.
81+
- **`isConflicting`** - whether this style would replace an active one if toggled on.
82+
For example, switching a blockquote paragraph to a heading removes the
8383
blockquote. Use it to hint that the toggle is a swap, not an addition.
8484

8585
Driving your toolbar from these three flags keeps the UI honest: buttons light

docs/docs/fundamentals/html-format-and-supported-tags.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@ sidebar_position: 4
44

55
# HTML format and supported tags
66

7-
The editor works with a fixed set of standard and custom HTML tags - it both
8-
produces them in its output and accepts them as input. This page is the
9-
reference for that set.
7+
The provided components work with a fixed set of standard and custom HTML tags - the editor produces them and they can be used as input to both the editor and the display component. This page is the reference for that set.
108

119
Styles fall into two groups: **inline** tags that wrap a range of characters,
12-
and **paragraph** tags that apply to whole lines. Not all of them combine
10+
and **paragraph** tags that apply to whole paragraphs (**a paragraph might span a few lines!**). Not all of them combine
1311
freely, and there are two kinds of restriction:
1412

1513
- **Conflicting** - toggling a style that conflicts with an active one replaces

docs/docs/fundamentals/your-first-editor.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,15 +184,15 @@ const styles = StyleSheet.create({
184184
});
185185
```
186186

187-
That's the full loop: the button **acts** on the input with `toggleBold`, and
187+
That's the full loop: the button **acts** on the input with `toggleBold` and
188188
the input **reports** the result through `onChangeState`. A real toolbar is just
189189
this repeated for every style.
190190

191191
:::tip
192192

193193
Each `onChangeState` entry carries more than `isActive`. `isBlocking` and
194194
`isConflicting` tell you when a style can't be applied on top of the current
195-
one. [Core concepts](/fundamentals/core-concepts) explains the full state model,
195+
one or conflicts with it. [Core concepts](/fundamentals/core-concepts) explains the full state model,
196196
and [Supported tags](/fundamentals/html-format-and-supported-tags)
197197
lists which styles clash with each other.
198198

0 commit comments

Comments
 (0)