protected override void Render(HtmlTextWriter writer) { writer.AddAttribute(HtmlTextWriterAttribute.Style, "background: transparent url(" + IOHelper.ResolveUrl(SystemDirectories.Umbraco) + "/plugins/WebBlocks/images/Logo.png) no-repeat right 8px; padding-top: 40px;"); writer.RenderBeginTag(HtmlTextWriterTag.Div); //render the checkbox stylesheet drop down writer.Write("<div style='padding-bottom:15px;'>"); writer.Write("<div><b>Choose the master stylesheet where your Wysiwyg styles come from (needed for Richtext editor style selection drop down):</b></div>"); writer.Write("<div>"); ChkStylesheetList.RenderControl(writer); writer.Write("</div></div>"); //render the block source node id text box writer.Write("<div style='padding-bottom:15px;'>"); writer.Write("<div><b>Input the root block source node id which all available blocks are located under:</b></div>"); writer.Write("<div>"); TxtBlockSourceNodeId.RenderControl(writer); writer.Write("</div></div>"); //render the backend script include text box writer.Write("<div style='padding-bottom:15px;'>"); writer.Write("<div><b>Input the javascript and css that should be added to this builder:</b></div>"); writer.Write("<div>"); TxtBackEndScriptInclude.RenderControl(writer); writer.Write("</div></div>"); writer.Write("<hr/>"); writer.Write("<div style='padding-bottom:15px;'>"); writer.Write("<div><b>Protected page username (required to render the preview of a protected page):</b></div>"); writer.Write("<div>"); TxtUsername.RenderControl(writer); writer.Write("</div></div>"); writer.Write("<div style='padding-bottom:15px;'>"); writer.Write("<div><b>Protected page password (required to render the preview of a protected page):</b></div>"); writer.Write("<div>"); TxtPassword.RenderControl(writer); writer.Write("</div></div>"); writer.RenderEndTag(); StringBuilder sb = new StringBuilder(); sb.AppendFormat( @"$(document).ready(function() {{ $('#{0}').val(decodeURI($('#{0}').val())); $('form').submit(function() {{ $('#{0}').val(encodeURI($('#{0}').val())); }}); }});", TxtBackEndScriptInclude.ClientID); Page.ClientScript.RegisterStartupScript(GetType(), "webBlocksEncoding", sb.ToString(), true); }