ng-ckeditor
ng-ckeditor copied to clipboard
Cannot set property 'dir' of undefined
hello,
Im using ng-ckeditor in my application. Im using this in angularjs app in sailsjs project.
GET http://localhost:1337/js/vendor/ckeditor_config.js?t=DAED 404 (Not Found) vendor.min.js:21 GET http://localhost:1337/skins/moono/editor.css?t=DAED 404 (Not Found) vendor.min.js:21 GET http://localhost:1337/lang/en.js?t=DAED 404 (Not Found) vendor.min.js:21 Uncaught TypeError: Cannot set property 'dir' of undefined
Im geting above errors . im using grunt script to build bowercomponents and configure path to ckeditor them in uglify.js. can u provide any solution for this?
i have exactly the same issue and also using a gruntfile to build the project
if i'm using the ckeditor over cdn it works:
Maybe you have to specify CKEDITOR_BASEPATH='path/to/ckeditor/' before loading your scripts. I have the similar problem and it saved me !
can you provide an example
I have rails application with angular.js and I was facing the same issue. I kept all my ckeditor related files and sub-directories under "app/assets/javascripts/ckeditor/" So in my layout.html.haml file I added below code to initialise basepath before including application.js
In other frameworks what you should do is, before including ckeditor.js and related dependancies, add code to initialise base-path.
%script
var CKEDITOR_BASEPATH = '/assets/ckeditor/';
= javascript_include_tag 'application'
I have the same error in the same scenario (grunt script to build bowercomponents), any solution?
I am facing the same issue with the grunt build. Any updates on this?
Updates?
same thing here...
me too same error..
@swapnilchincholkar your solution worked for me (using a Rails app) many thanks :)
@drewski85 Welcome !!! :-)
For people with the error, here the doc : http://docs.ckeditor.com/#!/guide/dev_basepath
Another reason (even when you have CKEDITOR_BASEPATH properly set) could be invalid file and dir permissions to directories inside ckeditor library (that was my case).
updates?
I am using Angular 4.x and ran into the same issues. Note: I am not using the ng-ckeditor as I wanted to create my own component wrapper.
To fix this I simply added the CDN to my index.html file in the head.
<head>
<meta charset="utf-8">
<title>{{ title }}</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.png">
<script src="https://cdn.ckeditor.com/4.5.11/full/ckeditor.js"></script>
</head>
just download the hole file from website and use a link through that folder. js file that you included inside your website need some files that should be in exact same root as the js file is. in case you cant place them in same root use this code above your js link in your website to tell js file where is the place of files that js file needs.
- just copy same folder you downloaded from website and use it exactly way it is