
Product
Socket Now Supports pylock.toml Files
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
@jurishandapp/react-native-selectable-text
Advanced tools
Utilizado na seleção de texto
This project came up to try to get around the lack of libraries related to text selection in React Native. If you support the project, feel free to interact and help improve the library.
Now available for IOS
npm install @jurishandapp/react-native-selectable-text --save
yarn add @jurishandapp/react-native-selectable-text
If the project has an error, run the following command
react-native link @jurishandapp/react-native-selectable-text
android/app/src/main/java/[...]/MainApplication.java
import com.reactnativeselectabletext.SelectableTextPackage;
to the imports at the top of the fileandroid/settings.gradle
:
include ':@jurishandapp_react-native-selectable-text'
project(':@jurishandapp_react-native-selectable-text').projectDir = new File(rootProject.projectDir,
'../node_modules/@jurishandapp/react-native-selectable-text/android')
Libraries
➜ Add Files to [your project's name]
node_modules
➜ @jurishandapp/react-native-selectable-text
and add RNSelectableText.xcodeproj
libRNSelectableText.a
to your project's Build Phases
➜ Link Binary With Libraries
Cmd+R
)<pod 'RNSelectableText', :path => '../node_modules/@jurishandapp/react-native-selectable-text/ios/RNSelectableText.podspec'
to your projects podfilepod install
import { SelectableText } from "@jurishandapp/react-native-selectable-text";
// Use normally, it is a drop-in replacement for react-native/Text
<SelectableText
menuItems={["Custom 1", "Custom 1"]}
/*
Called when the user taps in a item of the selection menu:
- eventType: (string) is the label
- content: (string) the selected text portion
- selectionStart: (int) is the start position of the selected text
- selectionEnd: (int) is the end position of the selected text
*/
onSelection={({ eventType, content, selectionStart, selectionEnd }) => {}}
value="Text example"
/>;
name | description | type | default |
---|---|---|---|
value | text content | string | "" |
onSelection | Called when the user taps in a item of the selection menu | ({ eventType: string, content: string, selectionStart: int, selectionEnd: int }) => void | () => {} |
onCreateSelection | Called when user initiates selection | ({ content: string, selectionStart: int, selectionEnd: int }) => void | () => {} |
onChangeSelection | Called when user moves selection | ({ content: string, selectionStart: int, selectionEnd: int }) => void | () => {} |
onDestroySelection | Called when the selection is closed | ({ content: string, selectionStart: int, selectionEnd: int }) => void | () => {} |
menuItems | context menu items | array(string) | [] |
style | additional styles to be applied to text | Object | null |
highlights | array of text ranges that should be highlighted with an optional id | array({ id: string, start: int, end: int }) | [] |
highlightColor | highlight color | string | null |
onHighlightPress | called when the user taps the highlight | (id: string) => void | () => {} |
enabledContextMenu | enable context menu | boolean | true |
appendToChildren | element to be added in the last line of text | ReactNode | null |
TextComponent | Text component used to render value | ReactNode | |
textValueProp | text value prop for TextComponent. Should be used when passing TextComponent. Defaults to 'children' which works for | string | 'children' |
textComponentProps | additional props to pass to TextComponent | object | null |
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
FAQs
Utilizado na seleção de texto
The npm package @jurishandapp/react-native-selectable-text receives a total of 0 weekly downloads. As such, @jurishandapp/react-native-selectable-text popularity was classified as not popular.
We found that @jurishandapp/react-native-selectable-text demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
Research
Security News
Malicious Ruby gems typosquat Fastlane plugins to steal Telegram bot tokens, messages, and files, exploiting demand after Vietnam’s Telegram ban.