add: markdown snippets in template editor

This commit is contained in:
windingwind 2024-09-12 08:17:26 +00:00
parent dcd84e1e53
commit fae986bce0
6 changed files with 171 additions and 0 deletions

View File

@ -53,6 +53,28 @@ snippet-inlineScript = inline script
.title = Add an inline JS script, the result of which will be embedded in the note
snippet-multiLineScript = multi-line script
.title = Add a multi-line async JS script, the return value of which will be embedded in the note
snippet-markdownHeading1 = heading 1
.title = Markdown heading 1, type `#` at the beginning of the line followed by your heading. Should be used in markdown mode
snippet-markdownHeading2 = heading 2
.title = Markdown heading 2, type `##` at the beginning of the line followed by your heading. Should be used in markdown mode
snippet-markdownHeading3 = heading 3
.title = Markdown heading 3, type `###` at the beginning of the line followed by your heading. Should be used in markdown mode
snippet-markdownBullet = bullet list
.title = Markdown bullet list, type `-` at the beginning of the line followed by your list item. Should be used in markdown mode
snippet-markdownNumber = number list
.title = Markdown number list, type `1.` at the beginning of the line followed by your list item. Should be used in markdown mode
snippet-markdownBold = bold text
.title = Markdown bold text, type `**` at the beginning and end of your text. Should be used in markdown mode
snippet-markdownItalic = italic text
.title = Markdown italic text, type `_` at the beginning and end of your text. Should be used in markdown mode
snippet-markdownLink = link
.title = Markdown link, type `[` at the beginning and `](url)` at the end of your text. Should be used in markdown mode
snippet-markdownMonospace = monospace text
.title = Markdown monospace text, type ` at the beginning and end of your text. Should be used in markdown mode
snippet-markdownQuote = quote
.title = Markdown quote, type `>` at the beginning of the line followed by your quote. Should be used in markdown mode
snippet-markdownTable = table
.title = Markdown table, type `|` to separate columns and rows. Should be used in markdown mode
snippet-dryRunFlag = dry run flag
.title = Check if the template is running in dry run mode, e.g. for preview. In dry run mode, the script should not have side effects.
snippet-itemBeforeLoop = before loop

View File

@ -53,6 +53,28 @@ snippet-inlineScript = inline script
.title = Add an inline JS script, the result of which will be embedded in the note
snippet-multiLineScript = multi-line script
.title = Add a multi-line async JS script, the return value of which will be embedded in the note
snippet-markdownHeading1 = heading 1
.title = Markdown heading 1, type `#` at the beginning of the line followed by your heading. Should be used in markdown mode
snippet-markdownHeading2 = heading 2
.title = Markdown heading 2, type `##` at the beginning of the line followed by your heading. Should be used in markdown mode
snippet-markdownHeading3 = heading 3
.title = Markdown heading 3, type `###` at the beginning of the line followed by your heading. Should be used in markdown mode
snippet-markdownBullet = bullet list
.title = Markdown bullet list, type `-` at the beginning of the line followed by your list item. Should be used in markdown mode
snippet-markdownNumber = number list
.title = Markdown number list, type `1.` at the beginning of the line followed by your list item. Should be used in markdown mode
snippet-markdownBold = bold text
.title = Markdown bold text, type `**` at the beginning and end of your text. Should be used in markdown mode
snippet-markdownItalic = italic text
.title = Markdown italic text, type `_` at the beginning and end of your text. Should be used in markdown mode
snippet-markdownLink = link
.title = Markdown link, type `[` at the beginning and `](url)` at the end of your text. Should be used in markdown mode
snippet-markdownMonospace = monospace text
.title = Markdown monospace text, type ` at the beginning and end of your text. Should be used in markdown mode
snippet-markdownQuote = quote
.title = Markdown quote, type `>` at the beginning of the line followed by your quote. Should be used in markdown mode
snippet-markdownTable = table
.title = Markdown table, type `|` to separate columns and rows. Should be used in markdown mode
snippet-dryRunFlag = dry run flag
.title = Check if the template is running in dry run mode, e.g. for preview. In dry run mode, the script should not have side effects.
snippet-itemBeforeLoop = before loop

View File

@ -53,6 +53,28 @@ snippet-inlineScript = inline script
.title = Add an inline JS script, the result of which will be embedded in the note
snippet-multiLineScript = multi-line script
.title = Add a multi-line async JS script, the return value of which will be embedded in the note
snippet-markdownHeading1 = heading 1
.title = Markdown heading 1, type `#` at the beginning of the line followed by your heading. Should be used in markdown mode
snippet-markdownHeading2 = heading 2
.title = Markdown heading 2, type `##` at the beginning of the line followed by your heading. Should be used in markdown mode
snippet-markdownHeading3 = heading 3
.title = Markdown heading 3, type `###` at the beginning of the line followed by your heading. Should be used in markdown mode
snippet-markdownBullet = bullet list
.title = Markdown bullet list, type `-` at the beginning of the line followed by your list item. Should be used in markdown mode
snippet-markdownNumber = number list
.title = Markdown number list, type `1.` at the beginning of the line followed by your list item. Should be used in markdown mode
snippet-markdownBold = bold text
.title = Markdown bold text, type `**` at the beginning and end of your text. Should be used in markdown mode
snippet-markdownItalic = italic text
.title = Markdown italic text, type `_` at the beginning and end of your text. Should be used in markdown mode
snippet-markdownLink = link
.title = Markdown link, type `[` at the beginning and `](url)` at the end of your text. Should be used in markdown mode
snippet-markdownMonospace = monospace text
.title = Markdown monospace text, type ` at the beginning and end of your text. Should be used in markdown mode
snippet-markdownQuote = quote
.title = Markdown quote, type `>` at the beginning of the line followed by your quote. Should be used in markdown mode
snippet-markdownTable = table
.title = Markdown table, type `|` to separate columns and rows. Should be used in markdown mode
snippet-dryRunFlag = dry run flag
.title = Check if the template is running in dry run mode, e.g. for preview. In dry run mode, the script should not have side effects.
snippet-itemBeforeLoop = before loop

View File

@ -53,6 +53,28 @@ snippet-inlineScript = inline script
.title = Add an inline JS script, the result of which will be embedded in the note
snippet-multiLineScript = multi-line script
.title = Add a multi-line async JS script, the return value of which will be embedded in the note
snippet-markdownHeading1 = heading 1
.title = Markdown heading 1, type `#` at the beginning of the line followed by your heading. Should be used in markdown mode
snippet-markdownHeading2 = heading 2
.title = Markdown heading 2, type `##` at the beginning of the line followed by your heading. Should be used in markdown mode
snippet-markdownHeading3 = heading 3
.title = Markdown heading 3, type `###` at the beginning of the line followed by your heading. Should be used in markdown mode
snippet-markdownBullet = bullet list
.title = Markdown bullet list, type `-` at the beginning of the line followed by your list item. Should be used in markdown mode
snippet-markdownNumber = number list
.title = Markdown number list, type `1.` at the beginning of the line followed by your list item. Should be used in markdown mode
snippet-markdownBold = bold text
.title = Markdown bold text, type `**` at the beginning and end of your text. Should be used in markdown mode
snippet-markdownItalic = italic text
.title = Markdown italic text, type `_` at the beginning and end of your text. Should be used in markdown mode
snippet-markdownLink = link
.title = Markdown link, type `[` at the beginning and `](url)` at the end of your text. Should be used in markdown mode
snippet-markdownMonospace = monospace text
.title = Markdown monospace text, type ` at the beginning and end of your text. Should be used in markdown mode
snippet-markdownQuote = quote
.title = Markdown quote, type `>` at the beginning of the line followed by your quote. Should be used in markdown mode
snippet-markdownTable = table
.title = Markdown table, type `|` to separate columns and rows. Should be used in markdown mode
snippet-dryRunFlag = dry run flag
.title = Check if the template is running in dry run mode, e.g. for preview. In dry run mode, the script should not have side effects.
snippet-itemBeforeLoop = before loop

View File

@ -52,6 +52,28 @@ snippet-inlineScript = 内联脚本
.title = 添加一个内联 JS 脚本,其结果将嵌入到笔记中
snippet-multiLineScript = 多行脚本
.title = 添加一个多行异步 JS 脚本,其返回值将嵌入到笔记中
snippet-markdownHeading1 = 一级标题
.title = Markdown 一级标题,在行首输入 `#` 后跟你的标题。应在 Markdown 模式下使用
snippet-markdownHeading2 = 二级标题
.title = Markdown 二级标题,在行首输入 `##` 后跟你的标题。应在 Markdown 模式下使用
snippet-markdownHeading3 = 三级标题
.title = Markdown 三级标题,在行首输入 `###` 后跟你的标题。应在 Markdown 模式下使用
snippet-markdownBullet = 无序列表
.title = Markdown 无序列表,在行首输入 `-` 后跟你的列表项。应在 Markdown 模式下使用
snippet-markdownNumber = 有序列表
.title = Markdown 有序列表,在行首输入 `1.` 后跟你的列表项。应在 Markdown 模式下使用
snippet-markdownBold = 加粗文本
.title = Markdown 加粗文本,在文本的开头和结尾输入 `**`。应在 Markdown 模式下使用
snippet-markdownItalic = 斜体文本
.title = Markdown 斜体文本,在文本的开头和结尾输入 `_`。应在 Markdown 模式下使用
snippet-markdownLink = 链接
.title = Markdown 链接,在文本的开头输入 `[`,在结尾输入 `](url)`。应在 Markdown 模式下使用
snippet-markdownMonospace = 单行
.title = Markdown 单行,在文本的开头和结尾输入 `。应在 Markdown 模式下使用
snippet-markdownQuote = 引用
.title = Markdown 引用,在行首输入 `>` 后跟你的引用内容。应在 Markdown 模式下使用
snippet-markdownTable = 表格
.title = Markdown 表格,使用 `|` 分隔列和行。应在 Markdown 模式下使用
snippet-dryRunFlag = dry run标志
.title = 检查模板是否在dry run模式下运行例如用于预览。在dry run模式下脚本不应有副作用。
snippet-itemBeforeLoop = 循环前

View File

@ -609,6 +609,67 @@ const snippetsStore = {
code: "\n${{\n // write your script here\n}}$\n",
type: "syntax",
},
{
name: "markdownHeading1",
code: "\n# type your heading here",
type: "syntax",
},
{
name: "markdownHeading2",
code: "\n## type your heading here",
type: "syntax",
},
{
name: "markdownHeading3",
code: "\n### type your heading here",
type: "syntax",
},
{
name: "markdownBullet",
code: "\n\n- type your bullet list here",
type: "syntax",
},
{
name: "markdownNumber",
code: "\n\n1. type your number list here",
type: "syntax",
},
{
name: "markdownBold",
code: "**type your bold text here**",
type: "syntax",
},
{
name: "markdownItalic",
code: "_type your italic text here_",
type: "syntax",
},
{
name: "markdownLink",
code: "[type your link text here](type your link url here)",
type: "syntax",
},
{
name: "markdownMonospace",
code: "\n\n`type your text here`",
type: "syntax",
},
{
name: "markdownQuote",
code: "\n\n> type your quote here",
type: "syntax",
},
{
name: "markdownTable",
code: `
| Header 1 | Header 2 |
|----------|----------|
| Cell 1 | Cell 2 |
`,
type: "syntax",
},
{
name: "dryRunFlag",
code: "_env.dryRun",