@@ -8,8 +8,8 @@ module Text where
88# Creating Elements
99@docs leftAligned, rightAligned, centered, justified
1010
11−# Style and Links
12−@docs Style, style, Line, link
11+# Links and Style
12+@docs link, Style, style, Line, defaultStyle
1313
1414# Convenience Functions
1515
@@ -26,9 +26,9 @@ There are also a bunch of functions to set parts of a `Style` individually:
2626
2727import Basics (..)
2828import String
29−import Color (Color)
29+import Color (Color, black)
3030import Graphics.Element (Element, Three, Pos, ElementPrim, Properties)
31−import Maybe (Maybe)
31+import Maybe (Maybe, Nothing)
3232import JavaScript (JSString)
3333import Native.Text
3434
@@ -47,6 +47,27 @@ type Style =
4747 , line : Maybe Line
4848 }
4949
50+{-| Plain black text. It uses the browsers default typeface and text height.
51+No decorations are used:
52+
53+ { typeface = []
54+ , height = Nothing
55+ , color = black
56+ , bold = False
57+ , italic = False
58+ , line = Nothing
59+ }
60+-}
61+defaultStyle : Style
62+defaultStyle =
63+ { typeface = []
64+ , height = Nothing
65+ , color = black
66+ , bold = False
67+ , italic = False
68+ , line = Nothing
69+ }
70+
5071{-| Convert a string into text which can be styled and displayed. -}
5172toText : String -> Text
5273toText = Native.Text.toText