Notifications
Clear all

Suggestion [Closed] Customizable editor

11 Posts
4 Users
7 Reactions
1,365 Views
Posts: 16
Topic starter
(@ananimelover)
Eminent Member
Joined: 3 years ago

This is a continuation from my question about adding tables. I wanted to draw wider attention to the editor as a whole. In the original topic, I asked if the editor could be expanded upon, specifically to allow the editor menu to be visible. I've since gotten it to work by editing the php myself in combination with the Advanced Editor Tools plugin. 

There's an interesting effect where half of the toolbar works when drafting a post and the other half when editing the post, eventhough all instances of php hooks which calls the editor buttons look exactly the same.

Needless to say, trying to get wpForo to comply with your needs by editing the php isn't very user-friendly. At the same time, the editor options wpForo does give by default are limited to put it nicely. 

I'd like for wpForo 2.0 to have either a richer text editor or, better yet, a customizable text editor like the Advanced Editor Tools. Alternatively, to have AET intergration and take over wpForo's classic editor completely.

10 Replies
Chris
Posts: 3627
(@chris)
Famed Member
Joined: 3 years ago

Hi @ananimelover,

wpForo editor is the same TinyMCE editor, it'll not be changed in 2.0 version,

7 Replies
(@ananimelover)
Joined: 3 years ago

Eminent Member
Posts: 16

@chris maybe an idea for a paid addon though?

Chris
(@chris)
Joined: 3 years ago

Famed Member
Posts: 3627

@ananimelover,

in Dashboard > Plugins > Add New, Search for TinyMCE and in the list you can try to find a plugin which will make the TinyMCE editor More reacher.

Chris
(@chris)
Joined: 3 years ago

Famed Member
Posts: 3627

For Example: https://wordpress.org/plugins/tinymce-advanced/

We hadn't checked this plugin workability, so you can try yourself.

(@wp-henne)
Joined: 2 years ago

Trusted Member
Posts: 29

Hello @chris,

i have tried div. things, but i get no success with the mentioned plugin with the current wpForo and no matter which theme (2022 or Classic) and no matter which layout.

Has something changed after all?

Tutrix
(@tutrix)
Joined: 5 years ago

Noble Member
Posts: 1453

@wp-henne 

what function are you missing in the editor
you can add this via the functions.php of your wp-theme
example see attachment

 

(@wp-henne)
Joined: 2 years ago

Trusted Member
Posts: 29

@tutrix genial!

I'd like to ad two buttons to have easy access for shortcodes. So the buttons "only" need to paste some fixed text o - when it's possible - the current user-id.

I'm familar with adding via functions.php. I've found a solution here to eleminate some buttons.

So i'm very pleased, if you will give me a lift 🙂

 

(@wp-henne)
Joined: 2 years ago

Trusted Member
Posts: 29

@tutrix 

https://wpforo.com/community/postid/47409/

That's what I found, how something is removed. But how does it go in the other way?

Tutrix
Posts: 1453
(@tutrix)
Noble Member
Joined: 5 years ago

Posted by: @wp-henne

So i'm very pleased, if you will give me a lift 🙂

the open source plugins for the editor you can see here > https://www.tiny.cloud/docs/tinymce/6/plugins/
you can activate all of them for wpforo
if there is one for your purposes you have to test
maybe the template plugin

Tutrix
Posts: 1453
(@tutrix)
Noble Member
Joined: 5 years ago

Posted by: @wp-henne

ut how does it go in the other way?

my code for more buttons currently looks like this

add_filter( 'wpforo_editor_settings', function( $settings ){
if ( empty( $settings['tinymce'] ) || ! is_array( $settings['tinymce'] ) )
$settings['tinymce'] = [];
$settings['plugins']             = 'compat3x,fullscreen,hr,paste,textcolor,lists,table,visualblocks,visualchars,insertdatetime,charmap,searchreplace,anchor,advlist';
$settings['tinymce']['toolbar1'] = 'fontsizeselect,bold,italic,underline,strikethrough,forecolor,bullist,numlist,hr,alignleft,aligncenter,alignright,alignjustify,link,unlink,blockquote,pre,wpf_spoil,undo,redo,pastetext,source_code,emoticons,fullscreen';
$settings['tinymce']['toolbar2'] = 'cut,subscript,superscript,outdent,indent,backcolor,removeformat,table,visualblocks,visualchars,insertdatetime,formats,charmap,styleselect,fontselect,searchreplace,anchor';
return $settings;
});

toolbar 1 standard buttons
toolbar 2 new Buttons

remove buttons you don't need

the missing TinyMCE plugins you have to add under
wp-includes > js > tinymce > plugins

so that the buttons are not displayed in the signature editor, add the empty toolbar2

		/**
		 * start init tinymce settings
		 */
		$wp_editor_settings                        = WPF()->tpl->editor_buttons();
		$wp_editor_settings['tinymce']['toolbar1'] = 'bold,italic,link,unlink,undo,redo,source_code,emoticons';
		$wp_editor_settings['tinymce']['toolbar2'] = '';
		$wp_editor_settings['plugins']             = '';

wpforo > classes > member.php