5

I hope that someone here has experience concerning CKeditor and Roxy-fileman. I have CKeditor installed in my project and I try to add Roxy-fileman inorder to be able to upload files.

According to the http://www.roxyfileman.com/demo, all I need to do is add this code:

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

But all this do is add a "new" ckEditor at my page. I want it to replace the old one that shows up when I for example click in an element to change. I know its a long shot but maybe someone can point me in the right direction. Thanks!

Wellington Zanelli
  • 1,894
  • 3
  • 18
  • 43
user2915962
  • 2,691
  • 8
  • 33
  • 60

1 Answers1

5

Put the following code inside your config.js file (that's inside the 'ckeditor' folder):

var roxyFileman = '/fileman/index.html?integration=ckeditor';
config.filebrowserBrowseUrl = roxyFileman;
config.filebrowserImageBrowseUrl = roxyFileman + '&type=image';
config.removeDialogTabs = 'link:upload;image:upload';

Your file will look like this:

/**
 * @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';
};
Wellington Zanelli
  • 1,894
  • 3
  • 18
  • 43