Search
Other Content Templater questions
Forum

Text not replaced in the editor

Lorenzo Rossini's Avatar Lorenzo Rossini
Hi,
could you confirm that on your side the substitution of an existing text in the editor is replaced by the new "Content Templater" layout? On my side nothing happens even if I get the following message in the popup:

"Any selected text will be replaced by the templates content.
Are you sure you want to insert this template?"


Thanks,
Lorenzo

Joomla 4.4.0
Content Templater 12.0.1
Peter van Westen's Avatar Peter van Westen ADMIN
I think you are experiencing something that is pretty much a bug/issue in Joomla (editors):
You have to place the cursor in the editor for any of the editor buttons to work.
Please post a rating at the Joomla! Extensions Directory
Lorenzo Rossini's Avatar Lorenzo Rossini
... I've noticed that the problem is with the button at the top left, but not with the button in the text editor (JCE).
Do you encounter the same problem?

Peter van Westen's Avatar Peter van Westen ADMIN
No, all works fine for me...
Please post a rating at the Joomla! Extensions Directory
Lorenzo Rossini's Avatar Lorenzo Rossini
...and are you using JCE? because the issue is with JCE, I've no problem with TinyMCE
Peter van Westen's Avatar Peter van Westen ADMIN
Using JCE here too, for testing.
Please post a rating at the Joomla! Extensions Directory
Lorenzo Rossini's Avatar Lorenzo Rossini
...so do you think the issue is related to JCE, to your component or maybe to a conflict with another plugin? how to find out where the bug comes from?
Peter van Westen's Avatar Peter van Westen ADMIN
Can you give me (super) admin access so I can take a look?
You can use the 'Confidential information' button in the forum editor to hide sensitive information.
Please post a rating at the Joomla! Extensions Directory
Lorenzo Rossini's Avatar Lorenzo Rossini
Thanks 🙂

Confidential information:
(hidden)
Peter van Westen's Avatar Peter van Westen ADMIN
You have disabled the editor button completely, it seems.
Content Templater needs that to function.
Please post a rating at the Joomla! Extensions Directory
Lorenzo Rossini's Avatar Lorenzo Rossini
Are you referring to plug-ins buttons? they're enabled...

Peter van Westen's Avatar Peter van Westen ADMIN
Ah, was expecting the editor buttons to be under the editor (which is default behaviour for JCE). I indeed see that having the editor buttons in the dropdown (Joomla icon button), then it doesn't work. Seems more like a JCE issue. But I'll try to look into this...
Please post a rating at the Joomla! Extensions Directory
Lorenzo Rossini's Avatar Lorenzo Rossini
"Content Templater" button in the drop-down list works, it's the button at the top right that doesn't work with JCE ( regularlabs.com/forum/contenttemplater/5...in-the-editor#109721 )
Peter van Westen's Avatar Peter van Westen ADMIN
That's not what I am saying.
I meant that the button in the toolbar (top right) does not work when JCE is showing the editor buttons in the dropdown.
If you show the editor buttons under the editor as separate buttons, then the button in the toolbar does work.
Please post a rating at the Joomla! Extensions Directory
Lorenzo Rossini's Avatar Lorenzo Rossini
...so finally we can attribute the issue to JCE?
Peter van Westen's Avatar Peter van Westen ADMIN
Well, looks like the way JCE loads the editor buttons in the dropdown, causes things to function differently.

You can ask JCE to look into this. But I will look into this too, to see if I can somehow work around this issue. But not sure when I will be able to get that done...
Please post a rating at the Joomla! Extensions Directory
Lorenzo Rossini's Avatar Lorenzo Rossini
Ok thanks, I'm going to notify Ryan to see what he thinks and if he's ready to do something.
Peter van Westen's Avatar Peter van Westen ADMIN
So yeah, this looks like it is a JCE issue.

When editor buttons are rendered (via method onDisplay), they receive the editor name. For articles, this is "jform_articletext".
But when JCE renders the buttons in the dropdown, the value "__jce__" is passed to the editor buttons instead.

So when selecting a template from Content Templater, it is telling it to insrert it in the editor with the name "__jce__", which of course doesn't exist (as it should be "jform_articletext").

In other words: JCE is not passing on the correct editor name to the editor buttons.
Please post a rating at the Joomla! Extensions Directory
Lorenzo Rossini's Avatar Lorenzo Rossini
thanks for the clarification, I've forwarded the URL of this post to the JCE forum, let's see Ryan's response
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription