-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[5.0][RFC][Events] Make Editor and Buttons plugins to use plugin events #40082
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Conflicts: plugins/editors/codemirror/src/Extension/Codemirror.php
4 tasks
Conflicts: plugins/editors/codemirror/src/Extension/Codemirror.php
Conflicts: plugins/editors/codemirror/src/Extension/Codemirror.php
Member
|
Can you please create a manual entry for migration, not only that it changes, also what needs to be done to convert a button to use event triggers please. I'm merging this for now to have more test coverage in alpha. |
Member
Author
|
Do not forget the same for Cpatcha: Also would be good to have a decision about following, client side api: Which depend from Dialog PR #40150 |
4 tasks
4 tasks
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
b/c break
This item changes the behavior in an incompatible why. HEADS UP
Documentation Required
Feature
RFC
Request for Comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of Changes
The patch improve Editor and Buttons plugins.
Now they can use a real events.
It similar to #39657 but for Editors and Buttons.
This is fully backward compatible.
How this work.
Here I added a new event
onEditorSetupand an Interface forEditorProviderInterfaceclass.And similar for buttons
onEditorButtonsSetupand a Button class with InterfaceButtonInterface.On
onEditorSetupan editor plugin should register ownEditorProviderinEditorsRegistry.On
onEditorButtonsSetupa button plugin should register own Button(s) inButtonsRegistry.The system will retrieve a requested Editor from that registry and call required methods, that defined by
EditorProviderInterface.Example registering an Editor:
joomla-cms/plugins/editors/codemirror/src/Extension/Codemirror.php
Lines 50 to 55 in 059d2b4
Example registering an editor Button:
joomla-cms/plugins/editors-xtd/article/src/Extension/Article.php
Lines 58 to 73 in 059d2b4
Testing Instructions
Apply patch.
Set default editor to Codemirror and make sure it works.
Testing B/C:
Enable TinyMCE editor and make sure it works.
Actual result BEFORE applying this Pull Request
Works
Expected result AFTER applying this Pull Request
Works
Link to documentations
Please select: