Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 1.33 KB

lib-collab-crdt-blog-editor.md

File metadata and controls

46 lines (35 loc) · 1.33 KB
title tags created modified
lib-collab-crdt-blog-editor
blog
collaboration
crdt
editor
2023-10-28 09:02:53 UTC
2023-10-28 09:03:33 UTC

lib-collab-crdt-blog-editor

guide

blogs

blogs-text

  • Why not Markdown

  • Problem 1: Syntax barfing(呕吐)

    • Suppose you want to add a behavior that markdown doesn't usually support, others cannot parse/render correctly
  • Problem 2: Parsing sucks

    • Your markdown variation is going to need a library for every environment.
  • Problem 3: Character counting

    • In microblogging networks, the character limit is a somewhat defining feature.
    • You have to strip the syntax first.
  • Bluesky's answer: Richtext Facets

    • Our answer was to use strings annotated by slices that point into the string.
    • Data in the AT Proto is transmitted as JSON or CBOR. No custom parsing is required.
    • If there's a facet-type your client doesn't understand, it's just ignored and the original text carries through.
// slightly simplified
{
  text: "Hello @bob.com",
  facets: [
    { feature: "mention", index: { start: 6, end: 14 } }
  ]
}
  • Bonus discussion: maintaining intent

more