Codebox background color in Editor.

Go down

Solved Codebox background color in Editor.

Post by HoeGy48 on July 23rd 2017, 1:31 am

Hello,

I would like to know how i'm able to change the background color of the codebox in the editor. It's showing right when posted in a post, but it's hard to see in the editor since BG and text are both white.



Thx in advance.



Last edited by HoeGy48 on July 23rd 2017, 8:20 pm; edited 1 time in total
avatar
HoeGy48
Forumember

Posts : 71
Reputation : 1
Language : Dutch

http://www.oriongaming.forumotion.com

Back to top Go down

Solved Re: Codebox background color in Editor.

Post by SLGray on July 23rd 2017, 2:19 am

Code:
code, code::before (
      background-color:  YOUR COLOR;
}


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.

avatar
SLGray
Administrator
Administrator

Male Posts : 43679
Reputation : 3106
Language : English
Location : United States

http://fmthemesdesignteam.forumotion.com/

Back to top Go down

Solved Re: Codebox background color in Editor.

Post by HoeGy48 on July 23rd 2017, 10:19 am

@SLGray wrote:
Code:
code, code::before (
      background-color:  YOUR COLOR;
}

i changed the ( with a { cause else the CSS gave me and error.

but it didn't work unfortunately.
avatar
HoeGy48
Forumember

Posts : 71
Reputation : 1
Language : Dutch

http://www.oriongaming.forumotion.com

Back to top Go down

Solved Re: Codebox background color in Editor.

Post by Draxion on July 23rd 2017, 2:25 pm

Hi there, are you talking about when you type into the editor, you want the codebox to display a different background?


NEVER provide your founder's account or email
Please provide forum's URL when dealing with design and appearance issues
Don't forget to mark the topic as when the issue is resolved. This helps the staff greatly.
PM Support is prohibited!
TOS | General Rules | FAQ | Tricks & Tips | Latest Updates | Introduce Yourself

avatar
Draxion
Support Moderator
Support Moderator

Male Posts : 2162
Reputation : 275
Language : English
Location : USA

http://www.draxionsgameden.com/

Back to top Go down

Solved Re: Codebox background color in Editor.

Post by APE on July 23rd 2017, 5:12 pm

Hello sorry the code SLGray gave was right but he made a little mistake in out a ( on the code and it should have been like this

Code:
code, code::before {      background-color:  YOUR COLOR;}

You will need to add your own colour where it says "Your color"



avatar
APE
Administrator
Administrator

Male Posts : 12497
Reputation : 1309
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: Codebox background color in Editor.

Post by Ange Tuteur on July 23rd 2017, 7:17 pm

Hi,

Just in case you guys didn't know : you can't style the WYSIWYG elements via the CSS stylesheet ; you have to append a new stylesheet to the iframe using a script like the one below.
Code:
$(function(){$(function(){$(".sceditor-container iframe").contents().find("head").append("<style>YOUR_STYLES_HERE</style>")})});
YOUR_STYLES_HERE would be any CSS styles you want to apply to the elements of the WYSIWYG editor.

It's a bit hackish, but it's the only way we can change the color of those elements. The script would look like this, using the CSS that was previously provided.
Code:
$(function(){$(function(){$(".sceditor-container iframe").contents().find("head").append("<style>code, code::before { background-color:#000; }</style>")})});
The script should be applied in JS codes management. ( Modules > JS Codes Management > New ) Placement should be in all the pages.
avatar
Ange Tuteur
Forumaster

Male Posts : 13202
Reputation : 2918
Language : EN, JA, FR
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Solved Re: Codebox background color in Editor.

Post by HoeGy48 on July 23rd 2017, 8:20 pm

Well that just worked perfectly! Thanks everyone. Very Happy
avatar
HoeGy48
Forumember

Posts : 71
Reputation : 1
Language : Dutch

http://www.oriongaming.forumotion.com

Back to top Go down

Solved Re: Codebox background color in Editor.

Post by Draxion on July 23rd 2017, 8:21 pm

Problem solved & topic archived.
Please read our forum rules: ESF General Rules


NEVER provide your founder's account or email
Please provide forum's URL when dealing with design and appearance issues
Don't forget to mark the topic as when the issue is resolved. This helps the staff greatly.
PM Support is prohibited!
TOS | General Rules | FAQ | Tricks & Tips | Latest Updates | Introduce Yourself

avatar
Draxion
Support Moderator
Support Moderator

Male Posts : 2162
Reputation : 275
Language : English
Location : USA

http://www.draxionsgameden.com/

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum