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
Since 2012 [Software Mansion](https://swmansion.com) is a software agency with experience in building web and mobile apps. We are Core React Native Contributors and experts in dealing with all kinds of React Native issues.
25
+
Since 2012 [Software Mansion](https://swmansion.com) is a software agency with experience in building web and mobile apps. We are Core React Native Contributors and experts in dealing with all kinds of React Native issues.
1. Any methods imperatively called on the input to e.g. toggle some style must be used through a `ref` of `EnrichedTextInputInstance` type. Here, `toggleBold` method that is called on the button press calls `ref.current?.toggleBold()`, which toggles the bold styling within the current selection.
142
-
2. All the active styles info is emitted by `onChangeState` event. Set up a proper callback that accepts a `NativeSyntheticEvent<OnChangeStateEvent>` argument and you can access an object with boolean properties indicating which styles are active, such as `isBold` in the example. Here, this info is stored in a react state and used to change colors on the button.
142
+
2. All the active styles info is emitted by `onChangeState` event. Set up a proper callback that accepts a `NativeSyntheticEvent<OnChangeStateEvent>` argument, and you can access an object with boolean properties indicating which styles are active, such as `isBold` in the example. Here, this info is stored in a React state and used to change colors on the button.
143
143
144
144
## Non Parametrized Styles
145
145
146
146
Supported styles:
147
147
148
-
-**bold**
149
-
-*italic*
150
-
-<ins>underline</ins>
151
-
-~~strikethrough~~
152
-
-`inline code`
148
+
- bold
149
+
- italic
150
+
- underline
151
+
- strikethrough
152
+
- inline code
153
153
- H1 heading
154
154
- H2 heading
155
155
- H3 heading
156
-
-`codeblock`
157
-
-> blockquote
156
+
- codeblock
157
+
- blockquote
158
158
- ordered list
159
159
- unordered list
160
160
161
161
> [!NOTE]
162
-
> The iOS doesn't support codeblocks just yet but it's planned in the near future!
162
+
> The iOS doesn't support codeblocks just yet, but it's planned in the near future!
163
163
164
164
Each of the styles can be toggled the same way as in the example from [usage section](#usage); call a proper `toggle` function on the component ref.
165
165
@@ -176,7 +176,7 @@ The links are here, just like in any other editor, a piece of text with a URL at
176
176
177
177
### Automatic links detection
178
178
179
-
`react-native-enriched` automatically detects words that appear to be some URLs and makes them links. Currently we are using pretty naive approach to detect whether text can be treated as a link or not. On iOS it's a pretty simple regex, on Android we are using URL regex provided by the system.
179
+
`react-native-enriched` automatically detects words that appear to be some URLs and makes them links. Currently, we are using pretty naive approach to detect whether text can be treated as a link or not. On iOS it's a pretty simple regex, on Android we are using URL regex provided by the system.
180
180
181
181
### Applying links manually
182
182
@@ -194,7 +194,7 @@ Mentions are meant to be a customisable style that lets you put mentioning phras
194
194
195
195
### Mention Indicators
196
196
197
-
There is a [mentionIndicators](#mentionindicators) prop that lets you define what characters can start a mention. By default it is set to `[ @ ]`, meaning that typing a `@` character in the input will start the creation of a mention.
197
+
There is a [mentionIndicators](#mentionindicators) prop that lets you define what characters can start a mention. By default, it is set to `[ @ ]`, meaning that typing a `@` character in the input will start the creation of a mention.
198
198
199
199
### Starting a mention
200
200
@@ -216,10 +216,10 @@ Whenever you feel ready with the currently edited mention (so most likely user c
216
216
217
217
You can insert an image into the input using [setImage](#setimage) ref method.
218
218
219
-
The image will be put into a single line in the input and will affects the line's height as well as input's height. Keep in mind, that image will replace currently selected text or insert into the cursor position if there is no text selection.
219
+
The image will be put into a single line in the input and will affect the line's height as well as input's height. Keep in mind, that image will replace currently selected text or insert into the cursor position if there is no text selection.
220
220
221
221
> [!NOTE]
222
-
> The iOS doesn't support inline images just yet but it's planned in the near future!
222
+
> The iOS doesn't support inline images just yet, but it's planned in the near future!
223
223
224
224
## Style Detection
225
225
@@ -294,7 +294,7 @@ If `false`, text is not editable.
-`fontSize` is the size of the heading's font, defaults to `32`/`24`/`20` for h1/h2/h3.
813
813
-`bold` defines whether the heading should be bolded, defaults to `false`.
814
814
815
+
> [!NOTE]
816
+
> On iOS, the headings cannot have same `fontSize` as the component's `fontSize`. Doing so results in unexpected behavior.
817
+
815
818
#### blockquote
816
819
817
820
-`borderColor` defines the color of the rectangular border drawn to the left of blockquote text. Takes [color](https://reactnative.dev/docs/colors) value, defaults to `darkgray`.
0 commit comments