[CLOSED] How to integrate CKEditor for ASP.NET with Ext.NET component

  1. #1

    [CLOSED] How to integrate CKEditor for ASP.NET with Ext.NET component

    Hi,
    How to integrate both CKEditor and Ext.Net components in an asp.net project without making conflict ?
    Last edited by Daniil; Oct 22, 2012 at 1:04 PM. Reason: [CLOSED]
  2. #2
    Hi @Daly_AF,

    As far as I can know someone on the forums use CKEditor with Ext.NET without any problems.

    Please clarify what is the conflict?
  3. #3
    Hi Daniil,

    I want to render programmtically, in c# code, a view that contains a CKEditor component but I failed in it.
    I try to do it with markup and I succeeded, but when trying to make same thing but programmatically this time , nothing is happened.
    I will be thankfull if you give me examples or a right way to do it.

    Regards.
    Daly_AF
  4. #4
    Unfortunately, I don't know how to render a CKEditoron the fly.

    What does their docs, tutorials tell on this topic?
  5. #5
    Hi Daniil
    I reproduced the issue in the code below :
    Controller Code:
        public class ResearchController : Controller
        {
            public FormPanel CreateFP()
            {
                FormPanel fp = new FormPanel();
                fp.ID = "_fp";
                TextField txtField = new TextField();
                txtField.FieldLabel = "Txt";
                txtField.Text = "test";
                CKEditor.NET.CKEditorControl ckeditor = new CKEditor.NET.CKEditorControl();
                fp.Content = ckeditor as System.Web.UI.ITemplate;
                fp.Items.Add(txtField);
                return fp;
            }
    
            public ContentResult LoadFP(String containerID)
            {
                ContentResult cr = new ContentResult();
                cr.Content = string.Format("<script>{0}</script>",
                    CreateFP().ToScript(
                    RenderMode.AddTo,
                    containerID));
    
                return cr;
            }
    
            public ActionResult Research()
            {
                return View();
            }
        }
    Aspx code :
    <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
    
    <%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <link type="text/css" rel="stylesheet" href="../../Resources/css/StyleManager.css" />
        <script src="../../Scripts/jquery-1.6.2.js" type="text/javascript"></script>
        </script>
    </head>
    <ext:ResourceManager runat="server">
    </ext:ResourceManager>
    <body>
        <form id="Form1" runat="server">
        <ext:Viewport runat="server">
            <Items>
                <ext:Panel runat="server" ID="_pnl" Border="false" Header="false" Region="Center">
                    <AutoLoad Url="/Research/LoadFP" NoCache="true">
                        <Params>
                            <ext:Parameter Name="containerID" Value="#{_pnl}" Mode="Value" />
                        </Params>
                    </AutoLoad>
                </ext:Panel>
            </Items>
        </ext:Viewport>
        </form>
    </body>
    </html>
  6. #6
    Please try
    fp.ContentControls.Add(ckeditor);
    instead of
    fp.Content = ckeditor as System.Web.UI.ITemplate;
    Also please do not use ContentControls (Content in markup) and Items at the same time.
  7. #7
    Hi Daniil
    Thank you for your help.
    This is the result within a screenshot I obtain a textarea instead ckeditor :
    Click image for larger version. 

Name:	Ckeditor.png 
Views:	110 
Size:	20.9 KB 
ID:	4939
  8. #8
    I also see a TextField on the screen-shot. Please review this comment.

    Quote Originally Posted by Daniil View Post
    Also please do not use ContentControls (Content in markup) and Items at the same time.

Similar Threads

  1. [CLOSED] Integrate .NET Data annotations with Ext .NET Controls
    By T3rryChan in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 18, 2011, 3:06 PM
  2. Replies: 0
    Last Post: Apr 12, 2011, 3:32 PM
  3. [CLOSED] Best practice to integrate custom/generic plugins
    By anup in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Feb 01, 2011, 3:15 PM
  4. [CLOSED] Integrate Add capability into the custom search
    By SFritsche in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 08, 2009, 8:02 PM
  5. Replies: 1
    Last Post: May 22, 2009, 7:38 AM

Posting Permissions