Liking cljdoc? Tell your friends :D

std.html


generateclj

(generate elem)

generates string html for element

(generate (tree->node [:body [:div "hello"] "world"])) => "<body>\n <div>hello</div>world\n</body>"

generates string html for element

(generate (tree->node [:body [:div "hello"] "world"]))
=> "<body>\n  <div>hello</div>world\n</body>"
raw docstring

htmlclj

(html rep)

converts either node or tree representation to a html string

(html [:body [:div "hello"] "world"]) => "<body>\n <div>hello</div>world\n</body>"

converts either node or tree representation to a html string

(html [:body [:div "hello"] "world"])
=> "<body>\n  <div>hello</div>world\n</body>"
raw docstring

html-inlineclj

(html-inline rep)

emits body with no newline

(html-inline [:body [:div "hello"] "world"]) => "<body> <div>hello</div>world</body>"

emits body with no newline

(html-inline [:body [:div "hello"] "world"])
=> "<body>  <div>hello</div>world</body>"
raw docstring

inlineclj

(inline html)

emits function without any newlines

(inline (html [:body [:div "hello"] "world"])) => "<body> <div>hello</div>world</body>"

emits function without any newlines

(inline (html [:body [:div "hello"] "world"]))
=> "<body>  <div>hello</div>world</body>"
raw docstring

ITextcljprotocol

textclj

(text _)

nodeclj

(node rep)

converts either a string or tree representation to a Jsoup node

(node [:body [:div "hello"] "world"]) => org.jsoup.nodes.Element

converts either a string or tree representation to a Jsoup node

(node [:body [:div "hello"] "world"])
=> org.jsoup.nodes.Element
raw docstring

node->treecljmultimethod

converts a Jsoup node to tree

(-> (parse "<body><div>hello</div>world</body>") (node->tree)) => [:body [:div "hello"] "world"]

converts a Jsoup node to tree

(-> (parse "<body><div>hello</div>world</body>")
    (node->tree))
=> [:body [:div "hello"] "world"]
raw docstring

parseclj

(parse s)

reads a Jsoup node from string

(parse "<body><div>hello</div>world</body>") => org.jsoup.nodes.Element

reads a Jsoup node from string

(parse "<body><div>hello</div>world</body>")
=> org.jsoup.nodes.Element
raw docstring

selectclj

(select node query)

applies css selector to node

applies css selector to node
raw docstring

select-firstclj

(select-first node query)

gets the first match given selector and node

gets the first match given selector and node
raw docstring

tightenclj

(tighten html)

removes lines for elements that contain no internal elements

(tighten "<b>\nhello\n</b>") => "<b>hello</b>"

removes lines for elements that contain no internal elements

(tighten "<b>\nhello\n</b>")
=> "<b>hello</b>"
raw docstring

treeclj

(tree rep)

converts either a string or node representation into a tree

(tree +content+) => [:html {:id "3"} [:head [:title "First parse"]] [:body [:p "Parsed HTML into a doc."]]]

converts either a string or node representation into a tree

(tree +content+)
=> [:html {:id "3"}
    [:head [:title "First parse"]]
    [:body [:p "Parsed HTML into a doc."]]]
raw docstring

tree->nodeclj

(tree->node rep)

converts a tree to a Jsoup node

(tree->node [:body [:div "hello"] "world"]) => org.jsoup.nodes.Element

converts a tree to a Jsoup node

(tree->node [:body [:div "hello"] "world"])
=> org.jsoup.nodes.Element
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close