Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions administrator/language/en-GB/plg_editors_tinymce.ini
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ PLG_TINY_FIELD_LINK_CLASS_NONE="None"
PLG_TINY_FIELD_NEWLINES_LABEL="New Lines"
PLG_TINY_FIELD_NUMBER_OF_SETS_LABEL="Number of Sets"
PLG_TINY_FIELD_PASTE_AS_TEXT_LABEL="Paste As Text"
PLG_TINY_FIELD_PASTE_FROM_WORD_LABEL="Paste from Word"
PLG_TINY_FIELD_PATH_LABEL="Element Path"
PLG_TINY_FIELD_PROHIBITED_LABEL="Prohibited Elements"
PLG_TINY_FIELD_RESIZE_HORIZONTAL_LABEL="Horizontal Resizing"
Expand Down
11 changes: 11 additions & 0 deletions build/media_source/plg_editors_tinymce/joomla.asset.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,17 @@
"dependencies": [
"tinymce"
]
},
{
"name": "plg_editors_tinymce.pastefromword",
"type": "script",
"uri": "plg_editors_tinymce/plugins/paste-from-word/plugin.min.js",
"attributes": {
"type": "module"
},
"dependencies": [
"tinymce"
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '@pangaeatech/tinymce-paste-from-word-plugin';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong. See the amended readme in #2

16 changes: 15 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"@codemirror/theme-one-dark": "^6.1.3",
"@codemirror/view": "^6.38.3",
"@fortawesome/fontawesome-free": "^6.7.2",
"@pangaeatech/tinymce-paste-from-word-plugin": "^1.3.2",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the wrong plugin. See the amended readme #2

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately he other repo doesn't publish something to the npm: https://www.npmjs.com/search?q=%40pixelsock%2Ftinymce-paste-from-word-plugin
Also we cannot import directly from the repo as we don't have infra for typescript

"@popperjs/core": "^2.11.8",
"accessibility": "^3.0.17",
"awesomplete": "^1.1.7",
Expand Down
11 changes: 11 additions & 0 deletions plugins/editors/tinymce/forms/setoptions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,17 @@
<option value="1">JON</option>
</field>

<field
name="paste_from_word"
type="radio"
label="PLG_TINY_FIELD_PASTE_FROM_WORD_LABEL"
layout="joomla.form.field.radio.switcher"
default="0"
>
<option value="0">JOFF</option>
<option value="1">JON</option>
</field>

<field
name="sourcecode"
type="radio"
Expand Down
6 changes: 6 additions & 0 deletions plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,12 @@ public function prepareTinyMCEUploadPath(string $path): string
. $levelParams->get('content_template_path') . '&' . $csrf . '=1';
}

// Paste from word plugin
if ($levelParams->get('paste_from_word', 0)) {
$wa->useScript('plg_editors_tinymce.pastefromword');
$plugins[] = 'pastefromword';
}

// User custom plugins and buttons
$custom_plugin = trim($levelParams->get('custom_plugin', ''));
$custom_button = trim($levelParams->get('custom_button', ''));
Expand Down
Loading