{"id":8384948,"url":"https://github.com/baskinwind/zebra-editor-core","last_synced_at":"2025-07-31T20:30:57.227Z","repository":{"id":124431546,"uuid":"263829000","full_name":"baskinwind/zebra-editor-core","owner":"baskinwind","description":"一款强大、现代的可视化编辑器。","archived":false,"fork":false,"pushed_at":"2024-01-16T13:16:42.000Z","size":1719,"stargazers_count":244,"open_issues_count":2,"forks_count":18,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-16T03:45:01.771Z","etag":null,"topics":["rich-editor","typescript"],"latest_commit_sha":null,"homepage":"https://zebrastudio.tech","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/baskinwind.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}},"created_at":"2020-05-14T06:00:57.000Z","updated_at":"2024-08-07T15:35:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"303e996d-4095-4ae8-a4a2-bc7421184122","html_url":"https://github.com/baskinwind/zebra-editor-core","commit_stats":null,"previous_names":["codmak/zebra-editor-core","baskinwind/zebra-editor-core","acccco/zebra-editor-core"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/baskinwind/zebra-editor-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baskinwind%2Fzebra-editor-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baskinwind%2Fzebra-editor-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baskinwind%2Fzebra-editor-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baskinwind%2Fzebra-editor-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baskinwind","download_url":"https://codeload.github.com/baskinwind/zebra-editor-core/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baskinwind%2Fzebra-editor-core/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267470062,"owners_count":24092352,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["rich-editor","typescript"],"created_at":"2024-04-22T13:06:44.629Z","updated_at":"2025-07-31T20:30:56.734Z","avatar_url":"https://github.com/baskinwind.png","language":"TypeScript","readme":"# ZebraEditorCore\r\n\r\nZebraEditorCore 是[斑码编辑器](https://zebrastudio.tech)剔除 `UI` 框架，纯粹的富文本编辑器，该项目将焦点关注于编辑器最为关键的部分！\r\n\r\n## 使用\r\n\r\n```\r\nyarn add zebra-editor-core\r\n\r\n# or\r\n\r\nnpm i zebra-editor-core\r\n```\r\n\r\n```\r\nimport { mount } from \"zebra-editor-core\"\r\n\r\nmount('root');\r\n```\r\n\r\n## 为什么？\r\n\r\n目前，市面上流行的富文本编辑器主要有三大类：\r\n\r\n1. `Markdown` 编辑器：结构清晰，但功能有限，比如不能给文字加颜色，设置段落的样式等等。\r\n\r\n2. 基于 `contenteditable` 的 `Html` 富文本编辑器，如 `CKEditor` 。功能强大，但不受控，生成的 `Html` 过于混乱，掌控不了文章内容，虽能获取 `Html`，但却控制不了 `Html` 的结构，不能直接生成非 `Html` 结构，局限性很大，只能做 `Html` 相关的操作，却掌控不了文章的内容。\r\n\r\n3. 基于 `contenteditable` 的 `JS` 富文本编辑器，与第二类的区别主要在于：文章结构保存在 `JS` 中，`Html` 是文章结构的映射，所有的编辑行为实际操作的是 `JS` 内存中的模型，如 `DraftJs` ，但是目前这类的编辑器，功能简单，可操作性不够。\r\n\r\n该项目为第三类的富文本编辑器，相较于其他第三类富文本编辑器，它功能丰富，理论上支持所有 `Css` 属性，支持 `Markdown` 中所有的类型，包括但不限于 标题、表格、列表、引用、图片等，同时表格、列表、支持多层级嵌套，内容由 `JS` 表示，很容易就能生成别的类型：如 `Markdown`。\r\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaskinwind%2Fzebra-editor-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaskinwind%2Fzebra-editor-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaskinwind%2Fzebra-editor-core/lists"}