-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[5.0] TinyMCE highlighter plugin with CodeMirror 6 #41289
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
Conversation
|
@Fedik wasn't the reason that the original version used an iframe to not interfere with the tinyMCE styles? Anyways, you could wrap the textarea into a web component with a slot (with Shadow DOM) to overcome the styling problem... |
I think it was more about avoid of loading codemirror scripts and styles, on initila load. But maybe also this.
That what I want to avoid: shadow dom and iframe :) |
|
This is ready for testing |
|
@brianteeman you may have time tomorrow for a quick look? |
|
it works for me but looks different then 4.4 version right? |
|
|
@HLeithner you forgot to enable "Source Code Highlighting" in plugin parameters.
It is gone, forever, sorry.
It is general behavior of codemirror 6, check codemirror/dev#238 Quote:
It can be coded to work, but do we need it?
Hmhm, this is working with default "Source view" of TinyMCE. |
|
I'm merging this for now, but the tab issues is a bit annoying, I have read suggestions like key combination ESC and then TAB to escape from the editor area. Which sounds good to me. |
|
The accessibility issue really must be fixed before merge |
Do not hurry, it is not that important feature, and it is optional anyway. The tab escaping the modal is easy to fix with dialog modal (#40150), the browser automatically prevents the focus to leave the dialog. |
|
@Fedik just switch to the Joomla modal and ask @HLeithner to finally merge that PR... |
At this point TinyMCE trap the tab. |
I'm still in the modal and can tab between 3 modal buttons but can't get back into CM |
That what I meant, TinyMCE "tab trap" does not allow for the focus to go in to content, in some reason. I replaced one bug with annother. |
|
but at this point in time tinymce isn't in charge of doing anything or? |
It is, the modal is from tinymce API, it have a feature to "trap the tab", to avoind a bug when tab goes under the modal. |
|
ok, now I understand, can this be solved with your own modal #40150 ? |
|
yeap, I tried a quick test, it is working. |
|
Ok then I merge this for now, even if it's not optimal and hope that with #40150 we get a proper working interface. thanks |
* joomla-highlighter * joomla-highlighter * fixes * joomla-highlighter * clean * clean * focus * Fix styling * Tab trap
* Add deleted files and folders and renamed files - Deleted files and folders from PR #41276 - Renamed file from PR #41260 * Migrate enabled and params from old system plugin on update * Remove deleted files and folders from PR #41276 These files and folders will be removed by the uninstallation of the plugin. * Add exceptions to deleted file check script These files and folders will be removed by the uninstallation of the plugin and therefore should not be added to the lists of deleted files and folders. * Add deleted files and folders from PR #41289 * Add /media/plg_system_compat to exceptions * Remove /media/plg_system_compat deleted files and folders * Revert "Remove /media/plg_system_compat deleted files and folders" This reverts commit ea429a6. * Revert "Add /media/plg_system_compat to exceptions" This reverts commit 296febf.


Pull Request for Issue #41278 .
Summary of Changes
(Re)Writing a plugin for TinyMCE code highlighting with CodeMirror 6.
Testing Instructions
Apply patch, run
npm install.Enable "code highlighting" in TinyMCE plugin parameters.
Open article editing and check that "code highlighting" is working
Actual result BEFORE applying this Pull Request
working
Expected result AFTER applying this Pull Request
working
Link to documentations
Please select: