Skip to content

Commit

Permalink
Move parameters to Plugin tab
Browse files Browse the repository at this point in the history
  • Loading branch information
RickR2H committed Apr 11, 2024
1 parent 91cfd49 commit 0f4bbcb
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 32 deletions.
3 changes: 1 addition & 2 deletions administrator/language/en-GB/plg_editors_tinymce.ini
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@ PLG_TINY_FIELD_HTMLWIDTH_LABEL="HTML Width"
PLG_TINY_FIELD_LABEL_ADVANCEDPARAMS="Advanced"
PLG_TINY_FIELD_LANGCODE_LABEL="Language Code"
PLG_TINY_FIELD_LANGSELECT_LABEL="Automatic Language Selection"
PLG_TINY_FIELD_LINK_CLASS_LIST_DESC="The classes that may be added to the link. Separate individual classes by a space (example: btn btn-primary). Only valid class names are allowed."
PLG_TINY_FIELD_LINK_CLASS_LIST_LABEL="Class List"
PLG_TINY_FIELD_LINK_CLASS_NAME_DESC="The name shown in the link class dropdown in TinyMCE."
PLG_TINY_FIELD_LINK_CLASS_NAME_LABEL="Name"
PLG_TINY_FIELD_LINK_CLASS_NONE="None"
PLG_TINY_FIELD_LINK_CLASSES_LIST_DESC="Add default classes to the class dropdown in the create link dialog."
PLG_TINY_FIELD_LINK_CLASSES_LIST_LABEL="Link Classes List"
PLG_TINY_FIELD_NEWLINES_LABEL="New Lines"
PLG_TINY_FIELD_NUMBER_OF_SETS_LABEL="Number of Sets"
Expand Down
29 changes: 29 additions & 0 deletions plugins/editors/tinymce/forms/setoptions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -403,5 +403,34 @@
</form>
</field>

<field
name="link_classes_list"
type="subform"
label="PLG_TINY_FIELD_LINK_CLASSES_LIST_LABEL"
description="PLG_TINY_FIELD_LINK_CLASSES_LIST_DESC"
layout="joomla.form.field.subform.repeatable-table"
required="false"
multiple="true">
<form>
<field
name="class_name"
type="text"
label="PLG_TINY_FIELD_LINK_CLASS_NAME_LABEL"
required="true"
filter="string"
default=""
/>
<field
name="class_list"
type="text"
label="PLG_TINY_FIELD_LINK_CLASS_LIST_LABEL"
required="true"
filter="string"
validate="CssIdentifier"
default=""
/>
</form>
</field>

</fieldset>
</form>
2 changes: 1 addition & 1 deletion plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ public function display(string $name, string $content = '', array $attributes =
$toolbar = array_merge($toolbar1, $toolbar2);

// Load the link classes list
$linksClassesList = (array) $this->params->get('link_classes_list', []);
$linksClassesList = $extraOptions->link_classes_list;
$linkClasses = [];

if ($linksClassesList) {
Expand Down
29 changes: 0 additions & 29 deletions plugins/editors/tinymce/tinymce.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,35 +58,6 @@
default=""
/>

<field
name="link_classes_list"
type="subform"
label="PLG_TINY_FIELD_LINK_CLASSES_LIST_LABEL"
description=""
required="false"
multiple="true">
<form>
<field
name="class_name"
type="text"
label="PLG_TINY_FIELD_LINK_CLASS_NAME_LABEL"
description="PLG_TINY_FIELD_LINK_CLASS_NAME_DESC"
required="true"
filter="string"
default=""
/>
<field
name="class_list"
type="text"
label="PLG_TINY_FIELD_LINK_CLASS_LIST_LABEL"
description="PLG_TINY_FIELD_LINK_CLASS_LIST_DESC"
required="true"
filter="string"
validate="CssIdentifier"
default=""
/>
</form>
</field>
</fieldset>
</fields>
</config>
Expand Down

0 comments on commit 0f4bbcb

Please sign in to comment.