An element represents the parameters of any non-text node.
Creates an element. The arguments are as follows:
The first argument is the ElementDefinition that defines this element. Note that even though
elements require an element definition, it's still safe to use (==) because the function arguments
are not stored on the resulting Element.
The second argument is element's list of attributes.
element header [IntegerAttribute "level" 1]
--> creates a header (h1) elementAnnotations from an element
annotations (element horizontal_rule [] (Set.singleton selectable))
--> Set [ selectable ]Attributes from an element
attributes (element image [StringAttribute "src" "logo.svg"])
--> [StringAttribute "src" "logo.svg"]Name from an element
name (element image [StringAttribute "src" "logo.svg"])
--> "image"An element with the annotations changed to the given set
element <| withAnnotations (Set.singleton selectable)
--> an element with the annotations changed to the singleton selectable setAn element with the attributes changed to the given list
element <| withAnnotations [StringAttribute "src" "logo.svg"]
--> an element with the attributes changed to the list provided
An
Elementrepresents the parameters of non-text nodes. It consists of an element name, a list of attributes, and a set of annotations.