eeue56/elm-html-in-elm/5.2.0

NOTE: this package is not compatible with Elm 0.19.1

ElmHtml.ToElmString

Convert ElmHtml to string of Elm code.

nodeRecordToString : FormatOptions -> NodeRecord msg -> List String

Convert a node record to a string. This basically takes the tag name, then pulls all the facts into tag declaration, then goes through the children and nests them under this one

toElmString : ElmHtml msg -> String

Convert a given html node to a string based on the type

toElmStringWithOptions : FormatOptions -> ElmHtml msg -> String

same as toElmString, but with options

type alias FormatOptions =
{ indent : Int
, newLines : Bool
}

Formatting options to be used for converting to string

defaultFormatOptions : FormatOptions

default formatting options