6#ifndef CWIST_HTML_BUILDER_H
7#define CWIST_HTML_BUILDER_H
10#include <cjson/cJSON.h>
void cwist_html_element_add_child(cwist_html_element_t *el, cwist_html_element_t *child)
Add a child element.
void cwist_html_element_add_attr(cwist_html_element_t *el, const char *key, const char *value)
Add an attribute to an element.
void cwist_html_element_set_id(cwist_html_element_t *el, const char *id)
Set the id attribute.
void cwist_html_element_destroy(cwist_html_element_t *el)
Destroy an HTML element and its children.
void cwist_html_element_add_class(cwist_html_element_t *el, const char *class_name)
Add a CSS class.
cwist_sstring * cwist_html_render(cwist_html_element_t *el)
Render the element tree to an HTML string.
cwist_html_element_t * cwist_html_element_create(const char *tag)
Create a new HTML element.
struct cwist_html_element cwist_html_element_t
void cwist_html_element_set_text(cwist_html_element_t *el, const char *text)
Set inner text.
Safe string type with helper methods.
cwist_sstring * inner_text
struct cwist_html_element ** children