• Resolved kevin heath

    (@ypraise)


    I’m currnetly working on developing the user bio box to take a tinymce editor under wordpress 3.3 ready for when I up date my sites. I’m currently working on a clean 3.3 install and on twenty ten theme.

    At the moment I am hard coding the user-edit.php file but once I get it working I will be developing a plugin or using my theme functions file to change the core file of bio textbox.

    so far I have got the tinymice editor showing on the bio box and when I style the content and save the user profile shows correctly however –
    the editor visual box shows the html code on save and when I update again then the profile page losses the formatting and displays the html tags wrapped around the text.

    I have no other plugins running on the dev site – it’s local here so I can not point your in the direction of the actual site.

    This is what I have done so far to get the tinymce editor to show and operate:

    In my functions file I have added :

    remove_filter('pre_user_description', 'wp_filter_kses');

    In the user-edit.php file I have replaced: (line 373 – 377)

    <td><input type="password" name="pass1" id="pass1" size="16" value="" autocomplete="off" /> <span class="description"><?php _e("If you would like to change the password type a new one. Otherwise leave this blank."); ?></span><br />
    		<input type="password" name="pass2" id="pass2" size="16" value="" autocomplete="off" /> <span class="description"><?php _e("Type your new password again."); ?></span><br />
    		<div id="pass-strength-result"><?php _e('Strength indicator'); ?></div>
    		<p class="description indicator-hint"><?php _e('Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ & ).'); ?></p>
    	</td>

    with:

    <td>
    	<?php
    	$settings = array('wpautop' => true, 'media_buttons' => true, 'quicktags' => true );
    	wp_editor(($profileuser->description), 'description', $settings); ?>
    	<br />
    	<span class="description"><?php _e('Share a little biographical information to fill out your profile. This may be shown publicly.'); ?></span></td>

    I’m probably missing something somewhere so if anyone can spot it please let me know.

    I have gone through all the proccesses associated with the tinymce issues and upgrade.

    There are some browser issues for IE8 and the drop down menu on the tinymce such as font size and format etc but that’s not a big deal.

    thanks
    Kevin

Viewing 1 replies (of 1 total)
  • Thread Starter kevin heath

    (@ypraise)

    Ok looks like I may have a fix for this issue.

    Just in case someone else is having the same issue of html tags appearing in the tinymce edotr try adding html_entity_decode to your string.

    In my case I replaced
    wp_editor(($profileuser->description), 'description', $settings);

    with:

    wp_editor(html_entity_decode($profileuser->description), 'description', $settings);

    hope it helps someone.

    Now it’s the Christmas break so Merry Christmas everyone.

    Next year I’ll try and produce a plugin to add a tinymce to user bio textbox without needing to hack core code.

    Kevin

Viewing 1 replies (of 1 total)
  • The topic ‘html showing in editor in wordpress 3.3’ is closed to new replies.