Hi, I would like to configure the Topics and Reply editors, removing some buttons and adding others, such as the simple image insert button, like this:
So I would like to request that it be allowed to enable/disable buttons of the toolbar editor in the control panel of the WPForo or receive the ideal code snippet to override these functions through the functions.php of my theme. So that it does not conflict with future features that developers are planning for WPForo 😉
@robert potresti aiutarmi con questo? Per favore?
P.S: css hacks (display:none) and "Tiny MCE Advanced" plugin they are not good alternatives
Hi @moisb,
I know this is not recommended because it will be overwritten in the next update.
yes, it'll be overwritten in the next update. You should keep this file and update it after each update.
Please note: wpForo has file attachment option on the editor, also it allows you to embed an image using URL, but we don't recommend to copy it. More info:
https://wpforo.com/docs/root/topics-posts/atatch-file-to-post/
In any case, you can click on {;} toolbar button and check the image source, maybe something is wrong with your copied data.
Hi @sofy. This is a tip to facilitate users to insert/show images directly into the message body. Most users do not know how to add html tags <img> to this and it's neither practical 🙁
I believe that this simple change (activate the image button) makes WPForo even better 🙂
The best thing is to be able to choose the buttons in the bar.
Why someone to have buttons that they are not usefull to him and they are only to somebosy else?
This is how I changed the buttons in the editor in functions.php. However, I didn't write this code myself so I am not sure how good it is:
add_filter( 'wp_editor_settings', function( $settings ){
if ( empty( $settings['tinymce'] ) || ! is_array( $settings['tinymce'] ) )
$settings['tinymce'] = [];
$settings['tinymce']['paste_as_text'] = 'true';
$settings['tinymce']['toolbar1'] = 'bold,italic,underline,codesample,undo,redo';
return $settings;
} );
"toolbar1" defines the buttons that you want to have in the editor.
I also added another TinyMCE plugin this way (codesample).