-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add placeholder variables (version 0.3.0)
- Loading branch information
Showing
7 changed files
with
52 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ This plugin lets you plan small emails inside your [Obsidian](https://www.obsidi | |
Add the "email" code block into your note: | ||
|
||
... with plain text as body content: | ||
|
||
```` | ||
to: [email protected] | ||
|
@@ -32,14 +33,21 @@ body: "Hey info, | |
```` | ||
|
||
... with a referenced note as body content: | ||
|
||
```` | ||
to: [email protected] | ||
subject: My Subject | ||
body: [[MyMail4711]] | ||
variables: | ||
myvar: TestVar | ||
``` | ||
```` | ||
|
||
You can use the `variables` parameter to replace placeholders in your body text with the variable values. | ||
To include a variable in the body text just add a placeholder `{{myvar}}`. | ||
Variables from frontmatter data can be used as well. | ||
|
||
### Parameter | ||
|
||
You can customize the view with the following parameters: | ||
|
@@ -52,13 +60,17 @@ You can customize the view with the following parameters: | |
| subject | The subject of the email. | String value | | ||
| body | The body of the email. Plain text or a link to a \[\[NoteFile\]\] (x). | String value | | ||
| showmailto | Show the "mailto" link after the mail body. | true/false (Default: true) | | ||
| variables | A map of placeholder variables. | YAML Object | - | | ||
|
||
x) Note that no formatting is supported (only new | ||
lines) ([reason](https://stackoverflow.com/questions/5620324/mailto-link-with-html-body)). | ||
|
||
x) Note that no formatting is supported (only new lines) ([reason](https://stackoverflow.com/questions/5620324/mailto-link-with-html-body)). | ||
### Example | ||
|
||
![Example](example/email-block-plugin.gif) | ||
|
||
## Future features | ||
|
||
- Template variables in body + subject | ||
|
||
## How to dev | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
{ | ||
"0.1.0": "0.15.0" | ||
"0.1.0": "0.15.0", | ||
"0.1.1": "0.15.0", | ||
"0.2.0": "0.15.0", | ||
"0.3.0": "0.15.0" | ||
} |