Guest User

Wp Editor on Metabox - attempt 1

a guest
Oct 8th, 2013
235
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. add_action("admin_head","load_custom_wp_tiny_mce");
  2. function load_custom_wp_tiny_mce() {
  3.  
  4. if (function_exists('wp_tiny_mce')) {
  5.  
  6. add_filter('teeny_mce_before_init', create_function('$a', '
  7. $a["theme"] = "advanced";
  8. $a["skin"] = "wp_theme";
  9. $a["height"] = "200";
  10. $a["width"] = "800";
  11. $a["onpageload"] = "";
  12. $a["mode"] = "exact";
  13. $a["elements"] = "att_meta_bio";
  14. $a["editor_selector"] = "mceEditor";
  15. $a["plugins"] = "safari,inlinepopups,spellchecker";
  16.  
  17. $a["forced_root_block"] = false;
  18. $a["force_br_newlines"] = true;
  19. $a["force_p_newlines"] = false;
  20. $a["convert_newlines_to_brs"] = true;
  21.  
  22. return $a;'));
  23.  
  24. wp_tiny_mce(true);
  25. }
  26. }
RAW Paste Data