1
playsome
TinyMCE problem - editor imports theme stylesheet
  • 2010/11/17 16:44

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


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 dirnamexoops_getcss($GLOBALS['xoopsConfig']['theme_set']) );
            
$css_path str_replace(XOOPS_THEME_URLXOOPS_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$matchesPREG_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

2
bjuti
Re: TinyMCE problem - editor imports theme stylesheet
  • 2010/11/17 20:52

  • bjuti

  • Just can't stay away

  • Posts: 871

  • Since: 2009/1/7 2


It's a common problem from 2.33.

Check this.

Login

Who's Online

389 user(s) are online (224 user(s) are browsing Support Forums)


Members: 0


Guests: 389


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits