?
avatar mvanvu
mvanvu
5 Feb 2020

Follow the file /media/editors/tinymce/js/tinymce.js at line 47

var name = element ? element.getAttribute('name').replace(/\[\]|\]/g, '').split('[').pop() : 'default', // Get Editor name
So, If I have two editors with the names are jform[description] and jform[en-GB][description] then the editors will not work perfectly because the editors are the same name "description".

avatar mvanvu mvanvu - open - 5 Feb 2020
avatar joomla-cms-bot joomla-cms-bot - change - 5 Feb 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 5 Feb 2020
avatar brianteeman
brianteeman - comment - 6 Feb 2020

Any reason why your fields are not named jform[description] jform[en-GBdescription]

avatar mvanvu
mvanvu - comment - 6 Feb 2020

Any reason why your fields are not named jform[description] jform[en-GBdescription]

It just an example. I have many language codes and I want to get the post data as an array not a string.

avatar mvanvu mvanvu - change - 6 Feb 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-02-06 13:38:32
Closed_By mvanvu
avatar mvanvu mvanvu - close - 6 Feb 2020
avatar mvanvu
mvanvu - comment - 6 Feb 2020

Nevermine but it's an issue. I think we should check the ID of textarea instead the name that will be replaced by some restriction.

avatar mvanvu mvanvu - change - 6 Feb 2020
Status Closed New
Closed_Date 2020-02-06 13:38:32
Closed_By mvanvu
avatar mvanvu mvanvu - reopen - 6 Feb 2020
avatar Fedik
Fedik - comment - 6 Feb 2020

You need to provide a detailed info what you doing and what exactly does not work.

This behavior made to make possible to override the editor settings, by plugins etc.

The ID cannot be used, because example in subform it will be different id for the same editor name. that make overide not possible.

avatar richard67 richard67 - change - 6 Feb 2020
Status New Information Required
avatar jwaisner
jwaisner - comment - 11 Feb 2020

@mvanvu Can you please provide information asked by Fedik?

avatar Quy Quy - change - 11 Feb 2020
Labels Added: Information Required
avatar Quy Quy - labeled - 11 Feb 2020
avatar mvanvu
mvanvu - comment - 11 Feb 2020

@jwaisner

  1. Edit the xml file /administrator/components/com_content/models/forms/article.xml
  2. Add the new test fields into the end of form at line 1069
<fields name="test">
		<field
				name="articletext"
				type="editor"
				label="COM_CONTENT_FIELD_ARTICLETEXT_LABEL"
				description="COM_CONTENT_FIELD_ARTICLETEXT_DESC"
				filter="JComponentHelper::filterText"
				buttons="true"
		/>
</fields>```
3. Edit the edit layout file /administrator/components/com_content/views/article/tmpl/edit.php
4. Add the new code under line 71
```php
<?php echo $this->form->getInput('articletext'); ?>
<?php echo $this->form->getField('articletext', 'test')->input; ?>
  1. Edit or add new article you will see the new editor. From the second editor, try to insert an image from the image button or any button you want and you will see the image will be inserted into the first editor not the second editor.
avatar Quy Quy - change - 11 Feb 2020
Labels Removed: Information Required
avatar Quy Quy - unlabeled - 11 Feb 2020
avatar mvanvu
mvanvu - comment - 11 Feb 2020

I have also submitted a PR #25931 for the same issue but look like no one care.

avatar Quy
Quy - comment - 11 Feb 2020

@mvanvu You have not commented/updated with suggested changes in PR #25931. So this issue already has PR #25931?

avatar mvanvu
mvanvu - comment - 11 Feb 2020

@Quy No, the PR #25931 for another issue that has the same issue with TinyMCE editor.

avatar jwaisner
jwaisner - comment - 11 Mar 2020

@mvanvu can you clarify what PR #25931 has to do with this issue?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27809.

avatar mvanvu
mvanvu - comment - 12 Mar 2020

@jwaisner I just close because it was there so long and nobody pay attention to it.

avatar Quy
Quy - comment - 16 May 2020

See PR #28321

avatar Quy Quy - close - 16 May 2020
avatar Quy Quy - change - 16 May 2020
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2020-05-16 15:34:10
Closed_By Quy

Add a Comment

Login with GitHub to post a comment