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.
The forum of the forums
2 posters

    Change Quote Colors in .sceditor

    avatar
    Guest
    Guest


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


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

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


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


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

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


    Solved Re: Change Quote Colors in .sceditor

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

    Okay, thank you very much! Very Happy
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    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.

      Current date/time is September 23rd 2024, 2:29 am