npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-lite-text-editor

v0.1.0

Published

A configurable, embeddable rich text editor component for React Native.

Downloads

9

Readme

React Native Lite Text Editor

npm version Static Badge

A lightweight, embeddable rich text editor for React Native built on a WebView.

Installation

npm install react-native-lite-text-editor
# or
yarn add react-native-lite-text-editor

Requires react-native-webview as a peer dependency

Usage

import { TextEditor, Toolbar } from 'react-native-lite-text-editor';

export default function App() {
  const editorRef = useRef(null);
  const [data, setData] = useState(null);

  return (
    <>
      <TextEditor
        ref={editorRef}
        onSelectionChange={(e) => setData(e.nativeEvent.data)}
      />

      <Toolbar
        horizontal
        editorRef={editorRef}
        data={data}
        config={toolbarConfig}
      />
    </>
  );
}

For a complete example, see example/src/App.tsx

API Overview

TextEditor Props (extends WebViewProps)

| Prop | Type | Default | Description | Notes | |---|---:|---:|---|---| | autoCapitalize | 'none' | 'sentences' | 'words' | 'characters' | none | Controls automatic capitalization for typed text. | Passed through to input handling inside the WebView. | | autoCorrect | 'on' \| 'off' | 'off' | Enables or disables platform autocorrect suggestions. | Affects virtual keyboard behavior. | | autoFocus | 'start' \| 'end' | - | Focuses editor on mount and places caret at start or end. | Useful for immediate editing flows. | | contentEditable | boolean | true | Toggles whether the editor is editable or read-only. | | | autoSelect | boolean | false | Selects all commands info when the editor loaded. | | | delayLongPress | number (ms) | 500 | Milliseconds before onLongPress fires. | | | enterKeyHint | 'done' \| 'go' \| 'next' \| 'search' \| 'send' | - | Suggests return key action to the virtual keyboard. | | | placeholder | string | '' | Shown when content is empty. | Style via styles / defaultStyles. | | content | string (HTML) | '' | Initial HTML content loaded into the editor. | | | commands | DocumentCommandId[] | [] | Enables built-in document commands (bold, list, link, etc.). | Toolbar use these ids. All commands are enabled, if omitted | | extraCommands | string[] | [] | Register custom commands. | Should implements DocumentCommand interface | | styles | string (CSS) | '' | CSS injected after defaultStyles to override appearance. | Use to match app typography and spacing. | | defaultStyles | string (CSS) | '' | Base CSS applied before styles. | Override with styles. | | onBlur | (e) => void | - | Fired when editor loses focus. | Event contains current HTML. | | onFocus | (e) => void | - | Fired when editor gains focus. | Event contains current HTML. | | onChange | (e) => void | - | Fired when content changes. | Event contains current HTML. | | onInput | (e) => void | - | Low-level input events from the WebView. | Event contains input type and data | | onPress | (e) => void | - | Touch press events forwarded from the WebView. | Use for custom tap interactions. | | onLongPress | (e) => void | - | Long press events forwarded from the WebView. | Controlled by delayLongPress. | | onKeyDown | (e) => void | - | Keyboard keydown events from the editor. | Useful for custom shortcuts. | | onKeyUp | (e) => void | - | Keyboard keyup events from the editor. | Pair with onKeyDown for full key handling. | | onPaste | (e) => void | - | Fired when content is pasted into the editor. | Inspect or sanitize pasted HTML. | | onSelectionChange | (e) => void | - | Provides current commands info. | Use to update toolbar active states. |


Toolbar Props (extends FlatListProps)

| Prop | Type | Default | Description | Notes | |---|---:|---:|---|---| | data | CommandsInfo[] | - | Array of command info objects used to render toolbar items. || | config | ToolbarRenderItem[] | - | Config for render toolbar. Includes items like 'container', 'icon', 'color', 'text', 'custom'. || | renderItem | ListRenderItem<ToolbarRenderItem> | internal | Custom renderer for toolbar cells; receives config item. | | | editorRef | ExtendedWebViewRef | - | Reference used to send commands to the editor. | | theme | ToolbarTheme | internal | Theme object controlling palette colors, opacities, and component-level default props. | | Icon | React.ComponentType<IconProps> | - | Component used to render icons; receives IconProps. | | Item | React.ComponentType<ToolbarItemProps> | internal | Component used to render each toolbar item. | Use to customize layout, touch behavior, and accessibility attributes. | | Popover | React.ComponentType<PopoverProps> | internal | Component used for popovers (e.g., color pickers, menus). |


Contributing

License

MIT


Made with create-react-native-library