Replacing Whats-New by Tinymce
I recently replaced whats-new by tinymce. After some customizations, that’s what it looks like (groups): Screenshot
To do that, I took a copy of post-form.php from the legacy theme (/buddypress/bp-templates/bp-legacy/buddypress/activity/post-form.php) and replaced the file of the nouveau theme (/buddypress/bp-templates/bp-nouveau/buddypress/activity/post.form)
Then I changed the code and now it is:
do_action( 'bp_before_activity_post_form' ); ?> <div id="whats-new-content" > <div id="whats-new-textarea"> <label for="whats-new" class="bp-screen-reader-text"><?php /* translators: accessibility text */ _e( 'Post what\'s new', 'buddypress' ); ?></label> <?php $content = ''; $editor_id = 'whats-new'; $settings = array( 'teeny' => false, 'media_buttons' => false, // 'textarea_rows' => 5, 'editor_height' => 100, 'drag_drop_upload' => false, 'quicktags' => false ); wp_editor( $content, $editor_id, $settings ); ?> </div> <div id="whats-new-options"> <div id="whats-new-submit"> <input type="submit" name="aw-whats-new-submit" id="aw-whats-new-submit" value="<?php esc_attr_e( 'Post', 'buddypress' ); ?>" /> </div>
In the code I added, the height of tinymce is 100px but it is always launched with 134px height.
It works with 100px height only with the “teeny” version, but this version doesn’t show the image button I added (using a snippet) and the smiley button (from the wp-monalisa plugin).
I tried to fix the problem with css and the only selector that seems to work is
iframe#whats-new_ifrbut I cannot use
!importantto override this, because it affects the autoresizing feature.
I thought that I could modify it directly on its system file, but I cannot locate it using the plugin “String Locator”
Any idea? I don’t like to leave it with this height, because it is somehow ugly.
Thanks in advance.
- You must be logged in to reply to this topic.