Layer 227
RichText
Abstract type representing one of 29 possible constructors.
Type
Available Constructors
In Gogram, this type is represented as tg.RichText interface.
Use any of the following constructors:
TextAnchor
Text linking to another section of the page
TextAutoEmail
Rich-text fragment that is an auto-detected email address.
TextAutoPhone
Rich-text fragment that is an auto-detected phone number.
TextAutoUrl
Rich-text fragment that is an auto-detected URL.
TextBankCard
Rich-text fragment that is an auto-detected bank-card number.
TextBold
Bold text
TextBotCommand
Rich-text fragment that is a bot command (e. g. /start).
TextCashtag
Rich-text fragment that is a cashtag (e. g. $AAPL).
TextConcat
Concatenation of rich texts
TextCustomEmoji
Inline custom emoji rendered from a document id, with a plain-text fallback.
TextDate
Date or time fragment rendered with the requested relative/short/long formatting.
TextEmail
Rich text email link
TextEmpty
Empty rich text element
TextFixed
fixed-width rich text
TextHashtag
Rich-text fragment that is a hashtag (e. g. #news).
TextImage
Inline image
TextItalic
Italic text
TextMarked
Highlighted text
TextMath
Inline math expression rendered from a La Te X source string.
TextMention
Username mention fragment (e. g. @username).
TextMentionName
Mention of a specific user by id, used when the user has no public username.
TextPhone
Rich text linked to a phone number
TextPlain
Plain text
TextSpoiler
Spoiler fragment whose contents are hidden until the reader taps to reveal them.
TextStrike
Strikethrough text
TextSubscript
Subscript text
TextSuperscript
Superscript text
TextUnderline
Underlined text
TextUrl
Link
Gogram Example
// RichText is an interface type // You can use any of the following constructors: var _ tg.RichText = &tg.TextAnchor{} var _ tg.RichText = &tg.TextAutoEmail{} var _ tg.RichText = &tg.TextAutoPhone{} var _ tg.RichText = &tg.TextAutoUrl{} var _ tg.RichText = &tg.TextBankCard{} // ... and 24 more constructors