diff --git a/code/nel/include/nel/gui/group_html.h b/code/nel/include/nel/gui/group_html.h
index 8d3478579..f3418ff24 100644
--- a/code/nel/include/nel/gui/group_html.h
+++ b/code/nel/include/nel/gui/group_html.h
@@ -244,6 +244,8 @@ namespace NLGUI
std::string getURL() const { return _URL; }
void setURL(const std::string &url);
+ std::string getHTML() const { return _DocumentHtml; }
+ void setHTML(const std::string &html);
int luaBrowse(CLuaState &ls);
int luaRefresh(CLuaState &ls);
@@ -270,6 +272,7 @@ namespace NLGUI
REFLECT_LUA_METHOD("parseHtml", luaParseHtml)
REFLECT_LUA_METHOD("renderHtml", luaRenderHtml)
REFLECT_STRING("url", getURL, setURL)
+ REFLECT_STRING("html", getHTML, setHTML)
REFLECT_FLOAT("timeout", getTimeout, setTimeout)
REFLECT_EXPORT_END
@@ -378,6 +381,8 @@ namespace NLGUI
// Current URL
std::string _DocumentUrl;
std::string _DocumentDomain;
+ std::string _DocumentHtml; // not updated only set by first render
+
// Valid base href was found
bool _IgnoreBaseUrlTag;
// Fragment from loading url
diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp
index 7853ada77..35cdf2956 100644
--- a/code/nel/src/gui/group_html.cpp
+++ b/code/nel/src/gui/group_html.cpp
@@ -6000,6 +6000,12 @@ namespace NLGUI
browse(url.c_str());
}
+ void CGroupHTML::setHTML(const std::string &html)
+ {
+ renderHtmlString(html);
+ }
+
+
// ***************************************************************************
inline bool isDigit(ucchar c, uint base = 16)
{
diff --git a/code/nel/src/gui/group_html_parser.cpp b/code/nel/src/gui/group_html_parser.cpp
index b2a61c4f9..855e1fec8 100644
--- a/code/nel/src/gui/group_html_parser.cpp
+++ b/code/nel/src/gui/group_html_parser.cpp
@@ -335,6 +335,8 @@ namespace NLGUI
}
htmlFreeParserCtxt(parser);
+ if (success)
+ _DocumentHtml = htmlString;
return success;
}