inkandswitch/tiny-essay-editor
关于
simple markdown editor w inline comments, on latest automerge stack
效率与自动化可以做什么
- Edit Markdown with inline format preview
- Write inline comments + replies
- Live sync through Automerge
- Stores data to local device
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文tiny essay editor
This is a simple collaborative Markdown editor built in React, with inline format preview and inline commenting.
It's built on automerge and automerge-repo for CRDT-based storage and sync. It uses Codemirror for markdown editing UI, and automerge-codemirror to connect to Codemirror.
Usage
If you visit the root domain the app will make a new doc. Or you can hit the New button.
Once you have a doc, the URL will update with a doc ID. If you share that URL to another browser/device, it should sync live. Hold on to the URL if you want to come back to that doc!
Features
- Edit Markdown with inline format preview
- Write inline comments + replies
- Live sync through Automerge
- Stores data to local device
- Save out .md file with a Download button
- Typeset similarly to Ink & Switch essays
Status
This app is primarily intended for internal use at Ink & Switch for editing essays, so there are some features that are specialized towards that use case. We don't plan to develop it into a general-purpose editor that anyone can use for anything. But of course, it can edit any Markdown document too. If you want to actually use this editor in earnest, you might want to fork it to build your own ideas.
Hopefully the code serves as a useful sample for building apps based on automerge-repo, automerge-codemirror, and React.
Development
Run it
yarn
yarn dev
Dual deployment
This app is designed for normal webapp deployment as well as experimental deployment to an internal I&S platform. The code is almost entirely shared but there are two entry points:
src/main.tsxis the normal app entry pointsrc/index.tsis an experimental entry point which just exports some functions to a host environment
Adding a new datatype
This app is actually a general framework for editing automerge docs in viewers, which currently has specific support for markdown documents and tldraw whiteboards.
Basic instructions to add a new datatype:
- copy an existing
src/{datatype}directory as a template.teeis a reasonable example - Fill in
src/<your_datatype>/datatype.tswith a TS type, an init function, and other functions - Add your new datatype to the
datatypesmap insrc/datatypes.ts
探索相关项目
加载中…