ng-ckeditor icon indicating copy to clipboard operation
ng-ckeditor copied to clipboard

Cannot set property 'dir' of undefined

Open msnpr567 opened this issue 10 years ago • 17 comments

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?

msnpr567 avatar Feb 11 '15 12:02 msnpr567

i have exactly the same issue and also using a gruntfile to build the project

delaware avatar Mar 19 '15 10:03 delaware

if i'm using the ckeditor over cdn it works:

delaware avatar Mar 19 '15 10:03 delaware

Maybe you have to specify CKEDITOR_BASEPATH='path/to/ckeditor/' before loading your scripts. I have the similar problem and it saved me !

aguerre avatar Mar 19 '15 11:03 aguerre

can you provide an example

Hugolboss avatar May 30 '15 19:05 Hugolboss

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'

swapnilchincholkar avatar Jun 04 '15 13:06 swapnilchincholkar

I have the same error in the same scenario (grunt script to build bowercomponents), any solution?

gerardp avatar Jul 20 '15 10:07 gerardp

I am facing the same issue with the grunt build. Any updates on this?

girishmivim avatar Jul 23 '15 13:07 girishmivim

Updates?

pdore-netfore avatar Nov 06 '15 13:11 pdore-netfore

same thing here...

b3n01t avatar Dec 07 '15 21:12 b3n01t

me too same error..

youngho avatar Dec 18 '15 11:12 youngho

@swapnilchincholkar your solution worked for me (using a Rails app) many thanks :)

AndrewCowle avatar Dec 21 '15 08:12 AndrewCowle

@drewski85 Welcome !!! :-)

swapnilchincholkar avatar Dec 21 '15 08:12 swapnilchincholkar

For people with the error, here the doc : http://docs.ckeditor.com/#!/guide/dev_basepath

JosselinTD avatar Jan 21 '16 14:01 JosselinTD

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).

exu avatar Feb 24 '17 06:02 exu

updates?

A-Allam avatar Aug 05 '17 13:08 A-Allam

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>

JWTappert avatar Dec 21 '17 16:12 JWTappert

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

mohammadkhoeini avatar Mar 12 '18 05:03 mohammadkhoeini