diff --git ckeditor.module ckeditor.module
index 98f7786..75d4d43 100644
--- ckeditor.module
+++ ckeditor.module
@@ -601,11 +601,12 @@ function ckeditor_process_textarea($element) {
       $toolbar = CKEDITOR_FORCE_SIMPLE_TOOLBAR_NAME;
     }
 
-    if (!empty($conf['theme_config_js']) && $conf['theme_config_js'] == 't' && file_exists($themepath .'ckeditor.config.js')) {
-      $ckeditor_config_path = $host . $themepath .'ckeditor.config.js?'. @filemtime($themepath .'ckeditor.config.js');
+    if ($conf['config_js_mode'] == 'self') {
+      $conf['config_js_path'] = str_replace(array('%h', '%t', '%m'), array($host, $host . $themepath, $module_drupal_path), $conf['config_js_path']);
+      $ckeditor_config_path = $conf['config_js_path'] . '?' . @filemtime($conf['config_js_path']);
     }
     else {
-      $ckeditor_config_path = $module_full_path ."/ckeditor.config.js?". @filemtime($module_drupal_path ."/ckeditor.config.js");
+      $ckeditor_config_path = $module_full_path . '/ckeditor.config.js?'. @filemtime($module_drupal_path . '/ckeditor.config.js');
     }
 
     $settings[$textarea_id]['customConfig'] = $ckeditor_config_path;
diff --git includes/ckeditor.admin.inc includes/ckeditor.admin.inc
index 988185e..6813ebf 100644
--- includes/ckeditor.admin.inc
+++ includes/ckeditor.admin.inc
@@ -182,7 +182,7 @@ function ckeditor_admin_profile_form($form_state, $profile = NULL) {
 
   module_load_include('inc', 'ckeditor', 'includes/ckeditor.lib');
 
-  $toolbar_options = ckeditor_load_toolbar_options();
+  $toolbar_options = ckeditor_load_toolbar_options($profile);
   $skin_options = ckeditor_load_skin_options();
   $lang_options = ckeditor_load_lang_options();
 
@@ -893,15 +893,37 @@ function ckeditor_admin_profile_form($form_state, $profile = NULL) {
       't' => t('Yes')
     ),
   );
-  $form['advanced']['theme_config_js'] = array(
-    '#type' => 'radios',
-    '#title' => t('Load ckeditor.config.js from theme path'),
-    '#default_value' => !empty($profile->settings['theme_config_js']) ? $profile->settings['theme_config_js'] : 'f',
+
+  $form['advanced']['config_js_mode'] = array(
+    '#type' => 'select',
+    '#title' => t('Custom CKEditor configuration'),
+    '#default_value' => !empty($profile->settings['config_js_mode']) ? $profile->settings['config_js_mode'] : 'theme',
     '#options' => array(
-      't' => t('Yes'),
-      'f' => t('No')
+      'self' => t('Define path'),
+      'none' => t('CKEditor default')
     ),
-    '#description' => t('When set to "true" the editor will try to load the ckeditor.config.js file from theme directory.'),
+    '#description' => t('Defines the CKEditor configuration.<br/>Define path - enter path for javascript configuration file below.<br />CKEditor default - uses default ckeditor.config.js from editor.')
+  );
+  $form['advanced']['config_js_path'] = array(
+    '#type' => 'textfield',
+    '#title' => t('CKEditor configuration path'),
+    '#default_value' => !empty($profile->settings['config_js_path']) ? $profile->settings['config_js_path'] : "",
+    '#size' => 40,
+    '#maxlength' => 255,
+    '#description' => t('Enter path to a file with the CKEditor configuration (Example: "!example1"). Be sure to select "define path" above.',
+      array(
+        '!example1' => '/ckeditor.config.js'
+      )) .
+      '<br />'.
+      t('Available placeholders:!h - host name (!host).!t - path to theme (!theme).!m - path to CKEditor module (!module).',
+      array(
+        '!h' => '<br /><strong>%h</strong>',
+        '!t' => '<br /><strong>%t</strong>',
+        '!m' => '<br /><strong>%m</strong>',
+        '!host' => base_path(),
+        '!theme' => base_path() . path_to_theme() .'/',
+        '!module' => drupal_get_path('module', 'ckeditor'))
+      )
   );
   $form['advanced']['js_conf'] = array(
     '#type' => 'textarea',
@@ -1014,6 +1036,18 @@ function ckeditor_admin_profile_form_validate($form, &$form_state) {
   if (!preg_match('#\d+#', $edit['ckeditor_load_time_out'])) {
     form_set_error('ckeditor_load_time_out', t('Enter valid load timeout in seconds.'));
   }
+
+  if (!empty($edit['config_js_path'])) {
+    if ($edit['config_js_mode'] != 'self') {
+      form_set_error('config_js_path', t('Path to CKEditor configuration is not empty. Please set the "CKEditor configuration" option to "define path" mode.'));
+    }
+    elseif (FALSE !== strpos($edit['config_js_path'], '"')) {
+      form_set_error('config_js_path', t('Double quotes are not allowed in path.'));
+    }
+    elseif (substr($edit['config_js_path'], 0, 1) == "'" && substr($edit['config_js_path'], -1) == "'") {
+      form_set_error('config_js_path', t('Enter valid path, do not surround it with quotes.'));
+    }
+  }
 }
 
 function ckeditor_admin_profile_form_submit($form, &$form_state) {
diff --git includes/ckeditor.lib.inc includes/ckeditor.lib.inc
index 7985662..0bfb036 100644
--- includes/ckeditor.lib.inc
+++ includes/ckeditor.lib.inc
@@ -99,27 +99,56 @@ function ckeditor_resolve_url($path) {
   return FALSE;
 }
 
-function ckeditor_load_toolbar_options() {
+/**
+ * Load the toolbars options from the CKEditor configuration files.
+ *
+ * @param
+ *   The profile settings as a stdClass object.
+ *
+ * @return
+ *   An array of toolbar names.
+ */
+function ckeditor_load_toolbar_options($profile) {
   $arr = array('Basic' => 'Basic', 'Full' => 'Full');
-  $module_drupal_path = drupal_get_path('module', 'ckeditor');
-  $editor_local_path  = ckeditor_path(TRUE);
-  $ckconfig_js = $editor_local_path .'/config.js';
-  $ckeditor_config_js = $module_drupal_path .'/ckeditor.config.js';
-  if (file_exists($ckconfig_js) && is_readable($ckconfig_js)) {
-    $fp = @fopen($ckconfig_js, "r");
-    if ($fp) {
-      while (!feof($fp)) {
-        $line = fgets($fp, 1024);
-        $matches = array();
-        if (preg_match('/config.toolbar_([a-z0-9_]+)/i', $line, $matches)) {
-          $arr[$matches[1]] = drupal_ucfirst($matches[1]);
-        }
-      }
-      fclose($fp);
-    }
+
+  $ckeditor_config_js        = ckeditor_path(TRUE) . '/config.js';
+  $ckeditor_module_config_js = drupal_get_path('module', 'ckeditor') . '/ckeditor.config.js';
+
+  $arr = $arr + _ckeditor_load_toolbar_options_from_config_file($ckeditor_config_js);
+
+  if ('self' == $profile->settings['config_js_mode']) {
+    $arr = $arr + _ckeditor_load_toolbar_options_from_config_file($profile->settings['config_js_path']);
+  }
+  else {
+    $arr = $arr + _ckeditor_load_toolbar_options_from_config_file($ckeditor_module_config_js);
   }
-  if (file_exists($ckeditor_config_js) && is_readable($ckeditor_config_js)) {
-    $fp = @fopen($ckeditor_config_js, "r");
+
+  asort($arr);
+  return $arr;
+}
+
+/**
+ * @return
+ *   An array of toolbars names extract from the file.
+ */
+function _ckeditor_load_toolbar_options_from_config_file($config_filepath) {
+  $arr = array();
+
+  $paths = array(
+    '%h' => base_path(),
+    '%t' => base_path() . path_to_theme() . '/',
+    '%m' => drupal_get_path('module', 'ckeditor') . '/',
+  );
+
+  // Replaces the placeholders
+  $config_filepath = str_replace(array_keys($paths), array_values($paths), $config_filepath);
+
+  if ($config_filepath[0] == '/') {
+    $config_filepath = substr($config_filepath, 1);
+  }
+
+  if (file_exists($config_filepath) && is_readable($config_filepath)) {
+    $fp = @fopen($config_filepath, 'r');
     if ($fp) {
       while (!feof($fp)) {
         $line = fgets($fp, 1024);
@@ -132,15 +161,6 @@ function ckeditor_load_toolbar_options() {
     }
   }
 
-  //oops, we have no information about toolbars, let's use hardcoded array
-  if (empty($arr)) {
-    $arr = array(
-      'Basic' => 'Basic',
-      'Default' => 'Default',
-    );
-  }
-  asort($arr);
-
   return $arr;
 }
 
