{"id":225,"date":"2016-08-25T03:14:30","date_gmt":"2016-08-25T03:14:30","guid":{"rendered":"http:\/\/myprojects.advchaweb.com\/?p=225"},"modified":"2016-08-25T03:45:17","modified_gmt":"2016-08-25T03:45:17","slug":"change-the-background-color-of-wordpress-visual-editor-to-black","status":"publish","type":"post","link":"https:\/\/myprojects.advchaweb.com\/index.php\/2016\/08\/25\/change-the-background-color-of-wordpress-visual-editor-to-black\/","title":{"rendered":"Change The Background Color Of WordPress Visual Editor To Black"},"content":{"rendered":"<p>I want to change the background color of my wordpress visual editor from white to black. I like black color for my wordpress background because I think it is easier to read (for me), energy-saving and it don&#8217;t make my eye irritated if I am reading for a long time. I am using the twenty sixteen theme and I already changed the background color to black (the font is white, of course). My articles mostly about the technical IT like programming, new tecnology and tutorial. When I am dealing with some phrases that I need to be emphasized, I like to make them colorful so I can read easier and make it different with the others. The problem I encountered was the WordPress visual editor. The default color was white. So when I changed the color of\u00a0some words on the white background visual editor, I felt\u00a0different when I saw it on the black wordpress page. It was not easy to change it like the wordpress page did. I can&#8217;t mess style.css to do this job. From this stackoverflow link <a href=\"http:\/\/wordpress.stackexchange.com\/questions\/25355\/how-do-you-change-the-visual-editors-background-color\" target=\"_blank\">http:\/\/wordpress.stackexchange.com\/questions\/25355\/how-do-you-change-the-visual-editors-background-color<\/a>, I know how to accomplish my goal. Here are the steps:<\/p>\n<ol>\n<li>Edit function.php file in your active theme. I use child theme so I need to edit the file in my child theme directory (\/wp-content\/themes\/2016-child-simple-clean-design). Add this single line at the bottom of the file:\n<pre class=\"lang:default decode:true \">add_editor_style();<\/pre>\n<\/li>\n<li>Add (or edit if exist) editor-style.css in the theme directory like this:\n<pre class=\"lang:default decode:true\">.mceContentBody.wp-editor { \r\n    background-color: #000;\r\n    color: #fff; \r\n} \r\npre, span.crayon-inline {\r\n    color: #1a1a1a;\r\n}<\/pre>\n<p>The first four lines is enough to change the background of the visual editor to black. The last three lines is about the change the color on the crayon syntax highlighting plugin. We need to change the default color on the plugin from white to black (#1a1a1a) because the plugin use white background and we already change the font color to white also! at this case we would not see our code! <a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/crayon-white.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-229\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/crayon-white.jpg\" alt=\"crayon-white\" width=\"688\" height=\"143\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/crayon-white.jpg 688w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/crayon-white-300x62.jpg 300w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/a>\u00a0so change the font color to black. <a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/crayon-black.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-230\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/crayon-black.jpg\" alt=\"crayon-black\" width=\"640\" height=\"299\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/crayon-black.jpg 640w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/08\/crayon-black-300x140.jpg 300w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/a>\u00a0OK. that is it! Enjoy.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>I want to change the background color of my wordpress visual editor from white to black. I like black color for my wordpress background because I think it is easier to read (for me), energy-saving and it don&#8217;t make my eye irritated if I am reading for a long time. I am using the twenty &hellip; <a href=\"https:\/\/myprojects.advchaweb.com\/index.php\/2016\/08\/25\/change-the-background-color-of-wordpress-visual-editor-to-black\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Change The Background Color Of WordPress Visual Editor To Black&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,8],"tags":[],"class_list":["post-225","post","type-post","status-publish","format-standard","hentry","category-tutorial","category-wordpress"],"_links":{"self":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/225","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/comments?post=225"}],"version-history":[{"count":5,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/225\/revisions"}],"predecessor-version":[{"id":232,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/225\/revisions\/232"}],"wp:attachment":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/media?parent=225"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/categories?post=225"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/tags?post=225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}