Note that there are some explanatory texts on larger screens.

plurals
  1. POCKEditor wih AjaxControlToolkit's ModalPopup
    primarykey
    data
    text
    <p>I have got *.ascx control with Ckeditor embedded by using CKEditor's control for ASP.NET (v 3.6.4). I have also ModalPopup control from AjaxControolToolkit4.5, attached to Link Button. When clicked, it shows panels with Radio Button list filled in with the aid of some code behind logic.</p> <p>How should I change my *.ascx control to have a CKEditor'a plugin button in toolbar, firing this ModalPopup?</p> <p>Code (not working):</p> <pre><code>&lt;%@ Control Language="C#" AutoEventWireup="true" CodeFile="CKEditorWithModalPopup.ascx.cs" Inherits="Controls_CKEditorWithModalPopup" %&gt; &lt;%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %&gt; &lt;%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %&gt; &lt;script type="text/javascript"&gt; $(function () { var a = { exec: function (editor) { javascript: __doPostBack('ctl03$LinkButton1', '') // explicite id for test } }, b = 'modalPopup'; CKEDITOR.plugins.add(b, { init: function (editor) { editor.addCommand(b, a); editor.ui.addButton("modalPopup", { label: 'Modal Popup', icon: "~/Images/modal_popup.png", command: b }); } }); }); &lt;/script&gt; &lt;CKEditor:CKEditorControl ID="CKEditor1" BasePath="~/ckeditor" Toolbar="Basic" runat="server" /&gt; &lt;ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender" runat="server" TargetControlID="LinkButton1" PopupControlID="Panel1" BackgroundCssClass="modalBackground" OkControlID="OkButton" CancelControlID="CancelButton" DropShadow="true" PopupDragHandleControlID="Panel3" /&gt; &lt;asp:LinkButton ID="LinkButton1" runat="server" Text="Click here to change the paragraph style" /&gt; &lt;asp:Panel ID="Panel1" runat="server" Style="display: none" CssClass="modalPopup"&gt; &lt;asp:Panel ID="Panel3" runat="server" Style="cursor: move; background-color: #DDDDDD; border: solid 1px Gray; color: Black"&gt; &lt;div&gt; &lt;p&gt; Choose the phrase to insert:&lt;/p&gt; &lt;/div&gt; &lt;/asp:Panel&gt; &lt;asp:RadioButtonList ID="rbList" runat="server" /&gt; &lt;p style="text-align: center;"&gt; &lt;asp:Button ID="OkButton" runat="server" Text="OK" /&gt; &lt;asp:Button ID="CancelButton" runat="server" Text="Cancel" /&gt; &lt;/p&gt; &lt;/asp:Panel&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload