Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I noticed when you typein the user's “biographical info” on the profile, it shows up in one page! Looks really terrible. So:

Is there a way to use tinyMCE or other solution for user “biographical info” without messing with any core file, and without any plugin?

Thanks a lot.

share|improve this question
    
Not really sure what you're asking here. It shows up all on one page? What exactly is the issue and what exactly are you trying to accomplish? –  Kevin Langley Jr. Nov 12 '11 at 7:31
    
@Kevin Langly thanks for your response. As I mentioned initially, when you typein the user's “biographical info” on the author bio profile (in the admin), It does not save paragraps, etc. - the entire bio shows up in one big paragraph! I am trying to make stops the stripping of html formatting from the description (bio) field. I hope I made it clear. Thanks again. –  Tara Nov 13 '11 at 1:23

3 Answers 3

I’ve written a plugin that replaces the Biographical Info profile field with the WordPress visual editor, TinyMCE, allowing you to editor an author’s biography using rich text using a new function, wp_editor(), that was released with WordPress 3.3.

http://wordpress.org/extend/plugins/visual-biography-editor/

Using this plugin will ensure that the editor isn’t wiped out with the next core update, which you should definitely do for security reasons.

share|improve this answer
    
Thanks, exactly what I was looking for! –  davemac May 8 '12 at 0:11
up vote 0 down vote accepted

Just adding this to the theme's functions.php solve the problem (prevent stripping of the html from the author's bio):

remove_filter('pre_user_description', 'wp_filter_kses');  
add_filter( 'pre_user_description', 'wp_filter_post_kses' ); 
share|improve this answer

Add this to your functions.php:

/*******************************************
* TinyMCE EDITOR "Biographical Info" USER PROFILE
*******************************************/
function biographical_info_tinymce() {
if ( basename($_SERVER['PHP_SELF']) == 'profile.php' || basename($_SERVER['PHP_SELF']) == 'user-edit.php' && function_exists('wp_tiny_mce') ) {
wp_admin_css(); 
wp_enqueue_script('utils');
wp_enqueue_script('editor');
do_action('admin_print_scripts');
do_action("admin_print_styles-post-php");
do_action('admin_print_styles');
remove_all_filters('mce_external_plugins');

add_filter( 'teeny_mce_before_init', create_function( '$a', '
$a["theme"] = "advanced";
$a["skin"] = "wp_theme";
$a["height"] = "300";
$a["width"] = "440";
$a["onpageload"] = "";
$a["mode"] = "exact";
$a["elements"] = "description";
$a["theme_advanced_buttons1"] = "formatselect, forecolor, bold, italic, pastetext, pasteword, bullist, numlist, link, unlink, outdent, indent, charmap, removeformat, spellchecker, fullscreen, wp_adv";
$a["theme_advanced_buttons2"] = "underline, justifyleft, justifycenter, justifyright, justifyfull, forecolor, pastetext, undo, redo, charmap, wp_help";
$a["theme_advanced_blockformats"] = "p,h2,h3,h4,h5,h6";
$a["theme_advanced_disable"] = "strikethrough";
return $a;' ) );

wp_tiny_mce( true );
}
}
add_action('admin_head', 'biographical_info_tinymce');

. Someone is due for credit on this but i can't remmeber where i have found this..
Anyhow this works great for me

share|improve this answer
    
thanks for youe reponse. TinyMCE shows up above the “biographical info” on the profile. But, how how I make the paragraph break? The text still shows up on the author's page as one long paragraph like before. Thanks again. –  Tara Nov 12 '11 at 19:05
    
Are you sure you clicked ENTER and not SHIFT + ENTER ?? –  Sagive SEO Nov 12 '11 at 19:14
    
Yee, Went ahead and checked it.. your right... paragraphs are bieng cleand out when saving... –  Sagive SEO Nov 12 '11 at 19:22
    
thanks for looking into. Appreciate your time and help. Hope somebody can help make this function work. –  Tara Nov 12 '11 at 20:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.