Skip to content

Commit d41ab15

Browse files
DOC-3224: function that takes an emf blob and should return a promise of a png blob.
1 parent 7e98a33 commit d41ab15

File tree

3 files changed

+40
-5
lines changed

3 files changed

+40
-5
lines changed

modules/ROOT/pages/8.3.0-release-notes.adoc

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,27 @@ include::partial$misc/admon-releasenotes-for-stable.adoc[]
2828

2929
The following premium plugin updates were released alongside {productname} {release-version}.
3030

31-
// === <Premium plugin name 1> <Premium plugin name 1 version>
31+
=== PowerPaste
3232

33-
// The {productname} {release-version} release includes an accompanying release of the **<Premium plugin name 1>** premium plugin.
33+
The {productname} {release-version} release includes an accompanying release of the **PowerPaste** premium plugin.
3434

35-
// **<Premium plugin name 1>** <Premium plugin name 1 version> includes the following <fixes, changes, improvements>.
35+
**PowerPaste** includes the following addition.
3636

37-
// ==== <Premium plugin name 1 change 1>
37+
==== `powerpaste_emf_processor` function that takes an `emf` blob and returns a promise of a `png` blob.
38+
39+
Before October 2025, copying and pasting content from Microsoft Word containing `emf` images resulted in those images not being pasted and an error message being displayed. After October 2025, this behavior changed where the images began appearing in the editor, but only at low resolution, accompanied by an error message in Chrome and Firefox. Safari displayed the low-resolution images without showing an error message.
40+
41+
This change negatively affected the user experience. After October 2025, users would see a low-quality image alongside an error message stating `Some images failed to import`, which caused confusion since the image was, in fact, visible in the editor—albeit with degraded quality.
42+
43+
{productname} {release-version} introduces a new option, xref:powerpaste_emf_processor.adoc#powerpaste_emf_processor[powerpaste_emf_processor], to address this issue. This option accepts a function that receives an `emf` blob and returns a promise resolving to a `png` blob (i.e. `(blob: Blob) => Promise<Blob>`).
44+
45+
* If this option is provided, the editor will invoke the supplied function to convert `emf` image blobs into `png` image blobs before inserting them into the editor.
46+
47+
* If this option is **not** provided, the editor will remove the low-quality images and display an error message, restoring the pre–October 2025 behavior.
48+
49+
NOTE: If only the image is selected, pasting it will succeed and the image will be inserted correctly. However, if the image is selected together with other types of content, such as text, the image will not be pasted and an error message will be displayed.
50+
51+
For information on the **PowerPaste** plugin, see: xref:introduction-to-powerpaste.adoc[PowerPaste].
3852

3953
// // CCFR here.
4054

@@ -128,4 +142,3 @@ There <is one | are <number> known issue<s> in {productname} {release-version}.
128142
// #TINY-vwxyz1
129143

130144
// CCFR here.
131-

modules/ROOT/pages/powerpaste-options.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ include::partial$configuration/powerpaste_autolink_urls.adoc[leveloffset=+1]
2323

2424
include::partial$configuration/powerpaste_allow_local_images.adoc[leveloffset=+1]
2525

26+
include::partial$configuration/powerpaste_emf_processor.adoc[leveloffset=+1]
27+
2628
include::partial$configuration/paste_block_drop.adoc[leveloffset=+1]
2729

2830
include::partial$configuration/powerpaste_clean_filtered_inline_elements.adoc[leveloffset=+1]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[[powerpaste_emf_processor]]
2+
== `+powerpaste_emf_processor+`
3+
4+
This option controls how `emf` images are handled. If this option **is** provided, `emf` image blobs will be converted into `png` image blobs, which will then be pasted into the editor. If this option is **not** provided, the editor will remove the poor quality images, and show an error message.
5+
6+
*Type:* `+Function+`
7+
8+
=== Example: `+powerpaste_emf_processor+`
9+
10+
[source,js]
11+
----
12+
tinymce.init({
13+
selector: 'textarea', // change this value according to your HTML
14+
plugins: 'powerpaste',
15+
powerpaste_word_import: 'clean',
16+
powerpaste_emf_processor: (blob) => {
17+
return fetch('YOUR_IMAGE_URL').then(res => res.blob())
18+
}
19+
});
20+
----

0 commit comments

Comments
 (0)