-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Plugins: Add support for editor plugins #11296
Merged
Merged
Conversation
This file contains 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
personalizedrefrigerator
added a commit
to personalizedrefrigerator/joplin
that referenced
this pull request
Oct 31, 2024
This commit adds support for the renderMarkup command on mobile and web. Resource URLs take different forms on desktop, web, and mobile. As such, this commit takes the approach of rendering a replacable resource URL in the form joplin-resource://<resource-id>.<extension> . To properly support this, the webviewApi in user webviews will need to be extended to allow resolving resources from URLs. Possible alternatives: - Use a different resource base URL on mobile and desktop (perhaps determined by shim.noteViewerBaseUrl ?) - This wouldn't help on web, where each resource must be sent to a note viewer before it can be loaded (web uses a virtual file system). - Rather than have a renderMarkup command, extend laurent22#11296 to extend webviewApi with a renderMarkup function. Calling this function would load and select the correct resource URIs for the current webview. This would also allow user plugins to run. - This approach is more complicated than the approach taken here. It could potentially be used **in addition** to this existing command-based approach. See also: ff09937
Seems ok now. For now it will be desktop-only and we can look at mobile later on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to 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.
This allow defining a plugin view that will replace the text editor. Use case is for example showing a kanban board instead of the note editor.
Making it a draft for now since it hasn't been tested much and mobile also needs to be implemented - either we actually make it work on mobile (if not too complicated), or we make it work like a regular panel.