TinyMCE - superscript button in backend text editor
-
Hey there,
I use quite a lot of superscript numbers in my texts. I can insert them using <sup> but it is time-consuming.
I tried to activate the extra superscript buttons in the normal text editor bar. I added the following code to ThemeFunctions.php, which I was hoping would trigger the hidden TinyMCE button:
function my_mce_buttons_2( $buttons ) { /** * Add in a core button that's disabled by default */ $buttons[] = 'superscript'; $buttons[] = 'subscript'; return $buttons; } add_filter( 'mce_buttons_2', 'my_mce_buttons_2' );This didn't have any impact on the backend text editor. I tried a few iterations of the same code, but same thing.
After reading a few other posts on here talking about TinyMCE, I am guessing you are using a custom text editor and it's not possible to add these superscript buttons. Is that right? If there's a way to show them, please do let me know :)
Thanks!
Jonas -
Dear @jtob
this is probably true.Ok, thank you for writing. We will have a look also with Armin and hope to get back to you as soon as possible.
Thank you for using LayTheme!
Marius -
i change buttons like this too:
add_filter( 'mce_buttons' , array($this, 'add_textformats_button_if_textformats_everywhere'), 10, 2 ); add_filter( 'mce_buttons_2' , array($this, 'second_tinymce_button_row'), 10, 2 );and then
function second_tinymce_button_row($buttons, $editor_id){ $everywhere = get_option('gridder_options_textformats_everywhere', ''); $minimal_buttons = get_option( 'gridder_options_minimal_wysiwyg_buttons', "" ); if($everywhere == "on" && $minimal_buttons == "on"){ return array(); } return $buttons; }not sure why it doesnt work for u
i cant really help u here
-
ah lol
maybe try the filter
mce_buttons
instead of
mce_buttons_2
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login