You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/fundamentals/core-concepts.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ lists exactly what it produces and accepts.
47
47
48
48
Sanitizing HTML is your responsibility. The library doesn't guarantee safe HTML on mobile, so
49
49
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).
51
51
52
52
:::
53
53
@@ -61,9 +61,9 @@ All supported and canonical tags are listed in [Supported tags](/fundamentals/ht
61
61
62
62
## Two components, one HTML format
63
63
64
-
The library is split into an editor and a viewer:
64
+
The library is split into an editor and a display:
65
65
66
-
-**`EnrichedTextInput`** - the interactive editor from the previous page.
66
+
-**`EnrichedTextInput`** - an interactive editor that emits HTML.
67
67
-**`EnrichedText`** - a read-only display component that renders the input's
68
68
HTML.
69
69
@@ -73,13 +73,13 @@ The HTML format that both components expect is identical, what allows you to int
73
73
74
74
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:
75
75
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
77
77
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
83
83
blockquote. Use it to hint that the toggle is a swap, not an addition.
84
84
85
85
Driving your toolbar from these three flags keeps the UI honest: buttons light
Copy file name to clipboardExpand all lines: docs/docs/fundamentals/html-format-and-supported-tags.md
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,12 +4,10 @@ sidebar_position: 4
4
4
5
5
# HTML format and supported tags
6
6
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.
10
8
11
9
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
13
11
freely, and there are two kinds of restriction:
14
12
15
13
-**Conflicting** - toggling a style that conflicts with an active one replaces
0 commit comments