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
close icon

RTE not loading

HI,

i started a new MVC 5 Project in VB.NET and only selected the RTE Element for that project. Libraries are loaded in _Layout.vbhtml

@Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/modernizr")
     <link rel='nofollow' href="@Url.Content("~/Content/ej/web/Default-theme/ej.widgets.all.min.css")" rel="stylesheet"/>
     <script src="@Url.Content("~/Scripts/jquery-1.10.2.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jsrender.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery.easing-1.3.min.js")"></script>   
    <script src="@Url.Content("~/Scripts/jquery.globalize.min.js")"></script>
    <script src="@Url.Content("~/Scripts/ej/ej.web.all.min.js")"></script>
    <script src="@Url.Content("~/Scripts/ej/ej.unobtrusive.min.js")"></script>
...
    @code
        Html.EJ().ScriptManager()
    End Code

in my web.config the following assebmlies are loaded:
<compilation debug="true" targetFramework="4.5">
      <assemblies>
        <add assembly="Syncfusion.Core, Version=12.4450.0.24, Culture=neutral, PublicKeyToken=632609B4D040F6B4" />
        <add assembly="Syncfusion.Compression.Base, Version=12.4450.0.24, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
        <add assembly="Syncfusion.EJ, Version=12.4450.0.24, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
        <add assembly="Syncfusion.EJ.Mvc,Version=12.4500.0.24, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
        <add assembly="Syncfusion.Linq.Base, Version=12.4450.0.24, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
        <add assembly="Syncfusion.XlsIO.Base, Version=12.4450.0.24, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
        <add assembly="Syncfusion.EJ.Olap,Version=12.4450.0.24, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
        <add assembly="Syncfusion.Olap.Base, Version=12.4450.0.24, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
      </assemblies>
    </compilation>
...
<compilation debug="true" targetFramework="4.5">
      <assemblies>
        <add assembly="Syncfusion.Core, Version=12.4450.0.24, Culture=neutral, PublicKeyToken=632609B4D040F6B4" />
        <add assembly="Syncfusion.Compression.Base, Version=12.4450.0.24, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
        <add assembly="Syncfusion.EJ, Version=12.4450.0.24, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
        <add assembly="Syncfusion.EJ.Mvc,Version=12.4500.0.24, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
        <add assembly="Syncfusion.Linq.Base, Version=12.4450.0.24, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
        <add assembly="Syncfusion.XlsIO.Base, Version=12.4450.0.24, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
        <add assembly="Syncfusion.EJ.Olap,Version=12.4450.0.24, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
        <add assembly="Syncfusion.Olap.Base, Version=12.4450.0.24, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
      </assemblies>
    </compilation>

But when i try to instantiate a rte in my view with:

@Html.EJ.RTE("Test")

or 
@Html.EJ.RTEFor(Function(model) model.Content)

i am just seeing a textarea with content: <div></div>

it seems to me that the Client Part of the Editor is not loaded, but i have no idea why.

thanks for your help.

kind regards
lc

Attachment: syncfusion_error_image_c4181ae0.rar

7 Replies

KC Kasithangam C Syncfusion Team March 9, 2015 07:39 AM UTC

Hi Ic,

 

We have analyzed your query and we suspect that the problem here is, not proper configuration in the following cases.

 

1. Ensure the following basic syncfusion DLL’s are referred in your application or not.

       Syncfusion.EJ.dll

       Syncfusion.Ej.mvc.dll

 

2. In our application we have web.config file present in the Application -> Views Folder -> web.config file. In that, we need to include the following namespace.

 

Please add the following code snippet to Views web.config file.

 

<code>

[web.config]

<system.web.webPages.razor>

    <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

    <pages pageBaseType="System.Web.Mvc.WebViewPage">

      <namespaces>

        <add namespace="Syncfusion.JavaScript" />

        <add namespace="Syncfusion.MVC.EJ" />

      </namespaces>

    </pages>

  </system.web.webPages.razor>

