Skip to content

Commit fbbdf0e

Browse files
committed
fix: anchors
1 parent c1712df commit fbbdf0e

1 file changed

Lines changed: 27 additions & 26 deletions

File tree

README.md

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,6 @@
1717
https://github.com/user-attachments/assets/4778d541-d967-47e7-8013-6f7c436bcb95
1818

1919

20-
Built by [Software Mansion](https://swmansion.com/) and sponsored by [Filament](https://filament.dm/).
21-
22-
[<img width="128" height="69" alt="Software Mansion Logo" src="https://github.com/user-attachments/assets/f0e18471-a7aa-4e80-86ac-87686a86fe56" />](https://swmansion.com/)
23-
&nbsp;&nbsp;&nbsp;
24-
<img width="48" height="48" alt="" src="https://github.com/user-attachments/assets/46c6bf1f-2685-497e-b699-d5a94b2582a3" />
25-
&nbsp;&nbsp;&nbsp;
26-
[<img width="80" height="80" alt="Filament Logo" src="https://github.com/user-attachments/assets/4103ab79-da34-4164-aa5f-dcf08815bf65" />](https://filament.dm/)
27-
2820
\
2921
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.
3022
We can help you build your next dream product –
@@ -184,9 +176,9 @@ The links are here, just like in any other editor, a piece of text with a URL at
184176

185177
### Applying links manually
186178

187-
Links can also be added by calling [setLink](#setlink) method on the input ref:
179+
Links can also be added by calling [`setLink`](docs/API_REFERENCE.md#setlink) method on the input ref:
188180

189-
The `start`, `end` and `text` arguments for the method can be easily taken from [onChangeSelection](#onchangeselection) event payload as it returns exact `start` and `end` of the selection and the `text` it spans. This way, you just set the underlying URL to whatever is selected in there.
181+
The `start`, `end` and `text` arguments for the method can be easily taken from [onChangeSelection](docs/API_REFERENCE.md#onchangeselection) event payload as it returns exact `start` and `end` of the selection and the `text` it spans. This way, you just set the underlying URL to whatever is selected in there.
190182

191183
Passing a different `text` than the one in the selection will properly replace it before applying the link.
192184

@@ -198,27 +190,27 @@ Mentions are meant to be a customisable style that lets you put mentioning phras
198190

199191
### Mention Indicators
200192

201-
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.
193+
There is a [mentionIndicators](docs/API_REFERENCE.md#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.
202194

203195
### Starting a mention
204196

205-
There are two ways in which a mention can be started; either by typing one of the `mentionIndicators` set or by calling a [startMention](#startmention) method on the input ref.
197+
There are two ways in which a mention can be started; either by typing one of the `mentionIndicators` set or by calling a [startMention](docs/API_REFERENCE.md#startmention) method on the input ref.
206198

207199
### Mention related events
208200

209201
`react-native-enriched` emits 3 different events that help handling mentions' editing:
210202

211-
- [onStartMention](#onstartmention) is emitted whenever mention is started in one of the ways from the [previous section](#starting-a-mention) or the user has come back (moved selection) to some unfinished mention they have started. It can be used for opening proper tools you use in the app to edit a mention (e.g. a list for choosing from users or channels that the mention will affect).
212-
- [onChangeMention](#onchangemention) is emitted whenever user put or removed some characters after a mention indicator. This way you can react to active mention editing by, for example, filtering users in your displayed list based on the typed text.
213-
- [onEndMention](#onendmention) is emitted whenever user is no longer editing a mention: they might have put a space or changed the cursor position to be no longer near the indicator. You can use it to hide appropriate tools that were used for mention editing.
203+
- [onStartMention](docs/API_REFERENCE.md#onstartmention) is emitted whenever mention is started in one of the ways from the [previous section](#starting-a-mention) or the user has come back (moved selection) to some unfinished mention they have started. It can be used for opening proper tools you use in the app to edit a mention (e.g. a list for choosing from users or channels that the mention will affect).
204+
- [onChangeMention](docs/API_REFERENCE.md#onchangemention) is emitted whenever user put or removed some characters after a mention indicator. This way you can react to active mention editing by, for example, filtering users in your displayed list based on the typed text.
205+
- [onEndMention](docs/API_REFERENCE.md#onendmention) is emitted whenever user is no longer editing a mention: they might have put a space or changed the cursor position to be no longer near the indicator. You can use it to hide appropriate tools that were used for mention editing.
214206

215207
### Setting a mention
216208

217-
Whenever you feel ready with the currently edited mention (so most likely user chooses something from your additional mention editor), you can complete it by calling [setMention](#setmention) ref method.
209+
Whenever you feel ready with the currently edited mention (so most likely user chooses something from your additional mention editor), you can complete it by calling [setMention](docs/API_REFERENCE.md#setmention) ref method.
218210

219211
## Inline images
220212

221-
You can insert an image into the input using [setImage](#setimage) ref method.
213+
You can insert an image into the input using [setImage](docs/API_REFERENCE.md#setimage) ref method.
222214

223215
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.
224216

@@ -227,25 +219,25 @@ The image will be put into a single line in the input and will affect the line's
227219
228220
## Style Detection
229221

230-
All of the above styles can be detected with the use of [onChangeState](#onchangestate) event payload.
222+
All of the above styles can be detected with the use of [onChangeState](docs/API_REFERENCE.md#onchangestate) event payload.
231223

232224
You can find some examples in the [usage section](#usage) or in the example app.
233225

234226
## Other Events
235227

236228
`react-native-enriched` emits a few more events that may be of use:
237229

238-
- [onFocus](#onfocus) - emits whenever input focuses.
239-
- [onBlur](#onblur) - emits whenever input blurs.
240-
- [onChangeText](#onchangetext) - returns the input's text anytime it changes.
241-
- [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).
242-
- [onChangeSelection](#onchangeselection) - returns all the data needed for working with selections (as of now it's mainly useful for [links](#links)).
243-
- [onLinkDetected](#onlinkdetected) - returns link's detailed info whenever user selection is near one.
244-
- [onMentionDetected](#onmentiondetected) - returns mention's detailed info whenever user selection is near one.
230+
- [onFocus](docs/API_REFERENCE.md#onfocus) - emits whenever input focuses.
231+
- [onBlur](docs/API_REFERENCE.md) - emits whenever input blurs.
232+
- [onChangeText](docs/API_REFERENCE.md#onchangetext) - returns the input's text anytime it changes.
233+
- [onChangeHtml](docs/API_REFERENCE.md#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).
234+
- [onChangeSelection](docs/API_REFERENCE.md#onchangeselection) - returns all the data needed for working with selections (as of now it's mainly useful for [links](#links)).
235+
- [onLinkDetected](docs/API_REFERENCE.md#onlinkdetected) - returns link's detailed info whenever user selection is near one.
236+
- [onMentionDetected](docs/API_REFERENCE.md#onmentiondetected) - returns mention's detailed info whenever user selection is near one.
245237

246238
## Customizing \<EnrichedTextInput /> styles
247239

248-
`react-native-enriched` allows customizing styles of the `<EnrichedTextInput />` component. See [htmlStyle](#htmlstyle) prop.
240+
`react-native-enriched` allows customizing styles of the `<EnrichedTextInput />` component. See [htmlStyle](docs/API_REFERENCE.md#htmlstyle) prop.
249241

250242
## API Reference
251243

@@ -266,3 +258,12 @@ See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the
266258
## License
267259

268260
`react-native-enriched` library is licensed under [The MIT License](./LICENSE).
261+
262+
---
263+
Built by [Software Mansion](https://swmansion.com/) and sponsored by [Filament](https://filament.dm/).
264+
265+
[<img width="128" height="69" alt="Software Mansion Logo" src="https://github.com/user-attachments/assets/f0e18471-a7aa-4e80-86ac-87686a86fe56" />](https://swmansion.com/)
266+
&nbsp;&nbsp;&nbsp;
267+
<img width="48" height="48" alt="" src="https://github.com/user-attachments/assets/46c6bf1f-2685-497e-b699-d5a94b2582a3" />
268+
&nbsp;&nbsp;&nbsp;
269+
[<img width="80" height="80" alt="Filament Logo" src="https://github.com/user-attachments/assets/4103ab79-da34-4164-aa5f-dcf08815bf65" />](https://filament.dm/)

0 commit comments

Comments
 (0)