| layout | default |
|---|---|
| title | TinyMCE Mobile |
| title_nav | Mobile |
| description | The TinyMCE rich text editing experience for mobile devices. |
| keywords | mobile tablet |
{{site.productname}} {{site.productminorversion}} provides an improved mobile editor, replacing the existing mobile editor with a touch friendly version on the silver theme.
The new mobile experience comes with a number of user interface changes in addition to the {{site.productname}} "desktop" experience:
- Mobile devices now use the
silvertheme. - Horizontal contextual menus on mobile.
- Side-scrolling toolbars and contextual menus on mobile.
- Contextual keyboard settings for dialogs using
inputMode. - Mobile defaults for selected settings.
- Table cell selection on mobile.
The new mobile experience allows most of the {{site.productname}} plugins to work on mobile devices, except for:
{{site.productname}} will detect the platform and show an optimal UI experience based on the device type and screen size.
Note: iPads do not use the
mobilepart of the {{site.productname}} init configuration. This is due to a constraint added by Apple to return the environment as a "desktop environment" for iPads. iPads users will receive the other changes to touch functionality, such as context toolbars and context menus.
{% include misc/mobile_platform_compatibility.md %}
Add the following meta tag to the head of pages using {{site.productname}} to ensure the mobile user interface functions as intended.
<meta name="viewport" content="width=device-width, initial-scale=1">To set mobile specific settings, add the setting to the mobile configuration, such as:
tinymce.init({
selector: 'textarea',
mobile: {
menubar: true
}
});These mobile-specific default values have been set to disable unsupported settings for mobile devices or to provide the best experience without configuration from developers.
The following settings have mobile-specific default values:
menubar- defaults tofalseon mobile phones.toolbar_drawer- defaults tofalseon mobile devices. The toolbar will side-scroll by default.toolbar_sticky- Sticky Toolbar is not supported on mobile devices and defaults tofalse.table_grid- Table grid is not supported on mobile devices and defaults tofalse. When creating tables on mobile, a dialog is shown instead of the table grid.resize- Resizing is not supported on mobile devices and defaults tofalse.object_resizing- Object resizing is not supported on mobile devices and defaults tofalse.
The following settings are not supported on mobile devices:
- Inline editing mode.
- Distraction-free editing mode.
inline.toolbar_sticky.table_grid.resize.object_resizing.
The mobile experience provided for {{site.productname}} 4.7 through {{site.productname}} 5.0 has been deprecated as of {{site.productname}} 5.1.
To revert to the legacy mobile theme, add the mobile theme to the {{site.productname}} configuration, such as:
tinymce.init({
mobile: {
theme: 'mobile'
}
});The plugins supported by legacy mobile theme are limited to the autosave, autolink, and lists plugins.
To add these plugins to the legacy mobile theme, add a plugin entry to the mobile section. For example:
tinymce.init({
selector: 'textarea',
theme: 'silver',
mobile: {
theme: 'mobile',
plugins: 'autosave lists autolink'
}
});The legacy TinyMCE theme mobile supports a subset of the toolbar items, which can configured using the mobile: toolbar setting, such as:
tinymce.init({
selector: 'textarea',
theme: 'silver',
mobile: {
theme: 'mobile',
plugins: 'autosave lists autolink',
toolbar: 'undo bold italic styleselect'
}
});Below are the toolbar items supported for the legacy mobile theme, and the plugins/configuration required.
Note: The
listfunctions require the lists plugin andstyleselectrequires configuring style_formats.
| Name | Function | Plugins Required | Configuration |
|---|---|---|---|
| undo | Undo operation | ||
| redo | Redo operation | ||
| bold | Bold formatting operation | ||
| italic | Italic formatting operation | ||
| underline | Underline formatting operation | ||
| link | Insert / Edit a hyperlink | ||
| unlink | Remove an existing hyperlink | ||
| image | Insert an image | ||
| bullist | Insert an unordered list | [lists]({{ site.baseurl }}/plugins/lists) | |
| numlist | Insert an ordered list | [lists]({{ site.baseurl }}/plugins/lists) | |
| fontsizeselect | Change the font size | ||
| forecolor | Apply a foreground color | ||
| styleselect | Apply a custom style | [style_formats]({{ site.baseurl }}/configure/editor-appearance/#style_formats) | |
| removeformat | Removes any inline formatting |