User tests: Successful: Unsuccessful:
Added support for Tiny's "external_plugins" configuration option. This has been done using a repeatable pairing of plugin names and paths.
External Plugins allow developers to use their own custom plugins, that live outside of Tiny's source folders, to help improve the content author's experience through adding of new tasks or custom workflows. They really open up the potential for developers to more easily integrate their own plugins with Joomla 4, especially given the power of what TinyMCE 5 can do.
Using this option is 100% optional. There is no loss of functionality if this configuration option is not set by the administrator.
Build and install Joomla from the source as per usual.
When editing the TinyMCE Editor Plugin, a new field is available at the bottom of the main "Plugin" screen. This allows external plugins to be added at a per-set basis.
If used, the plugin's button can be added (albeit crudely) to the toolbar by using the Custom Button option.
You can get the source for a trivial plugin at:
https://github.com/martyf/tiny-plugin-helloworld
Steps to implement are:
helloworld
.It is also worth checking that when you have no external plugins configured, the editing process still works. You can:
TinyMCE editor plugin documentation needs to be updated.
(added by @richard67)
Status | New | ⇒ | Pending |
Category | ⇒ | Administration Language & Strings Front End Plugins |
Not necessarily - even the cloud version of Tiny provides the latest build (where new free features are added) where as the included version needs to be updated separately. There is no cost to use an API key with Tiny Cloud - just for premium plugins, if wanted. But I do get where you're coming from too.
What about for external plugin support? This would really open up potential to help do more with the core editor in J4.
Happy to do a separate PR for just that change if you like.
@martyf no cost is not the same as GPL (or compatible). Your Terms ((see https://about.tiny.cloud/legal/tiny-cloud-services-subscription-agreement/) are explicit that it is not opensource and that it restricts my usage.
As for the custom plugins - dont we already have that possibility
I’m not from Tiny, so not my terms. I’m just a developer who uses their product.
The current external plugins don’t give enough flexibility for plugins in different locations. These need a path to load correctly as it gives greater flexibility with where to store the plugin source within the folder structure. The “Externals Plugins” feature here resolves that.
I’m not from Tiny, so not my terms. I’m just a developer who uses their product.
Sorry I put two and two together from your location and made five
The current external plugins don’t give enough flexibility for plugins in different locations
Can you give a concrete example please
Title |
|
Basically if I make my own plugin (to do anything) I need to load an external JS file. This is done using Tiny’s “external_plugins” option.
The “plugins” option, which is currently used, looks in the Tiny plugins directory - so basically plugins that are core to Tiny. “external_plugins” allows me to load a plugin that doesn’t exist in that directory.
OK so can you please remove the tiny.cloud part of this PR so its just for the plugins and if possible provide a link to a sample plugin for testing purposes
I support Brian position on GPL that it goes against our core values.
Can do. Did you want a new PR or update this one?
You can just update this one
Labels |
Added:
?
?
|
PR updated and removed references to Tiny Cloud.
Example external plugin at:
https://github.com/martyf/tiny-plugin-helloworld
To use:
helloworld
.@dgrammatiko I was thinking that too but then means its very repetitive in its setup - the other thought I had would be to only add the path to the configuration if the button was added to one of the toolbars. That's probably a friendlier setup where the external plugins are configured once, and only called when needed.
Thoughts?
EDIT
Actually that won’t work - some plugins don’t need a button to be triggered (can be done by a keyboard trigger for example).
Will have to be moved to the setoptions.xml file and configured per set.
I’ll get that done and update the PR.
Revision made that has moved the External Plugins config to the setoptions.xml file for per-set configuration.
See above for an example (trivial) plugin.
Steps to implement are:
helloworld
.@martyf After you have removed the cloud stuff, you should update the "Summary of Changes" section at the top of the description of this pull request (PR) accordingly, because it still tells about the cloud. Maybe you should also copy the instructions in your last comment to the "Testing Instructions" section in the description of this PR, so testers (it needs 2 good tests for every PR) can easily find what has been done and how it has to be tested.
Title |
|
All done, @richard67
I mean what's the difference between the existing and the new field?
@brianteeman Thanks, I understand now. But it seems the new functionality includes the old one, i.e. with the new option you can do what could be done with the old option and more, so should not the old field be replaced by the new field instead of having both fields? What do you think? Or are the 2 kinds of plugins for TinyMCE different?
Ok, I just read all above and understand that with this PR, the plugins can be located anywhere outside the TinyMCE path. Is that the only difference to the existing custom plugins?
@richard67 that is correct, external_plugins allows plugins located outside of the Tiny source folder to be loaded.
The Custom Plugins option that exists already is populating the "plugins" config option for Tiny, which is used to load plugins that come packaged with Tiny (but are not necessarily loaded).
Both options need to remain as they do different things - both load plugins, but one loads core where as one loads external.
@martyf One final question before I test (or suggest a change, depends on your answer): The path, is that either an absolute or relative path on the server, like I assume? Or can it also be a URL? I've tried with URL, too, because the label "External Plugin URLs" made me think so, but am URL did not work.
It can be a web-accessible path (absolute or relative) to a file in the Joomla folder structure (such as a new folder for Tiny plugins, or could even be built and installed as a Joomla plugin too.
It can also be a URL to another server - assuming it is configured to allow cross domain requests.
I just saw I made a mistake when testing URL. It works. Was not related to cross-domain.
I have tested this item
Is there something you wanted me to do to help with that?
Well jdoc is a wiki, so if you want, you can sign up there and change the documentation after this PR will be merged. But if not, other jdoc contributors can do that, too.
But maybe I am wrong, am not familiar with the docs and if the help is handled differently. Maybe @brianteeman knows that better.
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-08-13 15:35:06 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
Thanks!
Thanks for creating this.
My 10c personal opinion is that we should not accept this PR on principal. It is providing direct support for a commercial product that is not GPL (or compatible). In addition the terms of the subscription agreement for tiny.cloud are very restrictive of my freedom to use the software. (see https://about.tiny.cloud/legal/tiny-cloud-services-subscription-agreement/)
There is nothing wrong with this being an addon listed on the JED but for me it goes against our core values.