Sultan
Sultan

Reputation: 700

CKEDITOR It does not work on Server Hosting

I can not find a solution to this dilemma that looks tired I did not find a solution where it's running on the local server and do not work on the server hosting where you wonder if the problem did not work all the obligations in your opinion what is the solution!

@Html.TextAreaFor(model => model.Name)

@section scripts{
    <script src="~/Scripts/jquery-1.10.2.min.js"></script>
    <script src="~/Scripts/jquery.validate.min.js"></script>
    <script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>        
    <script src="~/Scripts/ckeditor/ckeditor.js"></script>

    <script type="text/javascript">
    var editor = CKEDITOR.instances['Name'];
    if (editor) { editor.instances(true); }
    CKEDITOR.replace('Name', {
        enterMode: CKEDITOR.ENTER_BR,
    });


    </script>

}

in Web.config

  <add key="CKEDITOR_BASEPATH" value="/Scripts/ckeditor/"/>

Upvotes: 0

Views: 1808

Answers (1)

Sultan
Sultan

Reputation: 700

And finally reached a solution

@Html.TextAreaFor(model => model.Name)
<script src="http://Domain/ckeditor/ckeditor.js"></script>
    <script src="~/Scripts/jquery.validate.min.js"></script>
    <script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
    <script src="~/Scripts/ckeditor/ckeditor.js"></script>

    <script type="text/javascript">
    var editor = CKEDITOR.instances['QustionName'];
    if (editor) { editor.instances(true); }
    CKEDITOR.replace('QustionName', {
        enterMode: CKEDITOR.basePath,
    });

    </script>

in Web.config

<add key="CKEDITOR_BASEPATH" value="/Scripts/ckeditor/"/>

What I did was that

  1. I went to NuGet-Package-manager and ckeditor-basic.
  2. and go to http://ckeditor.com/download And I built the appropriate additions.
  3. Raise your chosen additions in hosting a folder in a special folder.
  4. Add Scripts precedes all lead to file appropriate additions ckeditor.js.

And Run Everything became okay.

<script src="http://Domain/ckeditor/ckeditor.js"></script>

Upvotes: 1

Related Questions