docdef/source/elements/implementations/text.ts

48 lines
452 B
TypeScript
Raw Normal View History

2024-02-07 15:14:30 +01:00
/**
*/
class type_element_text implements type_element
{
/**
*/
private content : string;
/**
*/
public constructor(
content : string
)
{
this.content = content;
}
/**
* @implementation
*/
public render_html(
) : string
{
return (
"<span class=\"ds-text\">"
+
this.content
+
"</span>\n"
);
}
}
element_kind_register(
"text",
(data) => (
new type_element_text(
data["content"]
)
)
);