We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Documenteditor not rendering

DocumentEditorContainer is not showing. Other controls are not showing either. I don't get any errors, control is just not showing

cshtml file:

layout file:
 @RenderSection("Scripts", false)

 <!-- Syncfusion Essential JS 2 ScriptManager -->

<add key="UnobtrusiveJavaScriptEnabled" value="false" />

<add namespace="Syncfusion.EJ2"/>

js files:
ej2.min.js is loaded
material.css is loaded

7 Replies

RT Ramya Thirugnanam Syncfusion Team March 5, 2019 12:18 AM

Hi Roy,  
Thanks for contacting Syncfusion support.  
We are not able to reproduce the reported issue from our side. For your convenience, we have prepared a demo sample for DocumentEditor in ASP.NET MVC 5. Please find the sample from below link.  
Ramya T 

UN Unknown March 5, 2019 04:51 AM

Hello Ramya,

Thank you for the quick reply and the example.
I have looked at the example and when I run this example everything works well. But when trying to get it to work in our application it doesn't show anything. Also simple control like a datepicker isn't working. It is just adding empty tags like this

  <input id="MyFirstDatepicker">
  <documenteditor-container id="container" style="height: 1023px;"></documenteditor-container>
The controls are added in a partial view, maybe this a problem?



RT Ramya Thirugnanam Syncfusion Team March 5, 2019 06:08 AM

Hi Roy,   
Could you please provide us the simple sample or code example to replicate the reported issue or to represent your scenario?  This will help us to investigate on the reported issue and provide you the appropriate solution at earliest. 
Ramya T 

UN Unknown March 11, 2019 03:40 PM

Hello Ramya,

I'm sorry for my late reply. It wasn't possible to send the project as it is a part of a bigger project and the code can't be shared. I figured it out why it was not showing. Because it is loading within a partial view I had to add the following code to the partial view itself

<!-- Syncfusion Essential JS 2 ScriptManager -->

It is showing but I'm not possible to load a document yet. I added the following line of code in the view, like the example you send me.


at application start we have the following routing in RegisterRoutes

 //ASP.NET Web API Route Config
                name: "DefaultApi",
                routeTemplate: "api/{controller}/{id}",
                defaults: new { id = RouteParameter.Optional }

And we have a controller

    public class DocumentEditorController : ApiController
        public HttpResponseMessage Import()
            if (HttpContext.Current.Request.Files.Count == 0)
                return null;

            HttpPostedFile file = HttpContext.Current.Request.Files[0];
            int index = file.FileName.LastIndexOf('.');
            string type = index > -1 && index < file.FileName.Length - 1 ?
                file.FileName.Substring(index) : ".docx";
            Stream stream = file.InputStream;
            stream.Position = 0;

            EJ2WordDocument document = EJ2WordDocument.Load(stream, GetFormatType(type.ToLower()));
            string json = Newtonsoft.Json.JsonConvert.SerializeObject(document);
            return new HttpResponseMessage() { Content = new StringContent(json) };

        internal static Syncfusion.EJ2.DocumentEditor.FormatType GetFormatType(string format)
            if (string.IsNullOrEmpty(format))
                throw new NotSupportedException("EJ2 DocumentEditor does not support this file format.");
            switch (format.ToLower())
                case ".dotx":
                case ".docx":
                case ".docm":
                case ".dotm":
                    return Syncfusion.EJ2.DocumentEditor.FormatType.Docx;
                case ".dot":
                case ".doc":
                    return Syncfusion.EJ2.DocumentEditor.FormatType.Doc;
                case ".rtf":
                    return Syncfusion.EJ2.DocumentEditor.FormatType.Rtf;
                case ".txt":
                    return Syncfusion.EJ2.DocumentEditor.FormatType.Txt;
                case ".xml":
                    return Syncfusion.EJ2.DocumentEditor.FormatType.WordML;
                    throw new NotSupportedException("EJ2 DocumentEditor does not support this file format.");

        public string ImportWordDocument(Stream stream)
            string sfdtText = "";
            EJ2WordDocument document = EJ2WordDocument.Load(stream, Syncfusion.EJ2.DocumentEditor.FormatType.Docx);
            sfdtText = Newtonsoft.Json.JsonConvert.SerializeObject(document);
            return sfdtText;

RT Ramya Thirugnanam Syncfusion Team March 12, 2019 04:35 AM

Hi Roy, 
We were unable to reproduce the reported issue.  A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates . 
Ramya T 

CB Christo Bosch August 19, 2022 03:15 AM

Good day,

am using document editor and it works fine on all browsers, However on the latest Firefox the font is not visible when typing. What is likely to be the cause of that and what can i do to fix that issue  


SM Suriya Murugan Syncfusion Team August 24, 2022 12:02 AM

Hi Christo,

Can you please share your document editor version and firefox version details with environment details?

If possible, please share simple sample to check this issue in our side?


Suriya M.

Live Chat Icon For mobile
Up arrow icon