Hi,
You need to adjust code behind of the web part a little to make it display polls, forms and other elements which were inserted through CK (WYSIWYG) editor.
Please add these controls to the markup of the web part (
~/CMSWebParts/ModalWindow/ModalColorBox.ascx):
<asp:PlaceHolder runat="server" ID="mycontent">
<asp:Literal ID="ltlcontent" runat="server" EnableViewState="false" />
</asp:PlaceHolder>
And replace the original
else condition in SetupControl() method with the following:
else
{
ScriptHelper.RegisterScriptFile(this.Page, "~/CMSWebParts/ModalWindow/ModalColorBox_files/jquery.min.js");
ScriptHelper.RegisterScriptFile(this.Page, "~/CMSWebParts/ModalWindow/ModalColorBox_files/jquery.colorbox.js");
string webPartID = ValidationHelper.GetString(this.GetValue("WebPartControlID"), Guid.NewGuid().ToString());
ltlLink.Text = "<a class='inline' id='link' href='#" + webPartID + "'>" + LinkHTML + "</a>";
ltlcontent.Text = "<div><div id='" + webPartID + "' style='padding:10px; background:#fff;'>" + ContentHTML + "</div></div>";
CMS.ExtendedControls.ControlsHelper.ResolveDynamicControls(mycontent);
string contentScript = "var $ = jQuery.noConflict(); $(document).ready(function () { $(\".inline\").colorbox({ inline: true, width: \"" + ModalWidth + "\" }); });";
ScriptHelper.RegisterStartupScript(Page, typeof(Page), webPartID, ScriptHelper.GetScript(contentScript));
}
Best regards,
Filip Ligac