Advertisement
Guest User

Untitled

a guest
Apr 8th, 2021
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. function my_mce4_options($init) {
  2. $default_colours = '"000000", "Black",
  3. "993300", "Burnt orange",
  4. "333300", "Dark olive",
  5. "003300", "Dark green",
  6. "003366", "Dark azure",
  7. "000080", "Navy Blue",
  8. "333399", "Indigo",
  9. "333333", "Very dark gray",
  10. "800000", "Maroon",
  11. "FF6600", "Orange",
  12. "808000", "Olive",
  13. "008000", "Green",
  14. "008080", "Teal",
  15. "0000FF", "Blue",
  16. "666699", "Grayish blue",
  17. "808080", "Gray",
  18. "FF0000", "Red",
  19. "FF9900", "Amber",
  20. "99CC00", "Yellow green",
  21. "339966", "Sea green",
  22. "33CCCC", "Turquoise",
  23. "3366FF", "Royal blue",
  24. "800080", "Purple",
  25. "999999", "Medium gray",
  26. "FF00FF", "Magenta",
  27. "FFCC00", "Gold",
  28. "FFFF00", "Yellow",
  29. "00FF00", "Lime",
  30. "00FFFF", "Aqua",
  31. "00CCFF", "Sky blue",
  32. "993366", "Red violet",
  33. "FFFFFF", "White",
  34. "FF99CC", "Pink",
  35. "FFCC99", "Peach",
  36. "FFFF99", "Light yellow",
  37. "CCFFCC", "Pale green",
  38. "CCFFFF", "Pale cyan",
  39. "99CCFF", "Light sky blue",
  40. "CC99FF", "Plum"';
  41.  
  42. $custom_colours = '"E14D43", "Color 1 Name",
  43. "D83131", "Color 2 Name",
  44. "ED1C24", "Color 3 Name",
  45. "F99B1C", "Color 4 Name",
  46. "50B848", "Color 5 Name",
  47. "00A859", "Color 6 Name",
  48. "00AAE7", "Color 7 Name",
  49. "282828", "Color 8 Name"';
  50.  
  51. // build colour grid default+custom colors
  52. $init['textcolor_map'] = '['.$default_colours.','.$custom_colours.']';
  53.  
  54. // enable 6th row for custom colours in grid
  55. $init['textcolor_rows'] = 6;
  56.  
  57. return $init;
  58. }
  59. add_filter('tiny_mce_before_init', 'my_mce4_options');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement