Feature Language Change NPM Resource Changed PBF PR-5.0-dev Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
8 Feb 2022

This is a toolbar icon for the tinymce editor that will let you quickly generate a placeholder image in your content.

To test

  1. Apply pr
  2. rebuild the js with npm run build:js
  3. Go to the tinymce plugin and drag the new icon to your toolbar
  4. Go to any article and try it you

Plugin

tiny

Demo

tiny2

avatar brianteeman brianteeman - open - 8 Feb 2022
avatar brianteeman brianteeman - change - 8 Feb 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Feb 2022
Category JavaScript Repository NPM Change Front End Plugins
avatar brianteeman brianteeman - change - 8 Feb 2022
The description was changed
avatar brianteeman brianteeman - edited - 8 Feb 2022
avatar brianteeman brianteeman - change - 8 Feb 2022
The description was changed
avatar brianteeman brianteeman - edited - 8 Feb 2022
avatar brianteeman brianteeman - change - 8 Feb 2022
Labels Added: NPM Resource Changed ?
avatar joomla-cms-bot joomla-cms-bot - change - 8 Feb 2022
Category JavaScript Repository NPM Change Front End Plugins Administration Language & Strings JavaScript Repository NPM Change Front End Plugins
avatar brianteeman brianteeman - change - 8 Feb 2022
The description was changed
avatar brianteeman brianteeman - edited - 8 Feb 2022
avatar brianteeman brianteeman - change - 8 Feb 2022
Labels Added: Language Change
avatar laoneo
laoneo - comment - 9 Feb 2022

Why do you need that? I don't think this needs to come in core. Write a plugin and load it through the plugin feature if you need it.

avatar brianteeman
brianteeman - comment - 9 Feb 2022

It speeds up development and makes life easier to build a site. Feedback was very positive when I showed the concept on FB. We have to start treating tinymce as a first class citizen. Instead we push people to use an editor that is old and outdate but has the extras people need.

avatar laoneo
laoneo - comment - 10 Feb 2022

Don't agree here. The core should act as an example and doesn't need to compete out 3rd party extensions. Bloating the core with such useless features which will not bring any benefit to the users is a wrong direction. Instead of, you should tell the users how extensible the core editor is and make an example of this use case either in the official docs or in a magazine post.

avatar brianteeman
brianteeman - comment - 10 Feb 2022

I couldnt disagree more

avatar Fedik
Fedik - comment - 14 Feb 2022

I think the idea is good, can be useful for authors, it allow to format the article and replace images to final ones later.

avatar HLeithner
HLeithner - comment - 14 Feb 2022

I don't think it should be in core if it's possible to do it with a Plugin. A 3rd Party Plugin could also use 3rd Party image services.

avatar Fedik
Fedik - comment - 14 Feb 2022

I know, but that something that Writers would like to see in core.

avatar brianteeman
brianteeman - comment - 14 Feb 2022

@HLeithner you are missing the point. Core must be usable and useful. It doesnt matter how fast the code is or how modern the code is. What matters is that users can use it. Why should they have to install a plugin for something that is 40 lines of code. You can make the argument about making it a 3rd party extension with every new feature added to core in J4. Workflows -> almost unusable in its current form without extra code. Schedule -> completely unusable without extra code. Media Manager - the least said abut the better.
PS it is not possible to do this with an installable plugin that is fully integrated into the editor

avatar brianteeman
brianteeman - comment - 14 Feb 2022

Forgot to add. I actually did some (rudimentary) user research before even starting this. When was the last time anyone did that

avatar laoneo
laoneo - comment - 14 Feb 2022

TinyMCE has a feature where you can load TinyMCE plugins by adding it to the options. We do not talk here about a Joomla plugin.

avatar brianteeman
brianteeman - comment - 14 Feb 2022

You can make this argument about everything. Its a stupid argument. We must make joomla usable.

avatar brianteeman
brianteeman - comment - 14 Feb 2022

TinyMCE has a feature where you can load TinyMCE plugins by adding it to the options. We do not talk here about a Joomla plugin.

Show me how a joomla user can install that plugin. There is no functionality for that.

avatar laoneo
laoneo - comment - 14 Feb 2022

The part on the bottom:

image

I'm using it on my production sites with the autolink plugin.

avatar Fedik
Fedik - comment - 14 Feb 2022

@laoneo please do not forget that Joe Average does not have a skills to code it (and this plugin exists nowhere) ?
He want to write a text.

avatar brianteeman
brianteeman - comment - 14 Feb 2022

@laoneo I am well aware of that option. Still doesn't answer the fact that there is no way on joomla to install that plugin.

There has been more lines of comment than there has been code

avatar laoneo
laoneo - comment - 14 Feb 2022

Instead of, you should tell the users how extensible the core editor is and make an example of this use case either in the official docs or in a magazine post.

Again, publish your sample lines and tell the world how extensible it is.

@laoneo I am well aware of that option. Still doesn't answer the fact that there is no way on joomla to install that plugin.

Uploading it via FTP or the template editor is enough. There is really nothing to install here. Again, this is a great showcase how to use the plugin feature of TinyMCE.

avatar laoneo
laoneo - comment - 14 Feb 2022

@laoneo please do not forget that Joe Average does not have a skills to code it (and this plugin exists nowhere) wink He want to write a text.

Copy paste is enough for the few people who are using it.

avatar brianteeman
brianteeman - comment - 14 Feb 2022

I wonder how you would have reacted if I had told you to just write a blog post about custom fields. No need for that to be in the core. Just copy paste code, use ftp etc.

avatar laoneo
laoneo - comment - 14 Feb 2022

I wonder how you would have reacted if I had told you to just write a blog post about custom fields. No need for that to be in the core. Just copy paste code, use ftp etc.

It's ok, no need to shift away. I shared my opinion. Do whatever you guys want. It really doesn't matter if this feature is in or not at the end of the day.

avatar RickR2H
RickR2H - comment - 22 Apr 2022

I have tested this item successfully on fa08447


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

avatar RickR2H RickR2H - test_item - 22 Apr 2022 - Tested successfully
avatar brianteeman brianteeman - close - 30 May 2022
avatar brianteeman brianteeman - change - 30 May 2022
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2022-05-30 15:32:22
Closed_By brianteeman
Labels Added: PBF
avatar brianteeman brianteeman - change - 12 Jun 2022
Status Closed New
Closed_Date 2022-05-30 15:32:22
Closed_By brianteeman
avatar brianteeman brianteeman - change - 12 Jun 2022
Status New Pending
avatar brianteeman
brianteeman - comment - 12 Jun 2022

re-opening. this is far more useful to users than other features being added to 4.2 and does not already have an extension offering this on the jed

avatar brianteeman brianteeman - reopen - 12 Jun 2022
avatar joomla-bot
joomla-bot - comment - 27 Jun 2022

This pull requests has been automatically converted to the PSR-12 coding standard.

avatar jwaisner
jwaisner - comment - 19 Aug 2022

Clearing test as this PR will need 2 test again.


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

avatar jwaisner jwaisner - alter_testresult - 19 Aug 2022 - RickR2H: Not tested
avatar brianteeman
brianteeman - comment - 17 Jan 2023

Why do you need that? I don't think this needs to come in core. Write a plugin and load it through the plugin feature if you need it.

It is completely impossible to do that. The plugin feature does not allow you to add an icon to the toolbar or to add a link to the menu which means that even though the plugin is running it can not be used.

I have spent the day checking into this. The person who wrote the pr for that feature did it as a result of some tutorials they wrote for the tinymce web site. I have checked those plugins (fixed one along the way) and can confirm that the only tinymce plugin that is usable when added in this way is when it is triggered by a hotkey or autocomplete.

@obuisard this and the associated two other plugins for tinymce would be great additions for 4.3. They got universal positive feedback when showcased on the facebook group. see also #36975 and #36962

avatar brianteeman
brianteeman - comment - 17 Jan 2023

Instead of, you should tell the users how extensible the core editor is and make an example of this use case either in the official docs or in a magazine post.

Again, publish your sample lines and tell the world how extensible it is.

@laoneo I am well aware of that option. Still doesn't answer the fact that there is no way on joomla to install that plugin.

Uploading it via FTP or the template editor is enough. There is really nothing to install here. Again, this is a great showcase how to use the plugin feature of TinyMCE.

except it doesnt actually work

avatar HLeithner
HLeithner - comment - 2 May 2023

This pull request has been automatically rebased to 5.0-dev.

avatar fancyFranci fancyFranci - test_item - 26 Aug 2023 - Tested unsuccessfully
avatar fancyFranci
fancyFranci - comment - 26 Aug 2023

I have tested this item ? unsuccessfully on fa08447

First the icon did not load in the Tinymce plugin view, just the placeholder text. After reloading the page the icon appeared as expected. I can drag it to my toolbar and save it. But then I can not open the article any more. A soon as I revert the patch its working again. I think placeholder images are really useful, would be great if you can fix that.

"An error has occurred.
0 Call to a member function getIdentity() on null "


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

avatar brianteeman
brianteeman - comment - 26 Aug 2023

I can't replicate your issue got confused with another pr

avatar HLeithner
HLeithner - comment - 26 Aug 2023

I have tested this item ? unsuccessfully on fa08447First the icon did not load in the Tinymce plugin view, just the placeholder text. After reloading the page the icon appeared as expected. I can drag it to my toolbar and save it. But then I can not open the article any more. A soon as I revert the patch its working again. I think placeholder images are really useful, would be great if you can fix that.

"An error has occurred. 0 Call to a member function getIdentity() on null "

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

a trace log would be helpful

avatar HLeithner HLeithner - change - 26 Aug 2023
Labels Added: Feature PR-5.0-dev
Removed: ?
avatar fancyFranci
fancyFranci - comment - 26 Aug 2023

a trace log would be helpful

You're right.

grafik

avatar HLeithner
HLeithner - comment - 26 Aug 2023

@Fedik could this be of the change from pseudo event buttons to real events?
@laoneo or did you missed something for identity here?

avatar fancyFranci
fancyFranci - comment - 26 Aug 2023

@HLeithner I really dont know why, but after I tested #36975 with the same result, I went back to here, installed again and the error is gone now... Inserting sample images works as expected.

avatar fancyFranci fancyFranci - test_item - 26 Aug 2023 - Tested successfully
avatar fancyFranci
fancyFranci - comment - 26 Aug 2023

I have tested this item ✅ successfully on e2ada52

I was able to add sample images into my article


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

avatar fancyFranci
fancyFranci - comment - 26 Aug 2023

The error comes back when I remove the other new plugin (sample text) from the tinymce toolbar. After I tested it and left it there, the sample image worked.

avatar Fedik
Fedik - comment - 26 Aug 2023

could this be of the change from pseudo event buttons to real events?

Nope, this can happen when $application not injected in to plugin while bootPlugin,

$user = $this->getApplication()->getIdentity();

It nothing with events.
But it should be injected already

$plugin->setApplication(Factory::getApplication());

avatar Fedik
Fedik - comment - 26 Aug 2023

@fancyFranci did you tested iit for joomla 5 or 4? because title say 4,but the target is 5 :)

avatar Fedik Fedik - change - 26 Aug 2023
Title
[4.2] [new feature] TinyMce sample image plugin
[5.0] [new feature] TinyMce sample image plugin
avatar Fedik Fedik - edited - 26 Aug 2023
avatar N6REJ N6REJ - test_item - 26 Aug 2023 - Tested unsuccessfully
avatar N6REJ
N6REJ - comment - 26 Aug 2023

I have tested this item ? unsuccessfully on e2ada52 using J5.0-dev

applying the patch causes tinymce to no longer appear


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

pre-patch
image

Post patch
image

avatar brianteeman
brianteeman - comment - 26 Aug 2023

a trace log would be helpful

avatar brianteeman
brianteeman - comment - 26 Aug 2023

The PR was created for Joomla 4.2 using tinymce 5. @HLeithner changed this to be for 5.0 but as that uses tinymce 6 and a reworked plugin tbh I wouldnt expect this to work at all.

avatar N6REJ
N6REJ - comment - 26 Aug 2023

The PR was created for Joomla 4.2 using tinymce 5. @HLeithner changed this to be for 5.0 but as that uses tinymce 6 and a reworked plugin tbh I wouldnt expect this to work at all.

ok, so this fails j5.

avatar HLeithner
HLeithner - comment - 3 Sep 2023

same as the other pr, why not using the template system for this?

avatar HLeithner HLeithner - close - 3 Sep 2023
avatar HLeithner HLeithner - change - 3 Sep 2023
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2023-09-03 08:02:06
Closed_By HLeithner
avatar brianteeman
brianteeman - comment - 3 Sep 2023

why not using the template system for this?

because the template system is not easily portable and is template dependent

avatar HLeithner
HLeithner - comment - 3 Sep 2023

didn't we had a standard set/location in joomla too? or was this located only in Cassiopiea? Anyway tinymce deprecated the "simple" template system for there paid advanced template system. So we forked it and maybe @Fedik or @dgrammatiko or @laoneo has a nice idea for a better template system for such cases.

avatar Fedik
Fedik - comment - 3 Sep 2023

Following code is looking for templates

$filepaths = Folder::exists(JPATH_ROOT . '/templates/' . $template)
? Folder::files(JPATH_ROOT . '/templates/' . $template, '\.(html|txt)$', false, true)
: [];

Not sure what exactly, I think @dgrammatiko know better.
It is part of #40626

avatar Fedik
Fedik - comment - 3 Sep 2023

it maybe a good idea to have some default templates under /media/plg_editors_tinymce/templates/

avatar dgrammatiko
dgrammatiko - comment - 3 Sep 2023

Not sure what exactly, I think @dgrammatiko know better.

That ajax fn just replaced the code that resolved the templates on startup (now it's per use case)

it maybe a good idea to have some default templates under /media/plg_editors_tinymce/templates/

It's very easy to add one more lookup path in the code you linked above #36968 (comment)

avatar brianteeman
brianteeman - comment - 3 Sep 2023

do it without me. wasted enough time on making a good editor for joomla already without an 18 month delay to everything

Add a Comment

Login with GitHub to post a comment