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: README.md
+79-79Lines changed: 79 additions & 79 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -164,7 +164,7 @@ If the selection spans more than one paragraph, logically more of them will be a
164
164
165
165
## Links
166
166
167
-
The links are here, just like in any other editor, a piece of text with a URL attribtued to it. They can be added in two ways: automatically or manually.
167
+
The links are here, just like in any other editor, a piece of text with a URL attributed to it. They can be added in two ways: automatically or manually.
168
168
169
169
### Automatic links detection
170
170
@@ -224,7 +224,7 @@ You can find some examples in the [usage section](#usage) or in the example app.
224
224
`react-native-enriched` emits a few more events that may be of use:
-[onChangeText](#onchangetext) - returns the input's text anytime it changes.
229
229
-[onChangeHtml](#onchangehtml) - returns HTML string parsed from current input text and styles anytime it would change. As parsing the HTML on each input change is a pretty expensive operation, not assigning the event's callback will speed up iOS input a bit. We are considering adding some API to improve it, see [future plans](#future-plans).
230
230
-[onChangeSelection](#onchangeselection) - returns all the data needed for working with selections (as of now it's mainly useful for [links](#links)).
@@ -243,9 +243,9 @@ You can find some examples in the [usage section](#usage) or in the example app.
243
243
244
244
If `true`, focuses the input.
245
245
246
-
| Type | Default Value | Platform |
247
-
|----|-------------|--------|
248
-
|`bool`|`false`| Both |
246
+
| Type | Default Value | Platform |
247
+
|--------|---------------|----------|
248
+
|`bool`|`false`| Both|
249
249
250
250
#### `autoCapitalize`
251
251
@@ -256,57 +256,57 @@ Tells input to automatically capitalize certain characters.
256
256
-`sentences`: first letter of each sentence.
257
257
-`none`: don't auto capitalize anything.
258
258
259
-
| Type | Default Value | Platform |
260
-
|----|-------------|--------|
261
-
|`'none' \| 'sentences' \| 'words' \| 'characters'`|`'sentences'`| Both |
|[`color`](https://reactnative.dev/docs/colors)| system default | Android |
270
270
271
271
#### `defaultValue`
272
272
273
273
Provides an initial value for the input. If the string is a valid HTML output of the `EnrichedTextInput` component (or other HTML that the parser will accept), proper styles will be applied.
274
274
275
-
| Type | Default Value | Platform |
276
-
|----|-------------|--------|
277
-
|`string`| - | Both |
275
+
| Type | Default Value | Platform |
276
+
|----------|---------------|----------|
277
+
|`string`| - | Both|
278
278
279
279
#### `editable`
280
280
281
281
If `false`, text is not editable.
282
282
283
-
| Type | Default Value | Platform |
284
-
|----|-------------|--------|
285
-
|`bool`|`true`| Both |
283
+
| Type | Default Value | Platform |
284
+
|--------|---------------|----------|
285
+
|`bool`|`true`| Both|
286
286
287
287
#### `htmlStyle`
288
288
289
289
A prop for customizing styles' appearances.
290
290
291
-
| Type | Default Value | Platform |
292
-
|----|-------------|--------|
293
-
|[`HtmlStyle`](#htmlstyle-type)| default values from [`HtmlStyle`](#htmlstyle-type)| Both |
Callback that is called when the user no longer edits a mention actively - has moved the cursor somewhere else or put a space and the cursor isn't within the edited mention.
422
422
423
423
-`indicator` is the indicator of the mention that was being edited.
@@ -546,9 +546,9 @@ The input inherits [ViewProps](https://reactnative.dev/docs/view#props), but kee
546
546
547
547
If true, Android will use experimental synchronous events. This will prevent from input flickering when updating component size. However, this is an experimental feature, which has not been thoroughly tested. We may decide to enable it by default in a future release.
548
548
549
-
| Type | Default Value | Platform |
550
-
|----|-------------|--------|
551
-
|`bool`|`false`| Android |
549
+
| Type | Default Value | Platform |
550
+
|--------|---------------|----------|
551
+
|`bool`|`false`| Android|
552
552
553
553
### Ref Methods
554
554
@@ -615,7 +615,7 @@ Sets the currently edited mention with a given indicator, displayed text and cus
615
615
616
616
-`indicator: string` - the indicator of the set mention.
617
617
-`text: string` - the text that should be displayed for the mention. Anything the user typed gets replaced by that text. The mention indicator isn't added to that text.
618
-
-`attributes?: Record<string, string>` - additional, custom attribtues for the mention that can be passed as a typescript record. They are properly preserved through parsing from and to the HTML format.
618
+
-`attributes?: Record<string, string>` - additional, custom attributes for the mention that can be passed as a typescript record. They are properly preserved through parsing from and to the HTML format.
619
619
620
620
#### `.setValue()`
621
621
@@ -837,7 +837,7 @@ If only a single config is given, the style applies to all mention types. You ca
837
837
838
838
#### img (inline image)
839
839
840
-
-`width` is the width of the inline image, deafults to `80`.
840
+
-`width` is the width of the inline image, defaults to `80`.
841
841
-`height` is the height of the inline image, defaults to `80`.
842
842
843
843
#### ol (ordered list)
@@ -856,12 +856,12 @@ By bullet we mean the dot that begins each line of the list.
856
856
-`bulletColor` defines the color of the bullet, takes [color](https://reactnative.dev/docs/colors) value and defaults to `black`.
857
857
-`bulletSize` sets both the height and the width of the bullet, defaults to `8`.
858
858
-`marginLeft` is the margin to the left of the bullet (between the bullet and input's left edge), defaults to `16`.
859
-
-`gapWidth` sets the gap between the bullet and the list item's text, deafults to `16`.
859
+
-`gapWidth` sets the gap between the bullet and the list item's text, defaults to `16`.
860
860
861
861
## Future Plans
862
862
863
863
- Adding Codeblocks and Inline Images to iOS input.
864
-
- Making some optimalizations around `onChangeHtml` event, maybe some imperative API to get the HTML output.
864
+
- Making some optimizations around `onChangeHtml` event, maybe some imperative API to get the HTML output.
865
865
- Creating `EnrichedText` text component that supports our HTML output format with all additional interactions like pressing links or mentions.
866
866
- Adding API for custom link detection regex.
867
867
- Web library implementation via `react-native-web`.
0 commit comments