joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

[4.2] [new feature] TinyMce sample image plugin

Open brianteeman opened this issue 3 years ago • 23 comments

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

brianteeman avatar Feb 08 '22 16:02 brianteeman

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.

laoneo avatar Feb 09 '22 08:02 laoneo

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.

brianteeman avatar Feb 09 '22 08:02 brianteeman

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.

laoneo avatar Feb 10 '22 12:02 laoneo

I couldnt disagree more

brianteeman avatar Feb 10 '22 13:02 brianteeman

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

Fedik avatar Feb 14 '22 08:02 Fedik

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.

HLeithner avatar Feb 14 '22 08:02 HLeithner

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

Fedik avatar Feb 14 '22 08:02 Fedik

@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

brianteeman avatar Feb 14 '22 08:02 brianteeman

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

brianteeman avatar Feb 14 '22 09:02 brianteeman

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.

laoneo avatar Feb 14 '22 09:02 laoneo

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

brianteeman avatar Feb 14 '22 10:02 brianteeman

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.

brianteeman avatar Feb 14 '22 10:02 brianteeman

The part on the bottom:

image

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

laoneo avatar Feb 14 '22 10:02 laoneo

@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.

Fedik avatar Feb 14 '22 10:02 Fedik

@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

brianteeman avatar Feb 14 '22 11:02 brianteeman

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.

laoneo avatar Feb 14 '22 12:02 laoneo

@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.

laoneo avatar Feb 14 '22 12:02 laoneo

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.

brianteeman avatar Feb 14 '22 12:02 brianteeman

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.

laoneo avatar Feb 14 '22 13:02 laoneo

I have tested this item :white_check_mark: successfully on fa0844737788e3f05402fc120c65b8a0b6f58d10


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

RickR2H avatar Apr 22 '22 14:04 RickR2H

closed due to lack of interest from release lead

brianteeman avatar May 30 '22 15:05 brianteeman

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

brianteeman avatar Jun 12 '22 19:06 brianteeman

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

joomla-bot avatar Jun 27 '22 21:06 joomla-bot

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.

jwaisner avatar Aug 19 '22 22:08 jwaisner

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

brianteeman avatar Jan 17 '23 17:01 brianteeman

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

brianteeman avatar Jan 17 '23 17:01 brianteeman

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

HLeithner avatar May 02 '23 16:05 HLeithner

I have tested this item :red_circle: unsuccessfully on fa0844737788e3f05402fc120c65b8a0b6f58d10

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.

fancyFranci avatar Aug 26 '23 12:08 fancyFranci

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

brianteeman avatar Aug 26 '23 12:08 brianteeman

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

HLeithner avatar Aug 26 '23 12:08 HLeithner