forked from laurent22/joplin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mobile: Plugin commands: Support renderMarkup (replacable URIs)
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
- Loading branch information
1 parent
2fc9bd4
commit 115feb9
Showing
6 changed files
with
17 additions
and
17 deletions.
There are no files selected for viewing
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
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
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
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
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
12 changes: 6 additions & 6 deletions
12
...ages/app-desktop/commands/renderMarkup.ts → packages/lib/commands/renderMarkup.ts
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