diff --git a/media_source/plg_editors_tinymce/joomla.asset.json b/media_source/plg_editors_tinymce/joomla.asset.json index bc73d4e241a5a..f2c23d8f7c26a 100644 --- a/media_source/plg_editors_tinymce/joomla.asset.json +++ b/media_source/plg_editors_tinymce/joomla.asset.json @@ -119,6 +119,17 @@ "dependencies": [ "tinymce" ] + }, + { + "name": "plg_editors_tinymce.pasteword", + "type": "script", + "uri": "plg_editors_tinymce/plugins/pasteword/plugin.min.js", + "attributes": { + "type": "module" + }, + "dependencies": [ + "tinymce" + ] } ] } diff --git a/media_source/plg_editors_tinymce/js/plugins/pasteword/plugin.es6.js b/media_source/plg_editors_tinymce/js/plugins/pasteword/plugin.es6.js new file mode 100644 index 0000000000000..1821201181aff --- /dev/null +++ b/media_source/plg_editors_tinymce/js/plugins/pasteword/plugin.es6.js @@ -0,0 +1 @@ +import '@openregion/tinymce-word-paste-plugin'; diff --git a/package-lock.json b/package-lock.json index e03de74e675e2..73264523a68d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,6 +27,7 @@ "@codemirror/theme-one-dark": "^6.1.3", "@codemirror/view": "^6.40.0", "@fortawesome/fontawesome-free": "^6.7.2", + "@openregion/tinymce-word-paste-plugin": "^1.0.4", "@popperjs/core": "^2.11.8", "@vue-flow/background": "^1.3.2", "@vue-flow/controls": "^1.1.3", @@ -2985,6 +2986,12 @@ "node": ">= 8" } }, + "node_modules/@openregion/tinymce-word-paste-plugin": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@openregion/tinymce-word-paste-plugin/-/tinymce-word-paste-plugin-1.0.4.tgz", + "integrity": "sha512-48xY5YispdODNCNFTH8doNLajiiQ0NEuXlqdtHduY2112WEkHBCD0eoocGjkzpgXG3bhXNH1wss/c2r+M7ckwg==", + "license": "LGPL-2.1" + }, "node_modules/@parcel/watcher": { "version": "2.5.6", "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.6.tgz", diff --git a/package.json b/package.json index f9878c64a34df..971171587c134 100644 --- a/package.json +++ b/package.json @@ -73,6 +73,7 @@ "mark.js": "^8.11.1", "mediaelement": "^7.1.0", "metismenujs": "^1.4.0", + "@openregion/tinymce-word-paste-plugin": "^1.0.4", "punycode": "^2.3.1", "qrcode-generator": "^2.0.4", "roboto-fontface": "^0.10.0", diff --git a/plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php b/plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php index e0d0458674d43..6f19e0963707b 100644 --- a/plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php +++ b/plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php @@ -258,9 +258,11 @@ public function display(string $name, string $content = '', array $attributes = 'quickbars', 'jxtdbuttons', 'jfilepicker', + 'pasteword', ]; $wa->useScript('plg_editors_tinymce.jxtdbuttons'); $wa->useScript('plg_editors_tinymce.jfilepicker'); + $wa->useScript('plg_editors_tinymce.pasteword'); // The link picker for the native Link dialog (registers the 'file' picker) $wa->useStyle('plg_editors_tinymce.linkpicker');