Support » Plugin: TinyMCE Advanced » How disabled TinyMCE Advanced for buddypress profiles?

  • Hi,

    I am using “TinyMCE Advanced” for the spots from wordpress, but also I use “Buddypress” and “BuddyPress Xprofile Custom Fields Type”. For do that user profiles from buddypress have a plain text, a simply text box I install today the plugin https://github.com/donmik/bp-xprofile-custom-textarea, but it only works for back end options I do not deactivated “TinyMCE Advanced”, but I need to have activated “TinyMCE Advanced” for the wordpress posts.

    How can I put a code in the plugin “TinyMCE Advanced”, for funtions to desactivated “TinyMCE Advanced” for buddyprees profile?

    Some code like this:
    function bp_disable_richtext($enabled, $field_id) {
    $enabled = false;
    return $enabled;
    }
    add_filter(‘bp_xprofile_is_richtext_enabled_for_field’, ‘bp_disable_richtext’, 10, 2);

    Best regards

    Margarita

    • This topic was modified 1 year, 2 months ago by  margarit0.
Viewing 1 replies (of 1 total)
  • try this code in your functions.php or bp-custom plugin:

    // remove ritch text editor from buddypress profile fileds
    
    function antipole_remove_rich_text($field_id = null)
    {
    	if (!$field_id) {
    		$field_id = bp_get_the_profile_field_id('2');
    	}
    
    	$field = xprofile_get_field($field_id);
    	if ($field) {
    		$enabled = false;
    	}
    }
    
    add_filter('bp_xprofile_is_richtext_enabled_for_field', 'antipole_remove_rich_text');
    
Viewing 1 replies (of 1 total)
  • The topic ‘How disabled TinyMCE Advanced for buddypress profiles?’ is closed to new replies.