#ifndef LIPSUM_BUILD_STATIC
# define LIPSUM_IMPLEMENTATION
#endif
#ifdef __EMSCRIPTEN__
# include <emscripten.h>
#endif
int main()
{
std::string text = gen.
fmt_text(30, lpsm::HTML);
std::cout << text << "\n\n";
#ifdef __EMSCRIPTEN__
EM_ASM({
const htmlText = UTF8ToString($0);
const contentElem = document.createElement("div");
contentElem.innerHTML = htmlText;
document.querySelector("body").appendChild(contentElem);
}, text.c_str());
#endif
return 0;
}
Main class of lipsum-cpp.
Definition generator.hpp:92
void change_setting(const std::string &setting, const ArgVec2 &value)
Change a setting.
Definition generatorcore.inl:131
std::string fmt_text(int numElements=15, bool useHtml=false)
Generate a Markdown or HTML document.
Definition generatorformats.inl:53
Main header of lipsum-cpp.