view
is a HtmlData.Html msg
toElmHtml view
returns Html msg
a regular elm/html value. It's interactive, like normal, able to update our Model
1. Try entering html into the textarea below
2. Manually empty the values of each input below, then click +
button to get count >= 10 and see what HtmlData.Keyed is about
Alphabetical sort: ["1","2","3","4"]
toTextHtml view
returns String
html value; useful for server side rendering.<div name="hello">"><p><b>1. Try entering html into the textarea below</b></p><textarea><em>Hello</em>, world!</textarea><div><em>Hello</em>, world!</div><p style="margin-top:2em"><b>2. Manually empty the values of each input below</b>, then click <code>+</code> button to get count >= 10 and see what <a href="https://guide.elm-lang.org/optimization/keyed.html">HtmlData.Keyed</a> is about</p><div><button>-</button><div>Count = 4</div><button>+</button></div><p>Alphabetical sort: ["1","2","3","4"]</p><div><div><h2>Default</h2><ol><li><input defaultValue="1"></input> defaultValue = 1</li><li><input defaultValue="2"></input> defaultValue = 2</li><li><input defaultValue="3"></input> defaultValue = 3</li><li><input defaultValue="4"></input> defaultValue = 4</li></ol></div><div><h2>Keyed</h2><ol><li><input defaultValue="1"></input> defaultValue = 1</li><li><input defaultValue="2"></input> defaultValue = 2</li><li><input defaultValue="3"></input> defaultValue = 3</li><li><input defaultValue="4"></input> defaultValue = 4</li></ol></div><div style="clear:both"></div></div></div>
toTextPlain view
returns String
plain text with a textual layout that mimics html; useful for text/plain emails or console output!1. Try entering html into the textarea below <em>Hello</em>, world! Hello, world! 2. Manually empty the values of each input below, then click + button to get count >= 10 and see what HtmlData.Keyed https://guide.elm-lang.org/optimization/keyed.html is about - Count = 4 + Alphabetical sort: ["1","2","3","4"] Default 1. defaultValue = 1 2. defaultValue = 2 3. defaultValue = 3 4. defaultValue = 4 Keyed 1. defaultValue = 1 2. defaultValue = 2 3. defaultValue = 3 4. defaultValue = 4