Tagged: wysiwyg editor
-
AuthorPosts
-
December 20, 2023 at 5:59 pm #1428623
Possible to add tool bar options to the WYSIWYG editor in Enfold (specifically the Text Field) module? and if so can you point me in the right direction on how to do it?
December 22, 2023 at 1:02 pm #1428746Hey integritive,
Thanks for your question, the Advanced Layout Builder (ALB) text element uses the WordPress TinyMCE editor, so you could use a plugin like Advanced Editor Tools aka: TinyMCE Advanced to add items to the toolbar

or perhaps other plugins will also add items, but we don’t have a specific way to do this only of the ALB.
If you don’t want to use a plugin, perhaps you cound use the TinyMCE documentation to create your own items.Best regards,
MikeDecember 22, 2023 at 7:44 pm #1428762one hook that might help is : tiny_mce_before_init
what do you like to have added?
December 22, 2023 at 8:38 pm #1428764thanks! — at this point only font size, but I’m sure the client will want more
December 22, 2023 at 11:13 pm #1428766December 23, 2023 at 7:54 am #1428773i would follow Mike – and try the plugin. But here is the way i mentioned.
this to your child theme functions.php:function wp_tinymce_more_buttons( $buttons ) { if ( ! in_array( "fontsizeselect", $buttons ) ) { $buttons[] = 'fontsizeselect'; } if ( ! in_array( "backcolor", $buttons ) ) { $buttons[] = 'backcolor'; } if ( ! in_array( "alignjustify", $buttons ) ) { $buttons[] = 'alignjustify'; } if ( ! in_array( "underline", $buttons ) ) { $buttons[] = 'underline'; } return $buttons; } add_filter( 'mce_buttons_2', 'wp_tinymce_more_buttons', 99999 ); // if you choose here mce_buttons_3 - then it will be in another buttons-row function add_font_size_to_tinymce( $initArray ){ $initArray['fontsize_formats'] = "9px 10px 12px 13px 14px 16px 18px 21px 24px 28px 32px 36px"; return $initArray; } add_filter( 'tiny_mce_before_init', 'add_font_size_to_tinymce' );December 23, 2023 at 12:26 pm #1428776 -
AuthorPosts
- You must be logged in to reply to this topic.

