ThinkAlexandria / elm-html-in-elm / ElmHtml.ToElmString

Convert ElmHtml to string of Elm code.

nodeRecordToString : FormatOptions -> ElmHtml.InternalTypes.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.InternalTypes.ElmHtml msg -> String

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

toElmStringWithOptions : FormatOptions -> ElmHtml.InternalTypes.ElmHtml msg -> String

same as toElmString, but with options


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

Formatting options to be used for converting to string

defaultFormatOptions : FormatOptions

default formatting options