TinyMCE 6.1.2

These are the Tiny Cloud and TinyMCE Enterprise release notes. For information on the latest community version of TinyMCE, see the TinyMCE Changelog.

Overview

TinyMCE 6.1.2 was released for TinyMCE Enterprise and Tiny Cloud on Wednesday, August 3rd, 2022. It includes TinyMCE 6.1.2. These release notes provide an overview of the changes for TinyMCE 6.1.2:

Bug fixes

Invalid special elements were not cleaned up correctly during sanitization

In TinyMCE 5.x, loading data that contained invalid special elements resulted in the invalid elements and their contents being removed before the data was placed in a TinyMCE document.

In TinyMCE 6, a change to the DomParser introduced a regression: invalid elements were still filtered out, but their contents were placed in the TinyMCE document as plain text.

The TinyMCE 6.1.2 update reverts this regression. When input data is being parsed by TinyMCE 6.1.2, invalid elements and their contents are both removed, as happened previously and is expected.

An exception was thrown when deleting all content if the start or end of the document had a contenteditable="false"

If the first or last element in a TinyMCE document had a contenteditable="false" property and the entire TinyMCE document was selected (eg, Edit > Select All was chosen), pressing the Delete or Backspace key resulted in a console error: Uncaught Error: Node cannot be null or undefined.

With this update, the exception is no longer thrown in this circumstance. In TinyMCE 6.1.2, selecting all of a TinyMCE document that includes a contenteditable="false" element at the beginning or end of the document and deleting the selected contents produces no console error.

When a sidebar was opened using the sidebar_show option, its associated toolbar button was not highlighted

If a TinyMCE instance is set to initialize with both a sidebar and an associated toolbar button, the toolbar button should be highlighted.

If, for example, a TinyMCE instance

  1. presents a toolbar which includes a Show comments button — toolbar: "showcomments" and

  2. has Comments set to appear at initialization — sidebar_show: "showcomments"

the Show Comments button should be highlighted on TinyMCE initialization.

However, in TinyMCE 6.1, if a sidebar and its associated toolbar button were both set to appear on initialization, the associated toolbar button was not highlighted.

With the TinyMCE 6.1.2 update, this visual misbehavior has been corrected. When a sidebar is set to show on initialization, the associated toolbar button, if present, is now highlighted.

This was a known issue in the TinyMCE 6.1 release.

The autolink plugin converts typed or pasted strings that match its criteria for being URLs into clickable blocks. It acts when a word-boundary character (such as a space or a closing bracket) is typed.

In TinyMCE 6, however, the plugin did not fire an ExecCommand event.

Consequently no record of the link creation was available.

This update corrects this. In TinyMCE 6.1.2, the autolink plugin fires an ExecCommand event, as expected.

Worked around a Firefox bug that results in cookies not being available inside the editor content

As part of the changes made for version 6, TinyMCE switched from the now-partly deprecated iframe.contentDocument.write() browser API to the newer, srcdoc attribute.

In doing so, however, TinyMCE became subject to a bug in Firefox: Firefox bug 1741489: cookies from parent window aren’t sent in iframe via srcDoc. This Firefox bug causes cookies to not be available to the TinyMCE editor.

TinyMCE 6.1.2 includes a workaround: if Firefox is the host browser, iframe content is loaded using the older iframe.contentDocument.write() API. This ensures set cookies are available to TinyMCE.

This is a Firefox-specific workaround. When other browsers are the host, TinyMCE continues to use the, newer, srcdoc attribute.

Pasting <pre> content into a <pre> block that had inline styles or was noneditable now correctly merges with the surrounding content

Previously, when a <pre> block was pasted into a noneditable block, or was pasted into a <pre> block that also contained content with inline styles applied (such as <strong>), the pasted-in block did not merge correctly.

When pasted into <strong> content, the pasted-in <pre> block split the text at the paste point.

When pasted into a noneditable block it replaced the block with standard text.

In TinyMCE 6.1.2, pasting <pre> blocks merges with surrounding content as expected: it takes on the inline style when pasted into content with inline styles applied; and it retains its <pre> tags when pasted on to a noneditable block.

This was a known issue in the TinyMCE 6.1 release.

After a codesample was pasted, the insertion point was placed incorrectly

Previously, if a codesample block (or other pre block with a contenteditable="false" attribute applied) was copied and then pasted, the insertion point was, incorrectly, placed inside the contenteditable="false" block.

With this update, when a codesample is pasted in a TinyMCE document, the insertion point is placed immediately after and outside the contenteditable="false" block, as expected.

Known issues

This section describes issues that users of TinyMCE 6.1.2 may encounter and possible workarounds for these issues.

There are no new known issues affecting TinyMCE 6.1.2.