Important changes to Tiny Cloud pricing > Find out more

NOTE: TinyMCE 5 reached End of Support in April 2023. No more bug fixes, security updates, or new features will be introduced to TinyMCE 5. We recommend you upgrade to TinyMCE 6 or consider TinyMCE 5 Long Term Support (LTS) if you need more time.

Tab Focus plugin

Tab into and out of the TinyMCE control in your web form.

Contribute to this page

This plugin adds the possibility to tab in/out of TinyMCE.

Basic setup

tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  plugins: 'tabfocus'
});

Options

This setting affects the execution of the tabfocus plugin. This setting can be used to change the focus behavior of the editor when the tab key has been pressed inside the editable area.

tabfocus_elements

This option enables you to specify an element ID to focus when the user presses the tab key inside the editor. You can also use the special ":prev" and ":next" values. It will then place the focus on either the previous or next input element placed before/after the TinyMCE instance in the DOM.

Type: String

Example: Using tabfocus_elements

// Move focus to specific element
tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  tabfocus_elements: 'somebutton'
});
// Move focus to next element in DOM
tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  tabfocus_elements: ':prev,:next'
});

Can't find what you're looking for? Let us know.

Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.