premailer

package module
v0.0.0-...-e8c78aa Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: MIT Imports: 7 Imported by: 0

README

Build Status

go-premailer

An experimental golang port of https://github.com/premailer/premailer

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Douceur

func Douceur(raw string) (*html.Node, error)

Types

type Inliner

type Inliner func(string) (string, error)

type Premailer

type Premailer struct {
	LineLength           int
	RemoveScripts        bool
	ResetContentEditable bool
	RemoveIDs            bool
	RemoveClasses        bool
	RemoveComments       bool
	// contains filtered or unexported fields
}

func New

func New(body []byte) (*Premailer, error)

New parses an HTML fragment []byte and returns the result

func (*Premailer) ToInlineCSS

func (p *Premailer) ToInlineCSS() (string, error)

func (Premailer) ToPlaintext

func (p Premailer) ToPlaintext() (string, error)

ToPlaintext converts the input document to the plaintext version

Jump to

Keyboard shortcuts

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