Elxis CMS Forum

Support => General => Topic started by: judelgado on August 12, 2014, 22:21:45

Title: WYSIWYG background image
Post by: judelgado on August 12, 2014, 22:21:45
Hello,

  I recently update to version 4.2.  My problem is that the image I'm using for my website background is appearing as a background in the WYSIWYG editor.  My image is dark this make edit the text impossible.  How can I remove this image from the editor.

  By the way the WYSIWYG editor doesn't work on Safari.

  Regards

Title: Re: WYSIWYG background image
Post by: datahell on August 13, 2014, 09:45:17
Never use dark background on body tag. If you want dark background then use a wrapper div and add the background colour there leaving body white (or something light). Aldo be aware of popup windows (inner.php calls).

body { margin:0; padding:0; background-color:#FFFFFF; color:#000000; }
.mywrapper { margin:0; background-color:#000000; color:#FFFFFF; }

<body>
     <div class="mywrapper">
            .... rest template contents...
    </div>
</body>

I haven't tested the editor with safari but it should work as the editor Elxis uses, CKEditor, is compatible with Safari. Maybe it is something else on the browser that creates the problem.
Title: Re: WYSIWYG background image
Post by: judelgado on August 13, 2014, 16:20:47
Hello Datahell,

  Thanks for your response, I'm using Aurora template and using background image as a parameter in the template options. I haven't edited the CSS directly. Is there a way I can edit the wysiwyg CSS to avoid this problem?  Thanks.

You can see the background in http://hotels.costaricatoptours.com

Regards
Title: Re: WYSIWYG background image
Post by: webgift on August 13, 2014, 17:58:53
It's not an Aurora issue for sure. I checked once again both two theme's versions (dark and white) without any relative problem. Editor work as expected. I also checked it on Safari 5.1.7 for windows without any problem.

(http://s27.postimg.org/j24a1bzv3/safari_aurora_backend.jpg) (http://postimg.org/image/j24a1bzv3/)
Title: Re: WYSIWYG background image
Post by: datahell on August 13, 2014, 18:31:47
Template's parameters doesn't count. Only the main template's CSS file is loaded (template.css). The editor has a CSS file which sets the background colour to white and Elxis loads this file last, so normally you shouldn't have this problem except if the template's CSS uses !important declarations on body tag. If you can't solve this problem via CSS (which can be solved) edit this file:

includes/libraries/elxis/helpers/editor.helper.php

go to line 117:

$this->options['contentsCss'] = '[\''.$elxis->secureBase().'/templates/system/css/standard.css\', \''.$elxis->secureBase().'/templates/'.$elxis->getConfig('TEMPLATE').'/css/template.css\', \''.$elxis->secureBase().'/includes/js/ckeditor/contents.css\']';

And change it to:

$this->options['contentsCss'] = '[\''.$elxis->secureBase().'/templates/system/css/standard.css\', \''.$elxis->secureBase().'/includes/js/ckeditor/contents.css\']';

In such cases always hit control+F5 in your browser to refresh its cache. If you updated Elxis 4.1 to 4.2 this is very important.
Title: Re: WYSIWYG background image
Post by: judelgado on August 13, 2014, 23:00:27
Thanks Datahell!

  Worked perfectly eliminating the background and brought back the wysiwyg editor to Safari on my Mac.

  Regards