Skip to content

Commit

Permalink
Adding choice to only resize TinyMCE vertically
Browse files Browse the repository at this point in the history
  • Loading branch information
infograf768 committed Jan 12, 2015
1 parent 258e410 commit d0fb1e0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
4 changes: 3 additions & 1 deletion administrator/language/en-GB/en-GB.plg_editors_tinymce.ini
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ PLG_TINY_FIELD_PRINT_DESC="Turn on/off the print and print preview icons in the
PLG_TINY_FIELD_PRINT_LABEL="Print/Preview"
PLG_TINY_FIELD_PROHIBITED_DESC="Elements that will be cleaned from the text. Do not leave empty - if you do not want to prohibit anything enter dummy text e.g.cms"
PLG_TINY_FIELD_PROHIBITED_LABEL="Prohibited Elements"
PLG_TINY_FIELD_RESIZING_DESC="Enable/disable the resizing of the editor area (both horizontally and vertically)."
PLG_TINY_FIELD_RESIZE_HORIZONTAL_DESC="Enable/disable the horizontal resizing."
PLG_TINY_FIELD_RESIZE_HORIZONTAL_LABEL="Horizontal resizing"
PLG_TINY_FIELD_RESIZING_DESC="Enable/disable the resizing of the editor area (vertically and also horizontally if 'Horizontal Resizing' is enabled)."
PLG_TINY_FIELD_RESIZING_LABEL="Resizing"
PLG_TINY_FIELD_RTL_DESC="Select whether to display the RTL button. Only Works in Extended mode"
PLG_TINY_FIELD_RTL_LABEL="Directionality"
Expand Down
11 changes: 9 additions & 2 deletions plugins/editors/tinymce/tinymce.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,19 @@ public function onInit()
$image_advtab = "false";
}

// The param is true false, so we turn true to both rather than showing vertical resize only
// The param is true for vertical resizing only, false or both
$resizing = $this->params->get('resizing', '1');

if ($resizing || $resizing == 'true')
{
$resizing = 'resize: "both",';
if ($this->params->get('resize_horizontal', '1'))
{
$resizing = 'resize: "both",';
}
else
{
$resizing = 'resize: true,';
}
}
else
{
Expand Down
10 changes: 10 additions & 0 deletions plugins/editors/tinymce/tinymce.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,16 @@
<option value="0">JOFF</option>
</field>

<field name="resize_horizontal" type="radio"
class="btn-group btn-group-yesno"
default="1"
description="PLG_TINY_FIELD_RESIZE_HORIZONTAL_DESC"
label="PLG_TINY_FIELD_RESIZE_HORIZONTAL_LABEL"
>
<option value="1">JON</option>
<option value="0">JOFF</option>
</field>

<field name="element_path" type="radio"
class="btn-group btn-group-yesno"
default="1"
Expand Down

0 comments on commit d0fb1e0

Please sign in to comment.