Skip to content
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

Desktop: Fixes #9932: Fix only one CodeMirror 6 content script loaded per plugin #9934

Conversation

personalizedrefrigerator
Copy link
Collaborator

Summary

Previously, if a plugin registered two CodeMirror content scripts, the IDs used for both content scripts would be the same. This pull request causes the CodeMirror 6 plugin loader to consider both contentScript.pluginId and contentScript.contentScriptId when generating internal IDs.

Fixes #9932.

Testing

  1. Load the example plugin from Chore: Plugins: Add CodeMirror 6 plugin tutorial #9933
  2. Change the order that the example plugin adds content scripts (add the CodeMirror 5 content script first)
  3. Start Joplin with the beta editor enabled
  4. Observe that the CodeMirror 6 plugin doesn't load
  5. Repeat steps 1-3 with the original order preserved

@laurent22 laurent22 merged commit 2aea7fc into laurent22:dev Feb 19, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Desktop: Beta CM6 editor can only load one contentScript per plugin
2 participants