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
@@ -140,6 +141,55 @@ Summary of what happens here:
140
141
-`isBlocking`: Indicates if the style is blocked by another active style (disable the button).
141
142
-`isConflicting`: Indicates if the style is in conflict with another active style.
142
143
144
+
## Supported Tags
145
+
146
+
`react-native-enriched` uses both standard and custom HTML tags in its output and accepts them as input.
147
+
148
+
Not all styles can be combined freely. There are two kinds of restrictions:
149
+
150
+
-**Conflicting** - toggling a style that conflicts with an already active style will automatically remove the active one. For example: toggling `<h2>` on a `<blockquote>` paragraph will remove the blockquote and apply the heading.
151
+
-**Blocking** - a style that is blocked cannot be toggled at all while the blocking style is active. For example: `<b>` is blocked inside `<codeblock>`, so the bold cannot be applied where codeblock is active.
152
+
153
+
These states are reported via the [onChangeState](docs/API_REFERENCE.md#onchangestate) event (`isConflicting` and `isBlocking` properties).
154
+
155
+
### Inline tags
156
+
157
+
| Style | HTML tag | Conflicts with | Blocked by |
> Headings also block bold when `bold: true` is set on the heading style in the [htmlStyle](docs/API_REFERENCE.md#htmlstyle) prop. In that case, the heading itself renders as bold, so toggling bold on top of it is redundant and therefore blocked.
170
+
171
+
### Paragraph tags
172
+
173
+
Some paragraph styles are container elements that wrap each line of text inside them with an **inner content tag**. For example: each line inside `<ul>` is wrapped in `<li>` and each line inside `<codeblock>` is wrapped in `<p>`.
174
+
175
+
Only one paragraph-level style can be active per paragraph - all paragraph styles conflict with each other.
176
+
177
+
| Style | HTML tag | Inner content tag | Conflicts with | Blocked by |
0 commit comments