hi @stefanolusetti-1,
here we go !
You already copied buddypress/bp-templates/bp-legacy/buddypress/activity/post-form.php
to the right place in your child-theme:
/child-theme/buddypress/activity/post-form.php
Excellent! Here’s more.
We’re going to use the wp_editor function to accomplish the task.
Note: wp_editor can replace any textarea. This means that if you use these function, that you have to remove the original textarea first.
The above function use the new drag_drop_upload support introduced in WP 3.9
First we go to remove the whats new textarea from this file, around line 29, and replace it with a custom action hook: whats_new_textarea
Before
<div id="whats-new-textarea">
<textarea name="whats-new" id="whats-new" cols="50" rows="10"><?php if ( isset( $_GET['r'] ) ) : ?>@<?php echo esc_textarea( $_GET['r'] ); ?> <?php endif; ?></textarea>
</div>
After
<div id="whats-new-textarea">
?php do_action( 'whats_new_textarea' ); ?>
</div>
Save.
Now go to /plugins/bp-custom.php (if the file doesn’t exist, you have to create it) and paste in this snippet.
function bpfr_whats_new_tiny_editor() {
// deactivation of the visual tab, so user can't play with template styles
add_filter ( 'user_can_richedit' , create_function ( '$a' , 'return false;' ) , 50 );
// building the what's new textarea
if ( isset( $_GET['r'] ) ) :
$content = esc_textarea( $_GET['r'] );
endif;
// adding tinymce tools
$editor_id = 'whats-new';
$settings = array(
'textarea_name' => 'whats-new',
'teeny' => true,
'media_buttons' => true,
'drag_drop_upload' => true,
'quicktags' => array(
'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close'));
// get the editor
wp_editor( $content, $editor_id, $settings );
}
add_action( 'whats_new_textarea', 'bpfr_whats_new_tiny_editor' );
Save and enjoy !