1
Hello all,
I am having a bit of a problem with tinymce editor, I think this is not new it just seems to be a bit of a bug.
The problem is that it imports the themes style.css, a theme I have developed for a client uses a dark background image which means the editor text area shows with a dark background image which is not good for editing with.
The editor is required in this project as the client does not know HTML to manually code structure, etc but it is not good to type onto a dark background image.
I have had a look around some files and I think it might be this function that loads the theme style.css (code is in tinymce.php)
function loadCss($css_file = 'style.css')
{
static $css_url, $css_path;
if (!isset($css_url)) {
$css_url = dirname( xoops_getcss($GLOBALS['xoopsConfig']['theme_set']) );
$css_path = str_replace(XOOPS_THEME_URL, XOOPS_THEME_PATH, $css_url);
}
$css = array();
$css[] = $css_url . '/' . $css_file;
$css_content = file_get_contents( $css_path . '/' . $css_file );
// get all import css files
if ( preg_match_all("~@import url((.*.css));~sUi", $css_content, $matches, PREG_PATTERN_ORDER) ) {
foreach( $matches[1] as $key => $css_import ) {
$css = array_merge( $css, $this->loadCss( $css_import) );
}
}
return $css;
}
I have tried commenting this out but it stops the editor from loading at all.
Anyone got any ideas on how to stop tinymce using xoops theme style.css?
Thanks