</code>

 

We have a documentation to create our component in ASP.NET MVC which explains full details about how to use our controls and what are the references, script files are and CSS files are needed to add for an application in MVC and please find the below documentation link to create the MVC project manually with our components.

 

http://help.syncfusion.com/ug/js/default.htm#!Documents/createmanually.htm

 

 

For your convenience, we have prepared the simple sample to create the RTE component and please find the sample under the following link.

 

Sample Link: Sample

 

Could you please check with the above sample? If still you face any problem, please get back to us we will be happy to serve you.

 

Kindly let us know if you have further queries,

Regards,

Kasithangam



LC lc March 10, 2015 10:05 AM UTC

the sample worked fine for me. after many tries getting this to work following line helped
<add key="UnobtrusiveJavaScriptEnabled" value="true" />


KC Kasithangam C Syncfusion Team March 11, 2015 06:38 AM UTC

Hi Ic,

We would like to suggest that, when we set the value of “UnobstrusiveJavascriptEnabled” as false in the web.config file, RTE control doesn’t render properly. To resolve this issue, we need to refer our EJ ScriptManager under the @RenderBody() in _Layout.vbhtml page. Please find the below code for the same,

<code>

[_Layout.vbhtml]

<div class="container body-content">

        @RenderBody()

        @Html.EJ().ScriptManager()

    </div>

    @RenderSection("scripts", required:=False)

</code>

If still you face any problem please get back to us. We will be happy to help you out.

Regards,

Kasithangam




LC lc March 12, 2015 02:27 PM UTC

Hi Kasithangam,
the default Syncfusion MVC _Layout.vbhtml has the following part of code:

<div class="container body-content">
        @RenderBody()
        <hr />
        <footer>
            <p>&copy; @DateTime.Now.Year - My ASP.NET Application</p>
        </footer>
</div>
     @code
        Html.EJ().ScriptManager()
    End Code

Unfortunately the View is only showing a Textarea and not the RTE with “UnobstrusiveJavascriptEnabled” as false.  

Due to legal reasons i cannot post my current project, but fortunately a new set up project (using Syncfusion Wizard) is dealing with the same problem. I have edited Home/Index to display the error. See attachment: Due to upload errors the file can be found here: SyncfusionRTETestApplication.rar

Kind regards,

lc



KC Kasithangam C Syncfusion Team March 13, 2015 06:30 AM UTC

Hi Ic,

We have checked with your provided code. We found that, the EJ ScriptManager render code is used in the _Layout.vbhtml page which causes the specified RTE control doesn’t rendering. To resolve this issue, we need to specify @ symbol before EJ ScriptManager, this is the format we need to specify script manager and our controls rendering in MVC.Please find the below code for same,

<code>

    <div class="container body-content">

        @RenderBody()

        <hr />

        <footer>

            <p>&copy; @DateTime.Now.Year - My ASP.NET Application</p>

        </footer>

    </div>

     

     @Html.EJ().ScriptManager()

</code>

And also, we have modified your sample that you have attached. Please find the below modified sample link,

        Sample: RTE Sample

        Please let us know if you have further queries.

        Regards,

        Kasithangam




LC lc March 14, 2015 07:54 AM UTC

Thank you for your detailed help!

Changing this part to @Html.EJ().ScriptManager() worked for the project.

Maybe this is an issue for the wizard?


KC Kasithangam C Syncfusion Team March 16, 2015 07:41 AM UTC

Hi Ic,

Thanks for your update,

Query: Changing this part to@Html.EJ().ScriptManager()worked for the project.Maybe this is an issue for the wizard?

We would like to inform you that, this is not an issue in our side. This is the proper format we are maintaining the script manager and thanks for sharing your information.

Please let us know if you have further queries.

Regards,

Kasithangam


Loader.
Live Chat Icon For mobile
Up arrow icon