Skip to content

Commit

Permalink
TinyMCE option to initially paste text without formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
laoneo committed Dec 16, 2021
1 parent b5a0d58 commit 95e04ba
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
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 @@ -42,6 +42,7 @@ PLG_TINY_FIELD_LANGCODE_LABEL="Language Code"
PLG_TINY_FIELD_LANGSELECT_LABEL="Automatic Language Selection"
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_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 plugins/editors/tinymce/forms/setoptions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,17 @@
<option value="1">JON</option>
</field>

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

<field
name="custom_plugin"
type="text"
Expand Down
1 change: 1 addition & 0 deletions plugins/editors/tinymce/tinymce.php
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,7 @@ public function onDisplay(
'content_css' => $content_css,
'document_base_url' => Uri::root(true) . '/',
'paste_data_images' => $allowImgPaste,
'paste_as_text' => (bool) $levelParams->get('paste_as_text', true),
'image_caption' => true,
'importcss_append' => true,
'height' => $html_height,
Expand Down

0 comments on commit 95e04ba

Please sign in to comment.