--- ckeditor.inc.orig 2009-08-10 15:54:40.000000000 -0700 +++ ckeditor.inc 2009-10-08 22:12:23.000000000 -0700 @@ -76,9 +76,16 @@ function wysiwyg_ckeditor_version($edito * theme name. */ function wysiwyg_ckeditor_themes($editor, $profile) { - return array('default'); + $path = $editor['library path'] . '/skins/'; + $dir_handle = @opendir($path) or drupal_set_message('Unable to open ' . $path, $type = 'error'); + $themes = array(); + while ($file = readdir($dir_handle)) { + if($file!="." && $file!=".." && $file!="CVS" && $file!=".svn") + $themes[$file] = $file; + } + return $themes; + closedir($dir_handle); } - /** * Return runtime editor settings for a given wysiwyg profile. * @@ -96,7 +103,6 @@ function wysiwyg_ckeditor_themes($editor function wysiwyg_ckeditor_settings($editor, $config, $theme) { $settings = array( 'basePath' => base_path() . $editor['library path'] . '/', - 'SkinPath' => base_path() . $editor['library path'] . '/editor/skins/' . $theme . '/', 'Width' => '100%', 'Height' => 420, // By default, CKeditor converts most characters into HTML entities. Since @@ -107,6 +113,7 @@ function wysiwyg_ckeditor_settings($edit 'IncludeLatinEntities' => FALSE, 'IncludeGreekEntities' => FALSE, ); + isset($config['theme']) ? $settings['skin'] = $theme : $settings['skin'] = 'kama'; if (isset($config['block_formats'])) { $settings['FontFormats'] = strtr($config['block_formats'], array(',' => ';')); }