{"id":19978024,"url":"https://github.com/tuture-dev/editure2","last_synced_at":"2025-03-01T19:15:25.797Z","repository":{"id":54302578,"uuid":"335669147","full_name":"tuture-dev/editure2","owner":"tuture-dev","description":null,"archived":false,"fork":false,"pushed_at":"2021-02-25T14:04:17.000Z","size":494,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-12T10:11:59.781Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tuture-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-03T15:29:43.000Z","updated_at":"2021-04-14T07:19:16.000Z","dependencies_parsed_at":"2022-08-13T11:30:35.567Z","dependency_job_id":null,"html_url":"https://github.com/tuture-dev/editure2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuture-dev%2Fediture2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuture-dev%2Fediture2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuture-dev%2Fediture2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuture-dev%2Fediture2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tuture-dev","download_url":"https://codeload.github.com/tuture-dev/editure2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241411543,"owners_count":19958753,"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","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":[],"created_at":"2024-11-13T03:30:12.711Z","updated_at":"2025-03-01T19:15:25.755Z","avatar_url":"https://github.com/tuture-dev.png","language":"JavaScript","readme":"## editure2\n\n![image-20210203233612141](https://tva1.sinaimg.cn/large/008eGmZEly1gnarsrwywnj312q0s6q52.jpg)\n\n此项目使用 [remirror](https://github.com/remirror/remirror) 来重新实现 [editure](https://github.com/tuture-dev/editure) 的所有功能，目前主要参考 editure 的[线上例子](https://editure-preview.netlify.app/)实现了如下功能：\n\n- 撤销\n- 重做\n- 加粗\n- 斜体\n- 下划线\n- 删除线\n- 行内代码\n- 链接（部分）\n- 一级标题\n- 二级标题\n- 引用\n- 代码块\n- 分割线\n\n得益于 remirror 的完善的插件机制，上述的功能除了链接只支持点击工具栏插入链接外，其余的命令均支持工具栏+Markdown热键激活并插入对应的内容。\n\n目前还有待完成的功能如下：\n\n- 链接\n  - 支持修改链接内容\n  - 支持预览链接，并外链跳转到对应的网页\n- 标题\n  - 添加下拉框实现至少4-6级的标题支持\n- 代码块\n  - 支持语法高亮\n  - 支持更换代码语言类型\n- 有序列表\n  - 有待配置插件\n- 无序列表\n  - 有待配置插件\n- 图片\n  - 可以点击工具栏上传图片\n  - 可以复制、拖入上传图片等\n- 个性化提示（default、warn、error等）\n  - 需要自己理解 remirror 插件机制并实现\n\n以上功能还需要添加快捷键支持，如链接（`cmd+k`)，得益于 remirror 的完善的插件机制，快捷键应该是内置的，只需要设置对应的选项激活即可。\n\n## 一些感受\n\n- remirror 代码方面做的比较完善，但是文档及其欠缺，好在作者维护比较活跃（如今天就有十几个提交）\n- 在使用 remirror 之前，建议先将 [prosemirror](https://prosemirror.net/) 文档吃透，才能够很好的理解 remirror 的源码以及编写插件\n- 如果需要完成现在 editure 的全部功能，有必要熟读 remirror 的源码，我更倾向于把 remirror 作为之后 editure 的一个基础参照物，后续应该要基于它编写插件甚至修改核心功能，但是帮助我们前进了很大一步，时隔两年，它已经做的比较好了\n\n## 一些补充\n\n- 此项目使用了我为学习前端工程化编写的脚手架初始化而来：[create-fps-app](https://github.com/pftom/create-fps-app)\n- remirror 基于 TypeScript 实现，有必要学习 TypeScript 语法，同时也建议之后项目硬性要求 TypeScript\n- 此项目额外使用了 [prosemirror-dev-tools](https://github.com/d4rkr00t/prosemirror-dev-tools)，用于 prosemirror 的方便调试，位于页面右下角，具体效果如下：\n\n![image-20210203234145682](https://tva1.sinaimg.cn/large/008eGmZEly1gnarx0cf5dj31du0u0gtv.jpg)\n\n### 如何开启项目\n\n确保你安装了 [Node.js](http://nodejs.org/)（`\u003e=v14.15.0`）以及 [yarn](https://yarnpkg.com/)，然后运行如下命令：\n\n```bash\n$ git clone https://github.com/tuture-dev/editure2.git\n$ cd editure2 \u0026\u0026 yarn\n$ yarn start\n```\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuture-dev%2Fediture2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftuture-dev%2Fediture2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuture-dev%2Fediture2/lists"}