| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Drasil.Data.Formats.HTML
Synopsis
- data HTMLBody
- = Div [Attr] [HTMLBody]
- | Paragraph [Attr] [HTMLBody]
- | TextFormat Format [Attr] [HTMLBody]
- | Heading HLevel [Attr] [HTMLBody]
- | List ListType [Attr] [LItem]
- | Table [Attr] [Row]
- | DescriptionList [Attr] [DItem]
- | Anchor URL [Attr] [HTMLBody]
- | Figure [Attr] [HTMLBody]
- | FigCaption [Attr] [HTMLBody]
- | Img File Text [Attr]
- | RawText Text
- | Custom CustomTag [Attr] [HTMLBody]
- | Comment Text
- data TagType
- span :: [Attr] -> Text -> HTMLBody
- data Format
- = Bold
- | Emphasis
- | Subscript
- | Superscript
- | Span
- data HTMLHead
- data HTML = HTML [HTMLHead] [HTMLBody]
- newtype CustomTag = CT Text
- customTag :: Text -> CustomTag
- data HLevel
- data Row = Row [Attr] [Cell]
- data Cell
- data LItem = LItem [Attr] [HTMLBody]
- data DItem
- data ListType
- data Attr = Attr Text Text
- bold :: [Attr] -> Text -> HTMLBody
- emphasis :: [Attr] -> Text -> HTMLBody
- subscript :: [Attr] -> Text -> HTMLBody
- superscript :: [Attr] -> Text -> HTMLBody
- figureImage :: [Attr] -> File -> Text -> Text -> HTMLBody
- renderHTML :: HTMLRenderOptions -> HTML -> Doc ann
- newtype HTMLRenderOptions = HTMLRO {}
Documentation
Body elements
Constructors
| Div [Attr] [HTMLBody] | |
| Paragraph [Attr] [HTMLBody] | |
| TextFormat Format [Attr] [HTMLBody] | |
| Heading HLevel [Attr] [HTMLBody] | |
| List ListType [Attr] [LItem] | |
| Table [Attr] [Row] | |
| DescriptionList [Attr] [DItem] | |
| Anchor URL [Attr] [HTMLBody] | |
| Figure [Attr] [HTMLBody] | |
| FigCaption [Attr] [HTMLBody] | |
| Img File Text [Attr] | |
| RawText Text | |
| Custom CustomTag [Attr] [HTMLBody] | |
| Comment Text |
A CustomTag is either (a) an ill-supported HTML-spec. node (ill-supported
by HTMLBody, that is) or (b) a purely custom one.
Instances
| Show CustomTag Source # | |
| Eq CustomTag Source # | |
| Ord CustomTag Source # | |
customTag :: Text -> CustomTag Source #
Tag names are used within element start tags and end tags to give the element’s name. HTML elements all have names that only use characters in the range 0–9, a–z, and A–Z.
Heading level
Instances
Table structure
Ordered/unordered list structure
Instances
Description list elements
Instances
HTML Attrs for tags in the format key="value"
figureImage :: [Attr] -> File -> Text -> Text -> HTMLBody Source #
Creates a figure containing an image and a caption. The provided attributes are applied to the Figure
renderHTML :: HTMLRenderOptions -> HTML -> Doc ann Source #
Render HTML to a Doc
newtype HTMLRenderOptions Source #