I would like to provide our WP users (authors) with a tinyMCE editor instead of standard textarea
for their “Biographical Info” on the Profile page.
I have spent a lot of time searching online for plugins and references for how to accomplish this without a satisfying solution.
Any tips would be appreciated.
I found a very helpful blog post which shows exactly how to accomplish what I am after with only three small changes to the
user-edit.php
page.First Change
I had to add a class name to the
<textarea>
tag for the description.Second Change
I had to add a function call to
wp_tiny_mce()
like so.Note, the first argument of
wp_tiny_mce
(if true) will display the really stripped down version of the editor (like you’d see on the Quick Post).Third Change
By default, WordPress will strip out certain tags (those defined in $allowedtags) from the user description field. So, I found a plugin which basically removes the html restrictions. The plugin is called Weasel’s Html Bios.
The above answer works, however it breaks every time WordPress is updated, isn’t portable, and modifies core WordPress files (a huge no no).
It can be done entirely within hooks and filters in functions.php or a theme, or in a plugin. See here:
https://wordpress.stackexchange.com/a/33575/736
We should add js lib and init editor for id=”description”
As Tom mentions above Itâs probably best not to edit the WordPress core files, those will get wiped out when you update to the latest version.
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.