CKEditor and Roxy-fileman in MVC

I hope someone has experience with CKeditor and Roxy-fileman. I have CKeditor installed in my project and I am trying to add Roxy-fileman inorder to upload files.

As per 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 is to add a "new" ckEditor to my page. I want it to replace the old one that appears when I, for example, click on the element that I want to change. I know his long shot, but maybe someone can point me in the right direction. Thank!

+3


source to share


1 answer


Place the following code inside your config.js file (which is 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';
};

      

+4


source







All Articles