Jadelet Example Garden

HTML

Jadelet templates are safe by default. Any text that Jadelet presents is properly escaped. You can output raw HTML by returning an element instead of a string. This can be dangerous if you're allowing arbitrary input submitted by people on the internet. Good luck!

div
  = @html
element = Template
  html: ->
    div = document.createElement 'div'

    div.innerHTML = """
      <h1>
        Hello
      </h1>
      <p>From <i>HTML</i>!</p>
    """

    return div