PDA

View Full Version : Need Help W/CSS Code in Additional template


HM666
10-03-2014, 08:31 PM
I'm trying to edit the editor on a skin that I plan on putting in my skin shop. Its a dark skin so the white or light borders and backgrounds inside the drop down is not suitable for what I'm doing.

I'm able to edit the editor.css file and change the CSS I want to change to make the borders/backgrounds dark, but when I add the code into the additional.css template and even include !important in the code it will not show properly on the skin. For obvious reasons its not optimal to have this code in the editor.css file since this skin will be redistributed. The css code that does change the borders is...

.cke_panel_listItem a {
padding:2px;
display:block;
border:1px solid #000000!important;
color:inherit!important;
text-decoration:none;
overflow:hidden;
text-overflow:ellipsis;
}*

I've tried many different variations, I've tried just using

.cke_panel_listItem a {
border:1px solid #000000!important;
}*

as well both have not worked once I have placed the editor.css file back with the default values. What do I need to do besides changing the code in the editor.css to get this to render properly in the additional.css template?

nerbert
10-03-2014, 09:54 PM
I don't think there's any alternative to editing editor.css. The CK Editor imports or pulls in (if that's the right term) the editor.css template. If you want another css file to override it it would take a plugin to concatenate it into the list. I don't know if you want a plugin in a style package but I think I can get it going if you want to add another css file as a template.

See line 122 vb/ckeditor.php. I've added more css by concatenation in the editor_construct hook. I think I can get it working. But the bottom line is nothing in additional.css will affect the editor

Zachery
10-03-2014, 09:55 PM
the ckeditor loads in an iframe of sorts, you cant edit it via additional.css

HM666
10-03-2014, 10:02 PM
the ckeditor loads in an iframe of sorts, you cant edit it via additional.css

You did not read my post. I DID make edits and add the css to additional.css and it does not work. The code posted above IS in my additional.css template.

Zachery
10-03-2014, 10:04 PM
Please re-read the my statement.

You cannot make changes to the additional.css that will effect ckeditor templates/areas because they're loaded in an iframe.

HM666
10-03-2014, 10:12 PM
I don't think there's any alternative to editing editor.css. The CK Editor imports or pulls in (if that's the right term) the editor.css template. If you want another css file to override it it would take a plugin to concatenate it into the list. I don't know if you want a plugin in a style package but I think I can get it going if you want to add another css file as a template.

See line 122 vb/ckeditor.php. I've added more css by concatenation in the editor_construct hook. I think I can get it working. But the bottom line is nothing in additional.css will affect the editor

I would rather not have a plugin, I really think there has to be a way to remedy this in the template either by editing a html template or in the css templates. I've attached some screen shots of what I'm trying to change. The first one is the outline border that I would like to change and the second is the drop down menu that I have changed in the editor.css and will not change anything if I use it in the additional.css template.

HM666
10-03-2014, 10:14 PM
Please re-read the my statement.

You cannot make changes to the additional.css that will effect ckeditor templates/areas because they're loaded in an iframe.

Ok in that case how can I make it do as I want?

nerbert
10-03-2014, 10:50 PM
You can try this plugin.

hook location "editor_construct"


$this->config['contentsCss'] .= $css_path . ',editor_additional.css';


Then make a new "editor_additional.css" template

The editor does not import additional.css you have to extend the list of templates with one of your own

HM666
10-04-2014, 01:21 AM
You can try this plugin.

hook location "editor_construct"


$this->config['contentsCss'] .= $css_path . ',editor_additional.css';


Then make a new "editor_additional.css" template

The editor does not import additional.css you have to extend the list of templates with one of your own

Thanks for the help. :)