java ckfinder 图片重命名,CKEditor CKFinder图片上传
我在PHP 5.6上使用CKEditor 4.5.2和CKFinder 3.0.0 . 通常集成工作正常 - 當我單擊CKEditor圖像按鈕時,我可以單擊“瀏覽服務器”按鈕并打開CKFinder,我可以選擇圖像,也可以上傳 .
什么不起作用是image2對話框中的“上傳”標簽 . 我總是收到錯誤消息“請求的資源類型無效” . 當我點擊“發送到服務器”按鈕 .
在我的CKFinder配置中,我定義了兩種名為 Images 和 Library 的資源類型;除了 Library 是只讀的之外,這些基本相同 - 我只想允許上傳到 Images 類型 .
有多種方法可以配置CKEditor和CKFinder之間的集成 . 我正在使用CKEditor的自定義JS配置文件,并使用 setupCKEditor 方法將ckFinder連接到它,根據the docs:
CKFinder.setupCKEditor(ckeditor_1, {
'height': '100%',
'jquery': '/js/jquery-1.11.3.min.js',
'skin': 'jquery-mobile',
'swatch': 'a',
'themeCSS': '/themes/mytheme.min.css',
'filebrowserBrowseUrl': '/ckfinder/ckfinder.html',
'filebrowserImageBrowseUrl': '/ckfinder/ckfinder.html?Type=Images',
'filebrowserImageUploadUrl': '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images'
}, "Images");
我已經嘗試在我的 CKEDITOR.replace 調用中將相同的值傳遞給CKEditor,并將它們設置在我的外部配置文件中的 config 屬性上,但沒有任何變化 - 我仍然得到相同的錯誤 .
我該怎么做?或者,由于CKFinder上傳器工作正常,如何在image2對話框中禁用上傳選項卡?
更新:這是我目前創建CKEditor和CKFinder實例的代碼:
var ckeditor_1 = CKEDITOR.replace('html', {
"baseHref":"http://mysite.mac.local/",
"toolbarStartupExpanded":true,
"extraPlugins":"symbol",
"customConfig":"/js/ckconfig.js"
});
CKFinder.setupCKEditor( ckeditor_1, {
'height': '100%',
'jquery': '/js/jquery-1.11.3.min.js',
'skin': 'jquery-mobile',
'swatch': 'a',
'themeCSS': '/themes/mytheme.min.css'
}, { type: "Images" } );
和我的CKEditor配置文件:
CKEDITOR.editorConfig = function (config) {
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
config.docType = '';
config.toolbarGroups = [
{name: 'document', groups: ['mode', 'document', 'doctools']},
{name: 'clipboard', groups: ['clipboard', 'undo']},
{name: 'editing', groups: ['find', 'selection', 'spellchecker']},
{name: 'links'},
{name: 'insert'},
{name: 'tools'},
{name: 'others'},
'/',
{name: 'basicstyles', groups: ['basicstyles', 'cleanup']},
{name: 'paragraph', groups: ['list', 'indent', 'blocks', 'align']},
{name: 'styles'},
{name: 'colors'},
{name: 'about'},
{name: 'symbol'}
];
config.removePlugins = 'templates,save,specialchar,image,flash,scayt,forms,wsc,print,iframe,pagebreak';
CKEDITOR.plugins.addExternal('symbol', '/ckeditorplugins/symbol/', 'plugin.js');
config.extraPlugins = 'symbol';
config.templates_replaceContent = false;
config.templates_files = [
'/ckeditorplugins/templates/templates.js'
];
config.allowedContent = true;
config.toolbarCanCollapse = true;
config.fullPage = true;
config.skin = 'bootstrapck';
config.height = 400;
config.uiColor = '#f9dda0';
config.autoParagraph = false;
config.enterMode = CKEDITOR.ENTER_BR;
CKEDITOR.on('instanceReady', function (ev) {
ev.editor.dataProcessor.writer.selfClosingEnd = '>';
});
};
總結
以上是生活随笔為你收集整理的java ckfinder 图片重命名,CKEditor CKFinder图片上传的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: html em属性,html em标签的
- 下一篇: 计算机二级excal试题,2016年计算