Last active
January 31, 2025 16:57
-
-
Save smeech/eaa94190d1a0b80a75eee63b32c466b6 to your computer and use it in GitHub Desktop.
[Rich text images] HTML and Markdown examples, including the injection of images +/- text #espanso #html #markdown
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
| # Espanso Html and Markdown examples, including the injection of images: | |
| # Define a variable containing the location of the home directory | |
| global_vars: | |
| - name: home | |
| type: script | |
| params: | |
| args: | |
| - python | |
| - -c | |
| - print(__import__('os').path.expanduser('~')) | |
| matches: | |
| - trigger: :image1 | |
| markdown: | | |
| some text | |
|  | |
| some more text | |
| - trigger: :image2 | |
| html: | | |
| some text | |
| <img src="file:///{{home}}/path/to/picture.jpg"> | |
| some more text | |
| # image_path: expansions won't work with variables except $CONFIG (the Espanso | |
| # directory) so need absolute path specified | |
| - trigger: :image3 | |
| image_path: /home/stephen/path/to/picture.jpg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment