Skip to content

Text Content

Parsing content

The getParsedContent method can be used to parse and transform an event into the content syntax tree

Cashing

Because parsing and transforming content is an expensive operation getParsedContent will cache the results on the event under a Symbol, by default this is the TextNoteContentSymbol

If your parsing or transforming different event kinds than kind 1, its recommended to create a new Symbol to and pass to getParsedContent to avoid cache collisions with the default kind 1 processor

TODO

Mentions

The nostrMentions transformer can be used to add Mention nodes to the tree

Hashtags

The hashtags transformer can be used to add Hashtag nodes to the tree

Emojis

The emojis transformer will add Emoji tags for any NIP-30 emojis

Galleries

The galleries transformer will group image URLs into a Gallery node

Lightning invoices

TODO

Cashu tokens and payment requests

TODO