{"id":13514759,"url":"https://github.com/textbus/textbus","last_synced_at":"2026-04-14T06:07:59.597Z","repository":{"id":37838710,"uuid":"266706228","full_name":"textbus/textbus","owner":"textbus","description":"Textbus 是一个组件化的、数据驱动的富文本框架，支持在线协同编辑，拥有非常好的扩展性和可定制性，可使用 Viewfly、Vue 或 React 直接渲染富文本，是构建复杂富文本的不二之选！","archived":false,"fork":false,"pushed_at":"2026-04-13T23:05:20.000Z","size":6275,"stargazers_count":1374,"open_issues_count":17,"forks_count":144,"subscribers_count":28,"default_branch":"main","last_synced_at":"2026-04-13T23:29:35.288Z","etag":null,"topics":["collaboration","collaborative-editing","collaborative-framework","rich-text","rich-text-editor","wysiwyg","wysiwyg-editor","wysiwyg-html-editor"],"latest_commit_sha":null,"homepage":"https://textbus.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/textbus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-05-25T06:54:53.000Z","updated_at":"2026-04-12T08:29:23.000Z","dependencies_parsed_at":"2025-05-23T03:34:30.452Z","dependency_job_id":"d07e783e-35cd-4d76-ab75-3d4593519231","html_url":"https://github.com/textbus/textbus","commit_stats":{"total_commits":478,"total_committers":5,"mean_commits":95.6,"dds":"0.010460251046025104","last_synced_commit":"c2df243641755e3668fb2ab8f3e1077693cda609"},"previous_names":["tbhuabi/editor","tbhuabi/textbus","textbus/core"],"tags_count":273,"template":false,"template_full_name":null,"purl":"pkg:github/textbus/textbus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textbus%2Ftextbus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textbus%2Ftextbus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textbus%2Ftextbus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textbus%2Ftextbus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/textbus","download_url":"https://codeload.github.com/textbus/textbus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textbus%2Ftextbus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31784256,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["collaboration","collaborative-editing","collaborative-framework","rich-text","rich-text-editor","wysiwyg","wysiwyg-editor","wysiwyg-html-editor"],"created_at":"2024-08-01T05:01:01.386Z","updated_at":"2026-04-14T06:07:59.579Z","avatar_url":"https://github.com/textbus.png","language":"TypeScript","readme":"\u003ch1 align=\"center\"\u003eTextbus\u003c/h1\u003e\n\n🚀 Textbus 是一个组件化、跨平台、数据驱动的富文本框架，支持使用 [Viewfly](https://github.com/viewfly/viewfly)、Vue、React 渲染富文本内容，并坚定的支持在线**多人协作**。你可以在 Textbus 中轻松创建出类似钉钉文档、石墨文档、飞书文档等完全自定义的编辑器。\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/build-passing-green\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/v/%40textbus%2Fcore\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/dm/%40textbus/core\"\u003e\n\u003c/p\u003e\n\n## 官方文档\n\n[Textbus 官方文档](https://textbus.io)\n\n### XNote 编辑器\n\nXNote 是 Textbus 官方基于最新 4.0 版本开发的一个无头的、高性能的开源富文本编辑器。提供了开箱即用的大多数功能。也为需要自己开发编辑器的开发者提供了第一手的参考资料，仓库地址： [https://github.com/textbus/xnote](https://github.com/textbus/xnote)。\n\n你也可以直接查看在线演示：[在线演示](https://textbus.io/playground)\n\n介绍\n-------------------------------------------------------------\n\n我们一直致力于让富文本开发也能像普通前端框架一样，通过简明易懂的 api 和少量的约定，即可开发出使用流畅、交互丰富的富文本应用。\n\n为了解决传统富文本开发的难题，Textbus 首次在富文本中引入了组件的概念，这让富文本开发就像拼积木一样，不再是前端领域不可跨越的天坑。不管你是富文本开发领域的老鸟，亦或是前端的新手，Textbus 都将帮助你把富文本做得更好。\n\n### Textbus 的特点\n\n+  **组件化**：根据富文本的特点而专门开发的组件化系统，让富文本编辑支持复杂布局，插入特殊控件等就像现代前端框架一样，非常的简单。\n+ **完全可控**：由于 Textbus 采用完全的数据驱动，输入输出完全依赖内核来完成，在不同的浏览器上，不会存在不一样的行为和结果。\n+ **易扩展**：hooks 风格的扩展代码，让你在不同上下文中对同样事件定制不同的行为变得异常简单。原生支持多种前端框架渲染，让你编写复杂交互更容易。\n+ **语法糖支持**：高度灵活的语法糖支持，你可以非常灵活的定制输入实时转换功能，如 Markdown 中的 # 号 + 空格变为标题等，你也可以完全自创语法，只要你开心。\n+ **格式兼容**：完全可定制的文档解析能力，可以让你最大可能的保持从网页、word 等其它页面复制过来的内容和格式。\n+ **格式限制**：既可以做到组件深层次嵌套，也可以做到像现在大多数编辑器一样 block 化。\n+ **转换便捷**：内置功能强大的格式转换能力，这也是富文本的难点之一，尤其是对于支持树状数据结构的编辑器来说，要实现这一点非常复杂。\n+ **支持在线协作**：Textbus 官方目前提供了基于 Yjs 的协作能力支持，你也可以采用其它的协作方案来对接 Textbus 的数据模型。\n+ **高度抽象**：完全抽象的光标和选区系统，你不需要再关心浏览器复杂的选区问题。\n\n\n### 模块\n\n| 模块                        | 作用                                                                                    |\n|:--------------------------|:--------------------------------------------------------------------------------------|\n| @textbus/core             | 核心模块，提供了组件、插槽、格式、属性的数据模型抽象和选区、格式变换、渲染、组件生命周期管理、编辑器控制、历史记录、快捷键管理、语法糖管理、输出转换等富文本核心能力的实现 |\n| @textbus/platform-browser | 浏览器支持中间层，提供了基本的视图层，桥接了选区、光标、和 DOM 渲染能力                                                |\n| @textbus/collaborate      | 协作支持模块，提供了基于 Yjs 的协作对接能力                                                              |\n| @textbus/adapter-viewfly  | Textbus 视图渲染 Viewlfy 适配器，可使用 Viewfly 渲染富文本内容                                          |\n| @textbus/adapter-vue      | Textbus 视图渲染 vue 适配器，可使用 vue 渲染富文本内容                                                  |\n| @textbus/adapter-react    | Textbus 视图渲染 react 适配器，可使用 react 渲染富文本内容                                              |\n| @textbus/platform-node    | 适用于 node 后台运行的 Textbus 的实用工具集                                                         |\n\n\n## 本地开发\n\nTextbus 采用 pnpm 作为多模块管理，全局安装 pnpm。\n\n```\nnpm install pnpm -g\n```\n\n克隆 Textbus 仓库，并安装依赖。\n\n```\ngit clone git@github.com:textbus/textbus.git\ncd textbus\npnpm install\n```\n\n启动开发环境。\n\n```\nnpm start\n```\n\n## 赞助\n\nTextbus 的成长离不开社会的支持，如果 Textbus 为你带来了帮助，并且你也认同为知识付费，同时鼓励我们做的更好，欢迎通过下面的二维码表达你的支持\n\n![](./_source/wx.jpg) ![](./_source/alipay.jpg)\n","funding_links":[],"categories":["Rich text editor","TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftextbus%2Ftextbus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftextbus%2Ftextbus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftextbus%2Ftextbus/lists"}