Sorry, i have no idea how to do that.
@danbp Do you know what file the reply form is in?
buddypress/bp-templates/bp-legacy/buddypress/activity/entry.php
Go here to search inside BuddyPress
@danbp Thanks
I almost got it working.
I replaced lines 127 – 129 in the entry.php with this:
<div class="ac-textarea">
<?php do_action( 'activity_reply_textarea' ); ?>
</div>
I then added this to my functions:
function bpfr_reply_tiny_editor() {
// deactivation of the visual tab, so user can't play with template styles
add_filter ( 'reply_user_can_richedit' , create_function ( '$a' , 'return false;' ) , 50 );
// adding tinymce tools
$editor_id = 'ac-input-bp_activity_id-';
$editor_class = 'ac-input bp-suggestions';
$settings = array(
'textarea_name' => 'ac_input_bp_',
'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( 'activity_reply_textarea', 'bpfr_reply_tiny_editor' );
However I can’t figure out how to add bp_activity_id() to the $editor_id or ‘textarea_name’ =>. So of course it only works on the first reply box. Any ideas on how I can fix this?
Thanks
This snippet may work… (untested)
function bpfr_reply_tiny_editor() {
$editor_id = 'ac-input-'. bp_get_activity_id();
$area_name = 'ac_input_'. bp_get_activity_id();
$settings = array(
'textarea_name' => $area_name,
'editor_class' => 'ac-input bp-suggestions',
'media_buttons' => false,
'teeny' => true,
'quicktags' => true
);
wp_editor( $content, $editor_id, $settings );
}
add_action( 'activity_reply_textarea', 'bpfr_reply_tiny_editor' );
@henrywright, any thought about this ? I’m really unsure with that 🙂
@danbp THANKS! That got it working. I was trying to do that in the array without thinking. 😛
Glad you got it to work !
I tested it right now, and must say that it doesn’t work correctly with twenty twelve. I can’t publish as i have no focus in the editor. But i have a lot of plugins and custom functions running. Maybe a JS conflict….
@danbp I tested everything and it seems to be working. Did you change the entry.php?
@danbp I’m also using it in the main editor per your instructions on that other page. Not sure if that makes a difference.