Documentation ¶
Overview ¶
Package drafty contains utilities for conversion from Drafty to plain text.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Preview ¶ added in v0.16.10
Preview shortens Drafty to the specified length (in runes) and removes large content from entities making them suitable for a one-line preview, for example for showing in push notifications.
func ToPlainText ¶
ToPlainText converts message payload from Drafy to string. If content is plain string, then it's returned unchanged. If content is not recognized as either Drafy (as a map[string]interface{}) or as a string, an error is returned.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.