I have a simple page...and i use ckeditor it works just fine o the localhost but wen i publish to azure it dose-nt work anymore... here is the site http://testckedit.azurewebsites.net/ the code:
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.js",
"~/Scripts/respond.js",
"~/Scripts/ckeditor/ckeditor.js"
));
and the View:
@{
ViewBag.Title = "Index";
}
<h2>Index</h2>
<div class='description'>
<p>
This editor is using an <code><iframe></code> element-based editing area, provided by the <strong>Wysiwygarea</strong> plugin.
</p>
</div>
<textarea cols="80" id="editor1" name="editor1" rows="10"></textarea>
@section scripts{
<script>
$(document).ready(function () {
// This call can be placed at any point after the
// <textarea>, or inside a <head><script> in a
// window.onload event handler.
// Replace the <textarea id="editor"> with an CKEditor
// instance, using default configurations.
CKEDITOR.replace("editor1");
});
</script>}
<p>
<input type="submit" value="Submit">
</p>
i got a few error at console:
Failed to load resource: the server responded with a status of 404 (Not Found) /config.js?t=DBAA
Failed to load resource: the server responded with a status of 404 (Not Found) /skins/moono/editor.css?t=DBAA
Failed to load resource: the server responded with a status of 404 (Not Found) /lang/ro.js?t=DBAA
Uncaught TypeError: Cannot set property 'dir' of undefined
I think that setting CKEDITOR.basePath
should do the trick for you.
Set window.CKEDITOR_BASEPATH properly, like window.CKEDITOR_BASEPATH = 'http://localhost/public/resources/ckeditor/';
window.CKEDITOR_BASEPATH should have the proper path of the ckeditor folder which contains plugins,skins and other folders, js files with utility functions.
window.CKEDITOR_BASEPATH will set CKEDITOR.basePath autometically.
Try to set window.CKEDITOR_BASEPATH before requiring ckeditor.js
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With