diff options
| author | Hsieh Chin Fan <pham@topo.tw> | 2024-10-08 11:32:20 +0800 |
|---|---|---|
| committer | Hsieh Chin Fan <pham@topo.tw> | 2024-10-08 12:04:29 +0800 |
| commit | 754f4cb4eed6358a83b22b7700d363e2c1e417c4 (patch) | |
| tree | fc62196bdd2ccf0c6d6d979c9f25f9d8051be5db /src | |
| parent | af01343946ce9f47525989d76db6786e2c61f3bf (diff) | |
feat: add editor action for default content
Diffstat (limited to 'src')
| -rw-r--r-- | src/editor.mjs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/editor.mjs b/src/editor.mjs index 533ff16..29574d7 100644 --- a/src/editor.mjs +++ b/src/editor.mjs | |||
| @@ -187,6 +187,16 @@ const editor = new EasyMDE({ | |||
| 187 | text: '\u{1D43C}', | 187 | text: '\u{1D43C}', |
| 188 | title: 'Italic', | 188 | title: 'Italic', |
| 189 | action: EasyMDE.toggleItalic | 189 | action: EasyMDE.toggleItalic |
| 190 | }, | ||
| 191 | '|', | ||
| 192 | { | ||
| 193 | name: 'tutorial', | ||
| 194 | text: '\u{2753}', | ||
| 195 | title: 'Reset for content for tutorial', | ||
| 196 | action: () => { | ||
| 197 | editor.value(defaultContent) | ||
| 198 | refLinks = getRefLinks() | ||
| 199 | } | ||
| 190 | } | 200 | } |
| 191 | ] | 201 | ] |
| 192 | }) | 202 | }) |