The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Change Quote Colors in .sceditor

2 posters

Go down

Solved Change Quote Colors in .sceditor

Post by Guest Mon 28 Dec - 16:28

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 Mon 28 Dec - 16:59; edited 1 time in total
avatar
Guest
Guest


Back to top Go down

Solved Re: Change Quote Colors in .sceditor

Post by Ange Tuteur Mon 28 Dec - 16:40

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
Ange Tuteur
Forumaster

Male Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Change Quote Colors in .sceditor

Post by Guest Mon 28 Dec - 16:58

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?
avatar
Guest
Guest


Back to top Go down

Solved Re: Change Quote Colors in .sceditor

Post by Ange Tuteur Mon 28 Dec - 18:59

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
Ange Tuteur
Forumaster

Male Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Change Quote Colors in .sceditor

Post by Guest Mon 28 Dec - 19:47

Okay, thank you very much! Very Happy
avatar
Guest
Guest


Back to top Go down

Solved Re: Change Quote Colors in .sceditor

Post by SLGray Mon 28 Dec - 21:00

Topic solved and archived


Change Quote Colors in .sceditor Slgray10

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

Male Posts : 51567
Reputation : 3525
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Back to top

- Similar topics

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