Skip to content

Commit 46c6275

Browse files
committed
Merge branch 'main' into feat/android-html-support
2 parents 4a0ed95 + 1aab144 commit 46c6275

76 files changed

Lines changed: 8333 additions & 2215 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/android-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
matrix:
4444
arch: [new, old]
4545
steps:
46-
- uses: actions/checkout@v5
46+
- uses: actions/checkout@v6
4747
- uses: oven-sh/setup-bun@v2
4848

4949
- name: Install dependencies (bun)

.github/workflows/ios-build.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
matrix:
5555
arch: [new, old]
5656
steps:
57-
- uses: actions/checkout@v5
57+
- uses: actions/checkout@v6
5858
- uses: oven-sh/setup-bun@v2
5959
- name: Setup Xcode
6060
uses: maxim-lobanov/setup-xcode@v1
@@ -78,15 +78,13 @@ jobs:
7878
- name: Install xcpretty
7979
run: gem install xcpretty
8080

81-
- name: Cache CocoaPods
82-
uses: actions/cache@v4
83-
with:
84-
path: |
85-
~/.cocoapods/repos
86-
example/ios/Pods
87-
key: ${{ runner.os }}-pods-${{ hashFiles('example/ios/Podfile.lock') }}
88-
restore-keys: |
89-
${{ runner.os }}-pods-
81+
# - name: Cache CocoaPods
82+
# uses: actions/cache@v4
83+
# with:
84+
# path: example/ios/Pods
85+
# key: ${{ runner.os }}-pods-${{ hashFiles('example/ios/Podfile') }}
86+
# restore-keys: |
87+
# ${{ runner.os }}-pods-
9088

9189
- name: Install Pods
9290
working-directory: example/ios

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
id-token: write
2222
steps:
2323
- name: Checkout
24-
uses: actions/checkout@v5
24+
uses: actions/checkout@v6
2525
with:
2626
fetch-depth: 0
2727
- name: Setup Bun.js

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
## [1.1.0](https://github.com/patrickkabwe/react-native-nitro-text/compare/v1.0.3...v1.1.0) (2025-11-15)
2+
3+
### ✨ Features
4+
5+
* **ios:** support custom selection menus ([#92](https://github.com/patrickkabwe/react-native-nitro-text/issues/92)) ([f88aee7](https://github.com/patrickkabwe/react-native-nitro-text/commit/f88aee7204001117cbe664cf1697b278ef383172))
6+
7+
### 🐛 Bug Fixes
8+
9+
* **ios:** dismiss selection when tapping outside textview ([#70](https://github.com/patrickkabwe/react-native-nitro-text/issues/70)) ([f6eddb2](https://github.com/patrickkabwe/react-native-nitro-text/commit/f6eddb27a407c61f993d329adffdcecec092acd3))
10+
11+
### 📚 Documentation
12+
13+
* add CONTRIBUTING.md and issue templates for better community engagement ([#48](https://github.com/patrickkabwe/react-native-nitro-text/issues/48)) ([a213abe](https://github.com/patrickkabwe/react-native-nitro-text/commit/a213abe3ada2213f116475d4b72b4d4a0acbc797))
14+
15+
### 🛠️ Other changes
16+
17+
* code linting formating ([#101](https://github.com/patrickkabwe/react-native-nitro-text/issues/101)) ([e49a5d3](https://github.com/patrickkabwe/react-native-nitro-text/commit/e49a5d39d514459a20072d4d54cfb5d66d52267c))
18+
* prepare android support ([#102](https://github.com/patrickkabwe/react-native-nitro-text/issues/102)) ([7a2c2bd](https://github.com/patrickkabwe/react-native-nitro-text/commit/7a2c2bde0084bc7c93f60e0007655213f6289252))
19+
120
## [1.0.3](https://github.com/patrickkabwe/react-native-nitro-text/compare/v1.0.2...v1.0.3) (2025-09-22)
221

322
### 🛠️ Other changes

README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ https://github.com/user-attachments/assets/57f56b3f-3988-4235-af83-a5f2cfd82121
1616
<div align="center">
1717

1818
[![npm version](https://img.shields.io/npm/v/react-native-nitro-text?style=for-the-badge)](https://www.npmjs.org/package/react-native-nitro-text)
19+
[![Discord](https://img.shields.io/badge/Discord-Join%20Server-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/7KXUyHjz)
1920
[![npm downloads](https://img.shields.io/npm/dt/react-native-nitro-text.svg?style=for-the-badge)](https://www.npmjs.org/package/react-native-nitro-text)
2021
[![npm downloads](https://img.shields.io/npm/dm/react-native-nitro-text.svg?style=for-the-badge)](https://www.npmjs.org/package/react-native-nitro-text)
2122
[![mit licence](https://img.shields.io/dub/l/vibe-d.svg?style=for-the-badge)](https://github.com/patrickkabwe/react-native-nitro-text/blob/main/LICENSE)
@@ -83,6 +84,61 @@ export function SelectionExample() {
8384
}
8485
```
8586

87+
## HTML rendering
88+
89+
NitroText can parse HTML string children and inline CSS when you pass `renderer="html"`.
90+
91+
```tsx
92+
import { NitroText } from 'react-native-nitro-text'
93+
94+
export function HtmlExample() {
95+
const html = `
96+
<div>
97+
<h2>Renderer demo</h2>
98+
<p>This text comes from <strong>HTML</strong> with <em>semantic</em> tags.</p>
99+
<p><span style="color: #ff6347; font-weight: bold;">Inline CSS works too.</span></p>
100+
</div>
101+
`
102+
103+
return <NitroText renderer="html">{html}</NitroText>
104+
}
105+
```
106+
107+
## Custom selection menu
108+
109+
NitroText supports custom menu items that appear when text is selected. Pass a `menus` prop with an array of menu items, each containing a `title` and `action` callback.
110+
111+
```tsx
112+
import { NitroText } from 'react-native-nitro-text'
113+
import { useMemo } from 'react'
114+
115+
export function MenuExample() {
116+
const menus = useMemo(
117+
() => [
118+
{
119+
title: 'Copy',
120+
action: () => console.log('Copy action')
121+
},
122+
{
123+
title: 'Share',
124+
action: () => console.log('Share action')
125+
},
126+
{
127+
title: 'Translate',
128+
action: () => console.log('Translate action')
129+
},
130+
],
131+
[]
132+
)
133+
134+
return (
135+
<NitroText selectable menus={menus} style={{ fontSize: 16 }}>
136+
Select this text to see custom menu options appear in the selection menu.
137+
</NitroText>
138+
)
139+
}
140+
```
141+
86142
## Platform Support
87143

88144
- iOS
@@ -105,3 +161,5 @@ Bootstrapped with [create-nitro-module](https://github.com/patrickkabwe/create-n
105161
## Contributing
106162

107163
PRs welcome! Please open an issue first for major changes.
164+
165+
> 💬 For quick support, join our [Discord channel](https://discord.gg/7KXUyHjz)

0 commit comments

Comments
 (0)