Skip to main content

textarea_named

Function textarea_named 

Source
pub fn textarea_named(name: impl AsRef<str>) -> Element
Expand description

A <textarea name="…">. Its value is its text.

The value is escaped on entry, so a </textarea> inside it cannot close the element, and the whitespace inside is rendered exactly as given.

§Examples

use molt::prelude::*;
assert_eq!(
    textarea_named("bio").text("Hi <b>").render(),
    r#"<textarea name="bio">Hi &lt;b&gt;</textarea>"#
);