Loading editor/src/webedit_api.cpp +22 −0 Changes for editor/src/webedit_api.cpp: 22 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -1736,6 +1736,28 @@ std::string buildCanvasScript(const std::string &metaJson) { "rect:insertBtn.getBoundingClientRect()" "},'*');" "});" // --- Always-available "add element" bar --- // The hover "+" above only appears near an *existing* widget's edges, // so a brand-new/empty document (no "we-" elements at all) would have // no way to insert its first element. This bar is always present at // the end of the document and appends a new top-level element // (empty targetUuid = top-level, see insertNodeCore). "var addBar=document.createElement('div');" "addBar.textContent='+ Element hinzuf\\u00fcgen';" "addBar.style.cssText='margin:16px auto;max-width:280px;padding:10px 16px;" "text-align:center;background:#ff5722;color:#fff;border-radius:6px;cursor:pointer;" "font:14px/1.4 sans-serif;user-select:none;';" "document.body.appendChild(addBar);" "addBar.addEventListener('click',function(ev){" "ev.stopPropagation();" "window.parent.postMessage({" "type:'blogi-insert-request'," "targetUuid:''," "position:''," "rect:addBar.getBoundingClientRect()" "},'*');" "});" "})();</script>"; } Loading editor/widgets/googlemaps/googlemaps.cpp +2 −0 Changes for editor/widgets/googlemaps/googlemaps.cpp: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -106,9 +106,11 @@ namespace blogi { void Settings(libhttppp::HttpRequest &curreq, libhtmlpp::HtmlElement &settings) override {} void Render(libhtmlpp::HtmlElement &el) const override { std::string responsiveClass = std::string("we-") + getInstanceId().c_str(); libhtmlpp::HtmlElement *iframe = new libhtmlpp::HtmlElement("iframe"); std::string src = "https://maps.google.com/maps?q=" + _address + "&t=&z=" + _zoom + "&ie=UTF8&iwloc=&output=embed"; iframe->setAttribute("src", src.c_str()); iframe->setAttribute("class", responsiveClass.c_str()); iframe->setAttribute("width", "100%"); iframe->setAttribute("height", "450"); iframe->setAttribute("style", "border:0;"); Loading editor/widgets/googlereviews/googlereviews.cpp +2 −0 Changes for editor/widgets/googlereviews/googlereviews.cpp: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -66,8 +66,10 @@ namespace blogi { void Render(libhtmlpp::HtmlElement &el) const override { std::string uid = "gr_" + std::string(Id.c_str()); std::string responsiveClass = std::string("we-") + getInstanceId().c_str(); libhtmlpp::HtmlElement *container = new libhtmlpp::HtmlElement("div"); container->setAttribute("id", uid.c_str()); container->setAttribute("class", responsiveClass.c_str()); el.appendChild(container); libhtmlpp::ScriptElement js; Loading Loading
editor/src/webedit_api.cpp +22 −0 Changes for editor/src/webedit_api.cpp: 22 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -1736,6 +1736,28 @@ std::string buildCanvasScript(const std::string &metaJson) { "rect:insertBtn.getBoundingClientRect()" "},'*');" "});" // --- Always-available "add element" bar --- // The hover "+" above only appears near an *existing* widget's edges, // so a brand-new/empty document (no "we-" elements at all) would have // no way to insert its first element. This bar is always present at // the end of the document and appends a new top-level element // (empty targetUuid = top-level, see insertNodeCore). "var addBar=document.createElement('div');" "addBar.textContent='+ Element hinzuf\\u00fcgen';" "addBar.style.cssText='margin:16px auto;max-width:280px;padding:10px 16px;" "text-align:center;background:#ff5722;color:#fff;border-radius:6px;cursor:pointer;" "font:14px/1.4 sans-serif;user-select:none;';" "document.body.appendChild(addBar);" "addBar.addEventListener('click',function(ev){" "ev.stopPropagation();" "window.parent.postMessage({" "type:'blogi-insert-request'," "targetUuid:''," "position:''," "rect:addBar.getBoundingClientRect()" "},'*');" "});" "})();</script>"; } Loading
editor/widgets/googlemaps/googlemaps.cpp +2 −0 Changes for editor/widgets/googlemaps/googlemaps.cpp: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -106,9 +106,11 @@ namespace blogi { void Settings(libhttppp::HttpRequest &curreq, libhtmlpp::HtmlElement &settings) override {} void Render(libhtmlpp::HtmlElement &el) const override { std::string responsiveClass = std::string("we-") + getInstanceId().c_str(); libhtmlpp::HtmlElement *iframe = new libhtmlpp::HtmlElement("iframe"); std::string src = "https://maps.google.com/maps?q=" + _address + "&t=&z=" + _zoom + "&ie=UTF8&iwloc=&output=embed"; iframe->setAttribute("src", src.c_str()); iframe->setAttribute("class", responsiveClass.c_str()); iframe->setAttribute("width", "100%"); iframe->setAttribute("height", "450"); iframe->setAttribute("style", "border:0;"); Loading
editor/widgets/googlereviews/googlereviews.cpp +2 −0 Changes for editor/widgets/googlereviews/googlereviews.cpp: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -66,8 +66,10 @@ namespace blogi { void Render(libhtmlpp::HtmlElement &el) const override { std::string uid = "gr_" + std::string(Id.c_str()); std::string responsiveClass = std::string("we-") + getInstanceId().c_str(); libhtmlpp::HtmlElement *container = new libhtmlpp::HtmlElement("div"); container->setAttribute("id", uid.c_str()); container->setAttribute("class", responsiveClass.c_str()); el.appendChild(container); libhtmlpp::ScriptElement js; Loading