The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Codebox background color in Editor.

View previous topic View next topic 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 : 40448
Reputation : 2728
Language : English
Location : United States

https://fmthemes.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 : 1785
Reputation : 224
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
Manager
Manager

Male Posts : 10805
Reputation : 1008
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

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 : 13176
Reputation : 2879
Language : EN10, FR5
Location : Macungie, PA

http://fmdesign.forumotion.com

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 : 1785
Reputation : 224
Language : English
Location : USA

http://www.draxionsgameden.com/

Back to top Go down

View previous topic View next topic Back to top


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