Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Align = bbcode.NewAttributeTag("align", divPartialOpen, tagClose, alignAttr, attrClose, divClose, bbcode.AttrFilterFunc(alignFilter)) LeftAlign = bbcode.NewTag("left", leftOpen, divClose) CentreAlign = bbcode.NewTag("centre", centreOpen, divClose) CenterAlign = bbcode.NewTag("center", centreOpen, divClose) RightAlign = bbcode.NewTag("right", rightOpen, divClose) FullAlign = bbcode.NewTag("full", fullOpen, divClose) Color = bbcode.NewAttributeTag("color", spanPartialOpen, tagClose, colourAttr, attrClose, spanClose, Colours) Colour = bbcode.NewAttributeTag("colour", spanPartialOpen, tagClose, colourAttr, attrClose, spanClose, Colours) Font = bbcode.NewAttributeTag("font", spanPartialOpen, tagClose, fontAttr, attrClose, spanClose, Fonts) Bold = bbcode.NewTag("b", []byte("<b>"), []byte("</b>")) Italic = bbcode.NewTag("i", []byte("<i>"), []byte("</i>")) Strikethough = bbcode.NewTag("s", []byte("<s>"), []byte("</s>")) Underline = bbcode.NewTag("u", []byte("<u>"), []byte("</u>")) Size = bbcode.NewAttributeTag("size", spanPartialOpen, tagClose, sizeAttr, sizeClose, spanClose, bbcode.AttrFilterFunc(sizeFilter)) Heading1 = bbcode.NewTag("h1", []byte("<h1>"), []byte("</h1>")) Heading2 = bbcode.NewTag("h2", []byte("<h2>"), []byte("</h2>")) Heading3 = bbcode.NewTag("h3", []byte("<h3>"), []byte("</h3>")) Heading4 = bbcode.NewTag("h4", []byte("<h4>"), []byte("</h4>")) Heading5 = bbcode.NewTag("h5", []byte("<h5>"), []byte("</h5>")) Heading6 = bbcode.NewTag("h6", []byte("<h6>"), []byte("</h6>")) Heading7 = bbcode.NewTag("h7", []byte("<h7>"), []byte("</h7>")) Quote = bbcode.NewAttributeTag("quote", []byte("<fieldset class=\"quote\">"), []byte("<blockquote>"), []byte("<legend>"), []byte("</legend>"), []byte("</blockquote></fieldset>"), bbcode.AttrFilterFunc(notEmptyFilter)) Code code Image img List list Table table URL url All = []bbcode.Handler{ Align, LeftAlign, CentreAlign, CenterAlign, RightAlign, FullAlign, Colour, Color, Font, Bold, Italic, Strikethough, Underline, Size, Heading1, Heading2, Heading3, Heading4, Heading5, Heading6, Heading7, Quote, Code, Image, List, Table, URL, } )
The following are some predefined bbcode tags for common applications.
View Source
var Colours = colours{}/* 148 elements not displayed */
Colours is a map of colour names to their hex equivalent. It is used as an attribute filter in an bbcode.AttributeTag where it will recognise the contained colours as well as raw hex values.
View Source
var Fonts = fonts{
"georgia": georgia,
"times": times,
"times new roman": times,
"arial": arial,
"arial black": arialBlack,
"comic sans ms": comicSans,
"comic sans": comicSans,
"impact": impact,
"verdana": verdana,
"courier": courier,
"lucida console": lucida,
"serif": serif,
"sans serif": sansSerif,
"monospace": monospace,
}
Fonts is a map of font names and their CSS expansion for use as an attribute filter for bbcode.AttributeTag.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.