{"id":1001,"date":"2014-10-14T10:39:42","date_gmt":"2014-10-14T08:39:42","guid":{"rendered":"http:\/\/hesmid.nl\/test\/?p=1001"},"modified":"2014-10-14T10:46:32","modified_gmt":"2014-10-14T08:46:32","slug":"wordpress-custom-colors-in-tinymce-editor","status":"publish","type":"post","link":"https:\/\/hesmid.nl\/test\/wordpress-custom-colors-in-tinymce-editor\/","title":{"rendered":"WordPress Custom colors in TinyMCE editor"},"content":{"rendered":"<p>Source: <a href=\"http:\/\/urosevic.net\/wordpress\/tips\/custom-colours-tinymce-4-wordpress-39\/\" title=\"HOW TO ADD CUSTOM COLOURS TO TINYMCE 4 IN WORDPRESS 3.9+\">HOW TO ADD CUSTOM COLOURS TO TINYMCE 4 IN WORDPRESS 3.9+<\/a><\/p>\n<pre lang=\"php\">\r\nfunction my_mce4_options( $init ) {\r\n\t$default_colours = '\r\n\t\t\"000000\", \"Zwart\"\r\n\t\t';\r\n\t$custom_colours = '\r\n\t\t\"959c51\", \"Groen\",\r\n\t\t\"754c24\", \"Bruin\",\r\n\t\t\"e89638\", \"Oranje\",\r\n\t\t\"5796b5\", \"Blauw\"\r\n\t\t';\r\n\t$init['textcolor_map'] = '['.$default_colours.','.$custom_colours.']';\r\n\t$init['textcolor_rows'] = 1;\r\n\t$init['textcolor_cols'] = 5;\r\n\treturn $init;\r\n}\r\nadd_filter('tiny_mce_before_init', 'my_mce4_options');\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Source: HOW TO ADD CUSTOM COLOURS TO TINYMCE 4 IN WORDPRESS 3.9+ function my_mce4_options( $init ) { $default_colours = &#8216; &#8220;000000&#8221;, &#8220;Zwart&#8221; &#8216;; $custom_colours = &#8216; &#8220;959c51&#8221;, &#8220;Groen&#8221;, &#8220;754c24&#8221;, &#8220;Bruin&#8221;, &#8220;e89638&#8221;, &#8220;Oranje&#8221;, &#8220;5796b5&#8221;, &#8220;Blauw&#8221; &#8216;; $init[&#8216;textcolor_map&#8217;] = &#8216;[&#8216;.$default_colours.&#8217;,&#8217;.$custom_colours.&#8217;]&#8217;; $init[&#8216;textcolor_rows&#8217;] = 1; $init[&#8216;textcolor_cols&#8217;] = 5; return $init; } add_filter(&#8216;tiny_mce_before_init&#8217;, &#8216;my_mce4_options&#8217;);<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[17],"tags":[79],"acf":[],"_links":{"self":[{"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/posts\/1001"}],"collection":[{"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/comments?post=1001"}],"version-history":[{"count":7,"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/posts\/1001\/revisions"}],"predecessor-version":[{"id":1008,"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/posts\/1001\/revisions\/1008"}],"wp:attachment":[{"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/media?parent=1001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/categories?post=1001"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/tags?post=1001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}