drafty

package
v0.18.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2022 License: GPL-3.0 Imports: 4 Imported by: 4

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 PlainText added in v0.18.0

func PlainText(content interface{}) (string, error)

PlainText converts drafty document to plain text with some basic markdown-like formatting. Deprecated. Use Preview for new development.

func Preview added in v0.16.10

func Preview(content interface{}, length int) (string, error)

Preview shortens Drafty to the specified length (in runes), removes quoted text, leading line breaks, and large content from entities making them suitable for a one-line preview, for example for showing in push notifications. The return value is a Drafty document encoded as JSON string.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL