= NTXT
image::https://cdn.satellite.earth/6c2dffeada304d1c9d03cb666f83a73323fefab3c590a417a16809d3fd49f490.png[]
Markup syntax for short-form Nostr text.
== Use cases
Replies, Chat Messages, Threads, Forum posts, Descriptions, …
== Motivation
There’s no such thing as plain text when you link to other stuff. So, a clear and usable Nostr-based syntax.
== Syntax Specification
=== Basic Text Formatting
Bold:**text**
Italic: *text* or _text_
Striekthrough:~~text~~
Underline: __text__
Monospace: between backticks
Unordered list: - item or * item
Ordered list: 1. item
Quote: > quote
Code Block:
[source] –– codeblock ––
=== Headings
Level 1: # Heading
Level 2: ## Heading
=== Custom Emoji
Custom emoji are defined using double colons:
:emoji_name:
=== Direct Nostr Identifiers
nostr:npub1... - Link to a pubkey
nostr:nevent1... - Link to an event
nostr:nprofile1... - Link to a profile
nostr:ncommunity1... - Link to a community
=== Named Nostr Links
[link text](nostr:npub1...) - Named link to a pubkey
[link text](nostr:nevent1...) - Named link to an event
[link text](nostr:nprofile1...) - Named link to a profile
[link text](nostr:ncommunity1...) - Named link to a community
=== Lightning Invoices
lightning:lnbc1... - Direct Lightning invoice
[Pay 1000 sats](lightning:lnbc1...) - Named Lightning invoice
=== Ecash Tokens
cashu:eyJ0b2tlbiI6... - Direct ecash token
[Redeem 1000 sats](cashu:eyJ0b2tlbiI6...) - Named ecash token
=== Nostr Wiki Links
Wiki-style links use double square brackets:
[page_name][] - Link to a wiki page
[display text][page_name] - Link to a wiki page with custom display text
== Implementation Notes
- Clients SHOULD validate Nostr identifiers before creating links
- Clients SHOULD validate payment links before displaying them
- Clients MAY implement wiki link resolution based on their own rules
- Clients SHOULD handle payment links according to their respective protocols
Comments
Public conversation about this article.
No comments yet.
Article metadata
About this entry
Event Id
Raw event
Other authors
No one else has published this topic yet.
