我試圖CKFinder與CKEDITOR 4.4.7集成,並獲得頁面加載以下錯誤:CKFinder產量:「類型錯誤:f.config未定義」
TypeError: f.config is undefined
ckfinder.js (line 6, col 12104)
...;var p=o.indexOf('?')!== -1?'&':'?';f.config.filebrowserBrowseUrl=o;f.config...
^^^^^^^^
這裏的示例頁面:
<script type='text/JavaScript' src='/includes/static/js/ckeditor/ckeditor.js'></script>
<script type='text/JavaScript' src='/includes/static/js/ckfinder/ckfinder.js'></script>
<p>entry box
<form action='test.php' method='post'>
<p>
<textarea class='ckeditor' id='citation' name='citation'>citation</textarea>
<script>
CKEDITOR.replace('citation', {
uiColor: '#FFF6DA',
allowedContent: true,
filebrowserBrowseUrl: '/includes/static/js/ckfinder/ckfinder.html',
filebrowserImageBrowseUrl: '/includes/static/js/ckfinder/ckfinder.html?type=Images',
filebrowserFlashBrowseUrl: '/includes/static/js/ckfinder/ckfinder.html?type=Flash',
filebrowserUploadUrl: '/includes/static/js/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
filebrowserImageUploadUrl: '/includes/static/js/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
filebrowserFlashUploadUrl: '/includes/static/js/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash',
height:100
});
CKEDITOR.instances['citation'].on('instanceReady', function() {
// Output self-closing tags the HTML4 way, like <br>.
this.dataProcessor.writer.selfClosingEnd = '>';
});
CKFinder.setupCKEditor('citation', '/includes/static/js/ckfinder/');
</script>
<input type='submit'>
</form>
上傳按鈕沒有被推測創建,因爲上面的f.config錯誤的:
這裏是CKEditor的/ config.js:
CKEDITOR.editorConfig = function(config) {
// The default plugins included in the basic setup define some buttons that
// are not needed in a basic editor. They are removed here.
config.removeButtons = 'Cut,Copy,Paste,Undo,Redo,Anchor,Underline,Strike,Subscript,Superscript';
config.extraPlugins = 'justify,onchange';
// Dialog windows are also simplified.
config.removeDialogTabs = 'link:advanced';
config.disableNativeSpellChecker = false;
};
和未修改ckfinder/config.js:
CKFinder.customConfig = function(config)
{
// Define changes to default configuration here. For example:
// config.skin = 'v1';
// config.language = 'fr';
};
什麼引起的f.config錯誤?
沒有CKEditor 4.7這樣的東西。 – Necreaux