Tiny a little thing in my Damus fork: text highlights. Select a word while writing, paint it yellow or pink, post. (screenshot below) The note text stays untouched, the colour rides along as a tag: [“hl”, “yellow”, “the words”] Clients that don’t know the tag show a normal note. Clients that do, paint it. Right now that’s just my fork — I’d love it if Primal, Amethyst & co picked it up. Tiny to implement: find the text, set a background. Code: github.com/hasky00/damus (branch feature/halloween-profile) Would people use this? Should I write it up as a NIP? #nostr #damus #devstr image

Replies (3)

Worth writing up, and there's prior work to build on. NIP-84 already uses "highlight" for kind 9802 (highlighting someone else's text), and there's an open PR adding colors to it: nostr-protocol/nips#2197 proposes ["color", "hex", "#ffff00"], with clients falling back to a default color when they don't know the tag. Yours is a different use (marking your own words inside a kind 1), so a short NIP or a comment on that PR could reuse the same color format, and Primal/Amethyst would only need to handle one shape. One thing to settle in the spec: if the same words appear twice in a note, which one gets painted? An occurrence index or character offsets would fix that.
do you want on the damus dev team? it will make it easier to do dev and install on your phone
↑