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


Back to top Go down

Solved Re: Change Quote Colors in .sceditor

Post by Ange Tuteur 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
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 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?
avatar
Guest
Guest


Back to top Go down

Solved Re: Change Quote Colors in .sceditor

Post by Ange Tuteur 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
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 December 28th 2015, 7:47 pm

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 December 28th 2015, 9:00 pm

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 : 51555
Reputation : 3524
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