3
package.json
의 :ckeditor : 홈 디렉토리 오류
"browser": {
"ckeditor": "./public/ckeditor/ckeditor.js",
"bootstrap": "./public/bootstrap/js/bootstrap.js"
}
browserify
coffee-script
파일 : 크롬 브라우저 콘솔에서
$ = jQuery = require 'jquery-browserify'
ckeditor = require 'ckeditor'
jqueryCkeditor = require '../ckeditor/adapters/jquery.js'
$('#Info').ckeditor()
오류 :
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:4042/config.js?t=E7KD
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:4042/skins/moono/editor.css?t=E7KD
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:4042/lang/en.js?t=E7KD
Uncaught TypeError: Cannot set property 'dir' of undefined ckeditor.js:219
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:4042/skins/moono/editor.css?t=E7KD
이 겉으로 ckeditor
대포 찾기 홈 디렉토리 : /ckeditor
. 그것을 도울 방법?
업데이트
작업 소스 코드 :
$ = jQuery = require 'jquery'
window.CKEDITOR_BASEPATH = '/ckeditor/'
ckeditor = require 'ckeditor'
jqueryCkeditor = require '../ckeditor/adapters/jquery.js'
$ ->
CKEDITOR.replace("Info")
http://docs.ckeditor.com/#!/guide/dev_basepath 당신을 감사합니다. 나는 이것을 시도했지만 동일한 오류가 발생했습니다. –
CKEditor를 포함하기 전에 해당 변수를 설정 했습니까? 왜냐하면 CKEditor 스크립트가 해당 변수에 액세스 할 수 있다면 무엇인가가 변경되어야한다고 확신하기 때문입니다. 어쩌면 당신이 정말로 그것이 글로벌인지 확인해야 할 것입니다 (그래서'window.CKEDITOR_BASEPATH' 같은 것을 사용하십시오)? – Reinmar