html

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

README

HTML Constructor

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func A

func A(content template.HTML, ms ...M) template.HTML

func B

func B(content template.HTML, ms ...M) template.HTML

func Body

func Body(content template.HTML, ms ...M) template.HTML

func Br

func Br(num ...int) template.HTML

func Button

func Button(content template.HTML, ms ...M) template.HTML

func Div

func Div(content template.HTML, ms ...M) template.HTML

func Form

func Form(content template.HTML, ms ...M) template.HTML

func H1

func H1(content template.HTML, ms ...M) template.HTML

func H2

func H2(content template.HTML, ms ...M) template.HTML

func H3

func H3(content template.HTML, ms ...M) template.HTML

func H4

func H4(content template.HTML, ms ...M) template.HTML

func H5

func H5(content template.HTML, ms ...M) template.HTML

func H6

func H6(content template.HTML, ms ...M) template.HTML

func HtmlAudioFilter added in v0.0.5

func HtmlAudioFilter(source string) string

* 过滤html audio标签 *

func HtmlCssFilter added in v0.0.5

func HtmlCssFilter(source string) string

* 过滤html css标签 *

func HtmlDecode added in v0.0.5

func HtmlDecode(source string, args ...bool) string

* html解码 *

func HtmlEncode added in v0.0.5

func HtmlEncode(source string, args ...bool) string

* html编码 *

func HtmlHyperLinkFilter added in v0.0.5

func HtmlHyperLinkFilter(source string) string

* 过滤html超链接标签 *

func HtmlImageFilter added in v0.0.5

func HtmlImageFilter(source string) string

* 过滤html img标签 *

func HtmlSafeParam added in v0.0.5

func HtmlSafeParam(source string) string

* 安全参数 *

func HtmlSafeString added in v0.0.5

func HtmlSafeString(source string) string

* 安全字符串 *

func HtmlScriptFilter added in v0.0.5

func HtmlScriptFilter(source string) string

* 过滤html script标签 *

func HtmlTagFilter added in v0.0.5

func HtmlTagFilter(source string) string

* 过滤html标签 *

func HtmlVideoFilter added in v0.0.5

func HtmlVideoFilter(source string) string

* 过滤html video标签 *

func I

func I(ms ...M) template.HTML

func Li

func Li(content template.HTML, ms ...M) template.HTML

func MarkdownImageFilter added in v0.0.5

func MarkdownImageFilter(source string) string

* 过滤markdown img标记 * ![](http://a.b.com/s/1/000002/wKgAA1oAjnCAOrkgAADQl5vsv_s123.jpg) *

func P

func P(content template.HTML, ms ...M) template.HTML

func Span

func Span(content template.HTML, ms ...M) template.HTML

func Ul

func Ul(content template.HTML, ms ...M) template.HTML

Types

type Attribute

type Attribute M

func (Attribute) String

func (s Attribute) String() template.HTML

type Element

type Element struct {
	Tag       template.HTML
	Content   template.HTML
	Style     Style
	Attribute Attribute
}

func AEl

func AEl() Element

func BEl

func BEl() Element

func BaseEl

func BaseEl() Element

func BodyEl

func BodyEl() Element

func ButtonEl

func ButtonEl() Element

func DivEl

func DivEl() Element

func FormEl

func FormEl() Element

func H1El

func H1El() Element

func H2El

func H2El() Element

func H3El

func H3El() Element

func H4El

func H4El() Element

func H5El

func H5El() Element

func H6El

func H6El() Element

func IEl

func IEl() Element

func LiEl

func LiEl() Element

func PEl

func PEl() Element

func SpanEl

func SpanEl() Element

func UlEl

func UlEl() Element

func (Element) Get

func (b Element) Get() template.HTML

func (Element) SetAttr

func (b Element) SetAttr(key, value string) Element

func (Element) SetClass

func (b Element) SetClass(class ...string) Element

func (Element) SetContent

func (b Element) SetContent(content template.HTML) Element

func (Element) SetId

func (b Element) SetId(id string) Element

func (Element) SetStyle

func (b Element) SetStyle(key, value string) Element

func (Element) SetStyleAndAttr

func (b Element) SetStyleAndAttr(ms []M) Element

func (Element) SetTag

func (b Element) SetTag(tag template.HTML) Element

type M

type M map[string]string

type Style

type Style M

func (Style) String

func (s Style) String() template.HTML

Jump to

Keyboard shortcuts

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