Skip to content

Commit 0ad5de3

Browse files
committed
test
1 parent 12ce887 commit 0ad5de3

File tree

7 files changed

+46
-1
lines changed

7 files changed

+46
-1
lines changed

administrator/language/en-GB/plg_editors_tinymce.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ PLG_TINY_FIELD_LINK_CLASS_NONE="None"
5959
PLG_TINY_FIELD_NEWLINES_LABEL="New Lines"
6060
PLG_TINY_FIELD_NUMBER_OF_SETS_LABEL="Number of Sets"
6161
PLG_TINY_FIELD_PASTE_AS_TEXT_LABEL="Paste As Text"
62+
PLG_TINY_FIELD_PASTE_FROM_WORD_LABEL="Paste from Word"
6263
PLG_TINY_FIELD_PATH_LABEL="Element Path"
6364
PLG_TINY_FIELD_PROHIBITED_LABEL="Prohibited Elements"
6465
PLG_TINY_FIELD_RESIZE_HORIZONTAL_LABEL="Horizontal Resizing"

build/media_source/plg_editors_tinymce/joomla.asset.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,17 @@
7070
"dependencies": [
7171
"tinymce"
7272
]
73+
},
74+
{
75+
"name": "plg_editors_tinymce.pastefromword",
76+
"type": "script",
77+
"uri": "plg_editors_tinymce/plugins/paste-from-word/plugin.min.js",
78+
"attributes": {
79+
"type": "module"
80+
},
81+
"dependencies": [
82+
"tinymce"
83+
]
7384
}
7485
]
7586
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import '@pangaeatech/tinymce-paste-from-word-plugin';

package-lock.json

Lines changed: 15 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"@codemirror/theme-one-dark": "^6.1.3",
5555
"@codemirror/view": "^6.38.3",
5656
"@fortawesome/fontawesome-free": "^6.7.2",
57+
"@pangaeatech/tinymce-paste-from-word-plugin": "^1.3.2",
5758
"@popperjs/core": "^2.11.8",
5859
"accessibility": "^3.0.17",
5960
"awesomplete": "^1.1.7",

plugins/editors/tinymce/forms/setoptions.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,17 @@
360360
<option value="1">JON</option>
361361
</field>
362362

363+
<field
364+
name="paste_from_word"
365+
type="radio"
366+
label="PLG_TINY_FIELD_PASTE_FROM_WORD_LABEL"
367+
layout="joomla.form.field.radio.switcher"
368+
default="0"
369+
>
370+
<option value="0">JOFF</option>
371+
<option value="1">JON</option>
372+
</field>
373+
363374
<field
364375
name="sourcecode"
365376
type="radio"

plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,12 @@ public function prepareTinyMCEUploadPath(string $path): string
395395
. $levelParams->get('content_template_path') . '&' . $csrf . '=1';
396396
}
397397

398+
// Paste from word plugin
399+
if ($levelParams->get('paste_from_word', 1)) {
400+
$wa->useScript('plg_editors_tinymce.pastefromword');
401+
$plugins[] = 'pastefromword';
402+
}
403+
398404
// User custom plugins and buttons
399405
$custom_plugin = trim($levelParams->get('custom_plugin', ''));
400406
$custom_button = trim($levelParams->get('custom_button', ''));

0 commit comments

Comments
 (0)