I have installed CKeditor and IMCE modules for Drupal7. Now when i click on a button in my page, i want to load the ckeditor with IMCE support (File browser option).
How to achieve this with javascript? So far, i am loading the ckeditor this way, but it is not showing a file browser button for image:
CKEDITOR.replace('text_'+id, {
width: 630,
height: 300
});
CKEDITOR.config.toolbar = [
['Bold','Italic','Underline']
];
CKEDITOR.config.extraPlugins = 'imce';
The strange thing is that, the Image dialog has "Browse Server" button for the textarea under the form that is created with Drupal Form API, but when i try to apply ckeditor for a custom textarea through javascript, i don't see the "Browse Server" button for Image dialog.