@10play/tentap-editor

中文文档
1.1.0发布于 2026/10/19MITTypeScriptESM + CJS构建来源已验证近 30 天下载 52.7万

React Native Rich Text Editor

原始使用文档
文档目录10 节
  1. Why?
  2. React Native
  3. Expo
  4. Requirements
  5. Expo Web
  6. Usage
  7. Examples
  8. Upgrading
  9. Contributing
  10. License

React native rich text editor 10tap

cover MIT License npm

TenTap is a typed, easy to use, customizable, and extendable Rich Text editor for React-Native based on Tiptap and Prosemirror. It offers a "plug and play" experience and comes with many essential features out of the box that can be incorporated into your apps quickly. Additionally, TenTap allows you the developers to tailor the editor to your applications specific needs.

Features

  • 💁 Based on tiptap
  • ➕ Extendable
  • ⚙️ Support dynamic scheme
  • 🛠️ Native toolbar
  • 🎹 Custom keyboards
  • 💅 Customizable styles
  • 🌒 Darkmode and custom theme support
  • 🏗️ Supports the new architecture (including bridgeless) and the old architecture

Why?

After years of developing rich text editors for mobile, we realized that there is an empty void for open source RichText editors on mobile especially for ReactNative. So we have decided to create this package that incorporates all that we have learned, and that provides the best possible ux. Tentap is designed for getting the best experience of editing rich-text on mobile inspired by state of the art mobile editors like: gdocs, notion, dropbox paper.

Docs and Examples

Click Here For Full Documentation

Installation

React Native

  1. yarn add @10play/tentap-editor react-native-webview
  2. cd ios && pod install

The package includes a small native module (TenTapKeyboard) used by custom keyboards. It is autolinked, so you only need to rebuild your app after installing or upgrading. The editor itself works without it.

Expo

npx expo install @10play/tentap-editor react-native-webview

  • Dev client / prebuild: everything works, including the native keyboard driver. No config plugin is needed; rebuild your development build after installing or upgrading. The advanced setup also needs a dev client.
  • Expo Go: the editor works, and custom keyboards use a JavaScript fallback (see Expo Go and the fallback driver).

Requirements

react-native-webview 13.7+. The native module needs React Native 0.74+ (Expo SDK 51+), old or new architecture. The react-native peer dependency is *, so this isn't checked on install. See requirements.

Expo Web

TenTap supports expo web! See setup here

Usage

import React from 'react';
import { StyleSheet, View } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import {
  EditorKeyboardAvoidingView,
  RichText,
  Toolbar,
  useEditorBridge,
} from '@10play/tentap-editor';

export const Basic = () => {
  const editor = useEditorBridge({
    autofocus: true,
    avoidIosKeyboard: true,
    initialContent: 'Start editing!',
  });

  return (
    <SafeAreaView style={styles.fullScreen}>
      <EditorKeyboardAvoidingView style={styles.fullScreen}>
        <View style={styles.fullScreen}>
          <RichText editor={editor} />
        </View>
        <View style={styles.toolbarRow}>
          <Toolbar editor={editor} />
        </View>
      </EditorKeyboardAvoidingView>
    </SafeAreaView>
  );
};

const styles = StyleSheet.create({
  fullScreen: { flex: 1 },
  toolbarRow: { flexDirection: 'row' },
});

EditorKeyboardAvoidingView keeps the toolbar on top of the keyboard without a keyboardVerticalOffset, also on edge-to-edge Android. See Keyboard and caret.

Examples

  • example/: a React Native CLI app (React Native 0.81, new and old architecture) with every example, including custom keyboards, dynamic height and the advanced setup.
  • example-expo/: an Expo app (development build) with the basic editor, dynamic height, custom keyboards and two editors on one screen. It also runs on the web.

Common questions (lists in react-native-render-html, reading content in onChange, fonts, inline images, the editor inside a ScrollView) are answered in the FAQ.

Upgrading

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

版本与发布记录

@10play/tentap-editor 共发布 115 个版本,首次发布于 2024/02/07;过去 12 个月发布了 6 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.1.0latest2026/10/1917 天前
1.0.12025/11/2711 个月前
1.0.0-alpha.3alpha2025/11/2611 个月前
1.0.0-alpha.22025/11/2411 个月前
1.0.0-alpha.12025/11/2311 个月前
1.0.0-alpha.02025/11/2311 个月前

关于 @10play/tentap-editor 的常见问题

@10play/tentap-editor 是什么?

React Native Rich Text Editor

如何安装 @10play/tentap-editor?

在项目目录运行 npm install @10play/tentap-editor,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(*)、react-native(*)、react-native-webview(*)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@10play/tentap-editor 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@10play/tentap-editor 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@10play/tentap-editor 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >= 18.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@10play/tentap-editor 可以商用吗?

@10play/tentap-editor 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@10play/tentap-editor 的下载量有多少?

根据 npm 官方下载统计,@10play/tentap-editor 在 2026/10/04 – 2026/11/02 这 30 天内被下载 526,800 次,日均约 17,560 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@10play/tentap-editor 还在维护吗?

最新版本 1.1.0 发布于 2026/10/19(17 天前);至今共发布 115 个版本,其中过去 12 个月发布了 6 个;首次发布于 2024/02/07。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。