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.

Change Quote Colors in .sceditor

View previous topic View next topic Go down

Solved Change Quote Colors in .sceditor

Post by Guest on December 28th 2015, 4:28 pm

Technical Details

Forum version : #phpBB3
Position : Administrator
Concerned browser(s) : Google Chrome
Who the problem concerns : All members
Forum link : http://llfmrpg.forumotion.com

Description of problem

Recently I changed the background color and text in the .sceditor via CSS and Javascript but came to realize I'll need more work done in Javascript to change the quote color and text in the .sceditor as well. The problem is I am not sure how it's done. Any assistance would be great, thanks!

CSS
Code:
/*Text in Editor*/
.sceditor-container {
 background-color: #000000 !important;
}
.sceditor-container textarea{
 color:#fff !important;
}

JavaScript
Code:
$(function(){$(function(){$(".sceditor-container iframe").contents().find("head").append("<style>body,html,code:before,p,table{color:#FFFFFF!important;}</style>")})});


Last edited by Draxion on December 28th 2015, 4:59 pm; edited 1 time in total

Guest
Guest


Back to top Go down

Solved Re: Change Quote Colors in .sceditor

Post by Ange Tuteur on December 28th 2015, 4:40 pm

Hey,

Change the JavaScript you posted above to this :
Code:
$(function(){$(function(){$(".sceditor-container iframe").contents().find("head").append("<style>body,html,code:before,p,table{color:#FFFFFF!important;}blockquote{background:#333!important;color:#FFF!important;}</style>")})});

You should see an extra rule :
Code:
blockquote{background:#333!important;color:#FFF!important;}

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Change Quote Colors in .sceditor

Post by Guest on December 28th 2015, 4:58 pm

Works great! Thanks again, @Ange Tuteur.

Just one question... If I needed to change more background and text colors in the future like say Code or Spoilers, I simply add that to the <style> of the Javascript as if writing in CSS and then add the rule to the CSS sytlesheet, right?

Guest
Guest


Back to top Go down

Solved Re: Change Quote Colors in .sceditor

Post by Ange Tuteur on December 28th 2015, 6:59 pm

Correct, the script itself appends a new stylesheet to the WYSIWYG iframe. It's a separate page, so the stylesheet will only affect the editor iframe. If you need to change more styles, all you need to do is add another rule to the script's stylesheet. Wink

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Change Quote Colors in .sceditor

Post by Guest on December 28th 2015, 7:47 pm

Okay, thank you very much! Very Happy

Guest
Guest


Back to top Go down

Solved Re: Change Quote Colors in .sceditor

Post by SLGray on December 28th 2015, 9:00 pm

Topic solved and archived


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


SLGray
Administrator
Administrator

Male Posts : 36732
Reputation : 2446
Language : English
Location : United States

http://ztwds.forumotion.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