我希望这里的人有关于CKeditor和Roxy-fileman的经验。我在我的项目中安装了CKeditor,为了能够上传文件,我尝试添加Roxy-fileman。
根据http://www.roxyfileman.com/demo,我所需要做的就是添加以下代码:
<script src="ckeditor/ckeditor.js"></script>
<textarea id="editor1" name="editor1" rows="10" cols="80"></textarea>
<script>
var roxyFileman = '/fileman/index.html?integration=ckeditor';
$(function(){
CKEDITOR.replace( 'editor1',{filebrowserBrowseUrl:roxyFileman,
filebrowserImageBrowseUrl:roxyFileman+'&type=image',
removeDialogTabs: 'link:upload;image:upload'});
});
</script>但是所有这些都是在我的页面上添加一个“新的”ckEditor。例如,当我单击要更改的元素时,我想用它来替换显示的旧元素。我知道这不太可能,但也许有人能给我指明正确的方向。谢谢!
发布于 2014-09-05 21:10:39
将以下代码放入您的config.js文件(位于“ckeditor”文件夹中):
var roxyFileman = '/fileman/index.html?integration=ckeditor';
config.filebrowserBrowseUrl = roxyFileman;
config.filebrowserImageBrowseUrl = roxyFileman + '&type=image';
config.removeDialogTabs = 'link:upload;image:upload';您的文件将如下所示:
/**
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function (config) {
var roxyFileman = '/fileman/index.html?integration=ckeditor';
config.filebrowserBrowseUrl = roxyFileman;
config.filebrowserImageBrowseUrl = roxyFileman + '&type=image';
config.removeDialogTabs = 'link:upload;image:upload';
};https://stackoverflow.com/questions/25105855
复制相似问题