You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

228 lines
14 KiB

  1. The following new features were added to the {{site.productname}} 5.1 version.
  2. ### Mobile
  3. {{site.productname}} 5.1 provides an improved mobile editor, replacing the existing mobile editor with a touch friendly version on the silver theme.
  4. The new mobile experience comes with a number of user interface changes in addition to the {{site.productname}} "desktop" experience:
  5. * [Mobile devices now use the `silver` theme](#mobiledevicesnowusethesilvertheme).
  6. * [Horizontal contextual menus on mobile](#horizontalcontextualmenusonmobile).
  7. * [Side-scrolling toolbars on mobile](#side-scrollingtoolbarsonmobile).
  8. * [Contextual keyboard settings](#contextualkeyboardsettings).
  9. * [New mobile defaults for selected settings](#newmobiledefaultsforselectedsettings).
  10. * [Table cell selection on mobile](#tablecellselectiononmobile).
  11. * [Touch-friendly split buttons](#touch-friendlysplitbuttons).
  12. The new mobile experience allows most of the {{site.productname}} plugins to work on mobile devices, except for:
  13. * [Comments]({{site.baseurl}}/plugins/comments/).
  14. * [Image tools]({{site.baseurl}}/plugins/imagetools/).
  15. * [MoxieManager]({{site.baseurl}}/plugins/moxiemanager/).
  16. * [Paste]({{site.baseurl}}/plugins/paste/).
  17. * [Permanent Pen]({{site.baseurl}}/plugins/permanentpen/).
  18. * [Print]({{site.baseurl}}/plugins/print/).
  19. To ensure the mobile editor functions as intended, add the following `meta` tag to the `head` of pages using {{site.productname}}.
  20. ```html
  21. <meta name="viewport" content="width=device-width, initial-scale=1">
  22. ```
  23. > Note: iPads do not use the `mobile` part 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.
  24. #### Mobile devices now use the `silver` theme
  25. The mobile experience provided for {{site.productname}} 4.7 through {{site.productname}} 5.0 has been deprecated in {{site.productname}} 5.1.
  26. | **Legacy mobile experience**<br />( {{site.productname}} 4.7 through {{site.productname}} 5.0 ) | **New mobile experience**<br />( {{site.productname}} 5.1 + ) |
  27. | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
  28. | ![{{site.productname}} legacy mobile experience]({{site.baseurl}}/images/legacy_mobile_exp.png) | ![{{site.productname}} 5.1+ mobile experience]({{site.baseurl}}/images/5_1_mobile_exp.png) |
  29. To revert to the legacy mobile theme, add the mobile theme to the {{site.productname}} configuration, such as:
  30. ```js
  31. tinymce.init({
  32. mobile: {
  33. theme: 'mobile'
  34. }
  35. });
  36. ```
  37. > **Note:** No enhancements have been made to the legacy mobile theme. all the changes described in these release notes relate to the `silver` theme on mobile devices.
  38. For information on:
  39. * Using the `silver` theme for mobile, see: [TinyMCE Mobile]({{site.baseurl}}/mobile/).
  40. * Using the legacy `mobile` theme, see: [TinyMCE Mobile - The legacy mobile theme]({{site.baseurl}}/mobile/#thelegacymobiletheme).
  41. #### Horizontal contextual menus on mobile
  42. Contextual menus are now mobile friendly, with an update to be horizontal on mobile devices. Contextual menus will open when a long-press is used on mobile devices. They also [side-scroll](#side-scrollingtoolbarsonmobile) to allow larger lists of items to be available on mobile devices.
  43. For example:
  44. <img alt="Example of the side-scrolling toolbar and contextual toolbar" src="{{site.baseurl}}/images/side-scrolling-context-toolbar.png" style="display:block;margin-left:auto;margin-right:auto;max-width:50%;border: 1px solid #036DD5" />
  45. #### Side-scrolling toolbars on mobile
  46. Toolbars and [horizontal menus](#horizontalcontextualmenusonmobile) side-scroll using "swipe" gestures on mobile devices. This allows longer toolbars to be used without occupying too much screen space. This feature removes the need for a toolbar drawer on mobile devices.
  47. #### Contextual keyboard settings
  48. A new `inputMode` configuration setting for dialog components has been added to provide contextual onscreen keyboards on mobile devices. Dialogs in {{site.productname}}, the core {{site.productname}} plugins, and the premium {{site.productname}} plugins have been updated to use `inputMode`.
  49. For information on using `inputMode`, see: [Dialog components - `inputMode`]({{site.baseurl}}/ui-components/dialogcomponents/#inputmode).
  50. #### New mobile defaults for selected settings
  51. 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.
  52. The following settings have mobile-specific default values:
  53. * [`menubar`]({{site.baseurl}}/configure/editor-appearance/#menubar) - defaults to `false` on mobile phones.
  54. * [`toolbar_drawer`]({{site.baseurl}}/configure/editor-appearance/#toolbar_drawer) - defaults to `false` on mobile devices. The toolbar will [side-scroll by default](#sidescrollingtoolbarsonmobile).
  55. * [`toolbar_sticky`]({{site.baseurl}}/configure/editor-appearance/#toolbar_sticky) - Sticky Toolbar is not supported on mobile devices and defaults to `false`.
  56. * [`table_grid`]({{site.baseurl}}/plugins/table/#table_grid) - Table grid is not supported on mobile devices and defaults to `false`. When creating tables on mobile, a dialog is shown instead of the table grid.
  57. * [`resize`]({{site.baseurl}}/configure/editor-appearance/#resize) - Resizing is not supported on mobile devices and defaults to `false`.
  58. * [`object_resizing`]({{site.baseurl}}/configure/advanced-editing-behavior/#object_resizing) - Object resizing is not supported on mobile devices and defaults to `false`.
  59. To override these mobile defaults, add the setting to the `mobile` configuration, such as:
  60. ```js
  61. tinymce.init({
  62. selector: 'textarea',
  63. mobile: {
  64. menubar: true
  65. }
  66. });
  67. ```
  68. #### Table cell selection on mobile
  69. The [table plugin]({{site.baseurl}}/plugins/table/) has been updated to provide _touch selection handles_ on touch devices. The touch selection handles allow users to select a range of table cells on touch devices.
  70. For example:
  71. <img alt="Touch selector handles for selecting multiple table cells" src="{{site.baseurl}}/images/table_cell_touch_selector_handles.png" style="display:block;margin-left:auto;margin-right:auto;max-width:50%;border: 1px solid #036DD5" />
  72. #### Touch-friendly split buttons
  73. The styling on [split buttons]({{site.baseurl}}/ui-components/typesoftoolbarbuttons/#splitbutton) has been updated to include more padding so they are easier to interact with on touch devices.
  74. ### Sticky Toolbar
  75. A Sticky Toolbar (or Docking Toolbar), docks the toolbar and the menu to the top of the screen when scrolling down a web page until the editor is no longer visible.
  76. For information on the Sticky Toolbars, see: [Enabling Sticky Toolbars]({{site.baseurl}}/configure/editor-appearance/#toolbar_sticky).
  77. ### General changes
  78. #### Changes to the Env API for platform detection
  79. New platform detection functions have been added to the [`Env` API]({{site.baseurl}}/api/tinymce/tinymce.env/), allowing for some older detection properties to be deprecated.
  80. ##### New Env API properties
  81. | Property | Type | Description |
  82. | ----------------- | ------ | ------------------------------------------------------------- |
  83. | `browser.current` | String | Returns the current browser name. |
  84. | `browser.version` | Object | Returns the current browser major and minor version. |
  85. | `os.current` | String | Returns the current operating system name. |
  86. | `os.version` | Object | Returns the current operating system major and minor version. |
  87. ##### New Env methods
  88. | Method | Type | Description |
  89. | ---------------------- | ------- | -------------------------------------------------------------------- |
  90. | `browser.isEdge` | Boolean | Returns `true` if the user's browser is Microsoft Edge. |
  91. | `browser.isChrome` | Boolean | Returns `true` if the user's browser is Google Chrome. |
  92. | `browser.isIE` | Boolean | Returns `true` if the user's browser is Microsoft Internet Explorer. |
  93. | `browser.isOpera` | Boolean | Returns `true` if the user's browser is Opera. |
  94. | `browser.isFirefox` | Boolean | Returns `true` if the user's browser is Firefox. |
  95. | `browser.isSafari` | Boolean | Returns `true` if the user's browser is Safari. |
  96. | `os.isWindows` | Boolean | Returns `true` if the user's operating system is Microsoft Windows. |
  97. | `os.isiOS` | Boolean | Returns `true` if the user's operating system is iOS. |
  98. | `os.isAndroid` | Boolean | Returns `true` if the user's operating system is Android. |
  99. | `os.isOSX` | Boolean | Returns `true` if the user's operating system is Mac OS X. |
  100. | `os.isLinux` | Boolean | Returns `true` if the user's operating system is Linux. |
  101. | `os.isSolaris` | Boolean | Returns `true` if the user's operating system is Solaris. |
  102. | `os.isFreeBSD` | Boolean | Returns `true` if the user's operating system is FreeBSD. |
  103. | `deviceType.isDesktop` | Boolean | Returns `true` if the user's device is a desktop device. |
  104. | `deviceType.isiPad` | Boolean | Returns `true` if the user's device is an iPad. |
  105. | `deviceType.isiPhone` | Boolean | Returns `true` if the user's device is an iPhone. |
  106. | `deviceType.isPhone` | Boolean | Returns `true` if the user's device is a phone. |
  107. | `deviceType.isTablet` | Boolean | Returns `true` if the user's device is a tablet. |
  108. | `deviceType.isTouch` | Boolean | Returns `true` if the user's device is a touch device. |
  109. | `deviceType.isWebView` | Boolean | Returns `true` if the user's device is a WebView device. |
  110. For a list of deprecated `Env` APIs, see: [Deprecated API Properties - `tinymce.Env`](#deprecatedapiproperties-tinymceenv).
  111. #### Added new `referrer_policy` setting
  112. Used for setting the level referrer information sent when loading plugins and CSS. Referrer policies can be used to:
  113. * Improve the privacy of end-users.
  114. * Assist with server-side filtering of cross-origin requests for {{site.productname}} resources.
  115. For information on using the `referrer_policy` setting, see: [Integration and setup options - `referrer_policy`]({{site.baseurl}}/configure/integration-and-setup/#referrer_policy).
  116. #### Added a dark content css skin
  117. A dark `content_css` skin has been added to compliment the dark user interface skin.
  118. For example:
  119. {% include codepen.html id="dark-mode" %}
  120. For information on using the dark version of the default skin, see: [Customizing the editor UI - Skins]({{site.baseurl}}/general-configuration-guide/customize-ui/#skins).
  121. #### Added border width to Table cell dialog
  122. The table plugin has been updated to include a **Border width** field in the table **Cell dialog**. The field will accept any [valid CSS length](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units#Lengths).
  123. For example:
  124. <img alt="Cell Properties Dialog with new Border Width field" src="{{site.baseurl}}/images/border-width-cell-props.png" style="display:block;margin-left:auto;margin-right:auto;max-width:50%;border: 1px solid #036DD5" />
  125. #### Changed the default `toolbar_drawer` to `floating`
  126. The default for the `toolbar_drawer` setting has been changed from `false` to `floating`. For information on the `toolbar_drawer` setting, see: [User interface options - `toolbar_drawer`]({{site.baseurl}}/configure/editor-appearance/#toolbar_drawer).
  127. #### Icon changes
  128. In {{site.productname}} 5.0, the same icon (`paragraph`) was used for the toolbar buttons `visualchars` and `visualblocks`.
  129. To improve the user experience:
  130. * The `paragraph` icon has been renamed `visualchars` and is used for the `visualchars` toolbar button: ![`paragraph` renamed to `visualchars`]({{site.baseurl}}/images/icons/visualchars.svg)
  131. * A new `visualblocks` icon is used for the `visualblocks` toolbar button: ![New visualblocks icon]({{site.baseurl}}/images/icons/visualblocks.svg)
  132. #### Fixes to the positioning of inline dialogs and menus
  133. Fixes for inline dialogs and menus have been included to:
  134. * Position inline dialogs correctly when the page is scrolled.
  135. * Reposition inline dialogs and menus when resizing {{site.productname}}.
  136. ### Premium Plugins
  137. #### PowerPaste
  138. The {{site.productname}} 5.1 release includes **PowerPaste** 5.2.0.
  139. **PowerPaste** _5.0_ included a change to the `Remove Formatting` functionality to filter out inline style elements (such as `strong`, `b`, `em`, `i`, and `sub`), in-line with other editor functionality.
  140. **PowerPaste** _5.1.1_ **reverses the _5.0_ change** and includes a new `powerpaste_clean_filtered_inline_elements` setting. This setting accepts a list of inline style elements to be filtered. These inline elements will be filtered on `clean` or `Remove Formatting` paste.
  141. To retain the _5.0_ default inline style element filter, add the following setting to `tinymce.init`:
  142. ```js
  143. powerpaste_clean_filtered_inline_elements: 'strong,em,b,i,u,strike,sup,sub,font'
  144. ```
  145. For information on `powerpaste_clean_filtered_inline_elements`, see: [PowerPaste - `powerpaste_clean_filtered_inline_elements`]({{site.baseurl}}/plugins/powerpaste/#powerpaste_clean_filtered_inline_elements).
  146. #### Page Embed
  147. The {{site.productname}} 5.1 release includes **Page Embed** 1.0.1.
  148. **Page Embed** 1.0.1 has been updated to include a touch event listener to allow embedded media to execute on mobile platforms.
  149. #### Format Painter
  150. The {{site.productname}} 5.1 release includes **Format Painter** 1.2.0.
  151. **Format Painter** 1.2.0 has been updated to support the mobile platforms. The **Format Painter** will now function as expected for mobile users.
  152. #### Checklist
  153. The {{site.productname}} 5.1 release includes **Checklist** 1.0.1.
  154. **Checklist** 1.0.1 includes a fix to allow checklist items to be toggled on an iPad.
  155. #### Mentions
  156. The {{site.productname}} 5.1 release includes **Mentions** 2.1.0.
  157. **Mentions** 2.1.0 has been updated to allow for the inclusion of "extra" menu items, such as additional results or search items. For details, see: [Mentions - `mentions_fetch`]({{site.baseurl}}/plugins/mentions/#mentions_fetch).