diff options
-rw-r--r-- | src/editor.mjs | 49 |
1 files changed, 46 insertions, 3 deletions
diff --git a/src/editor.mjs b/src/editor.mjs index fb73f93..46d91af 100644 --- a/src/editor.mjs +++ b/src/editor.mjs | |||
@@ -43,8 +43,51 @@ const toggleEditing = () => { | |||
43 | 43 | ||
44 | // Content values for editor | 44 | // Content values for editor |
45 | 45 | ||
46 | const defaultContent = | 46 | const defaultContent = `<br> |
47 | '## Links\n\n- [Go to marker](geo:24,121?id=foo,leaflet&text=normal "Link Test")\n\n```map\nid: foo\nuse: Maplibre\n```\n' | 47 | |
48 | > <big>Hello My Friend! This is DumbyMap!</big> | ||
49 | |||
50 | <br> | ||
51 | |||
52 | \`\`\`map | ||
53 | use: Leaflet | ||
54 | height: 120px | ||
55 | XYZ: https://tile.openstreetmap.jp/styles/osm-bright/512/{z}/{x}/{y}.png | ||
56 | \`\`\` | ||
57 | |||
58 | |||
59 | DumbyMap generates **interactive document with maps** from raw texts. | ||
60 | |||
61 | You can use it to: | ||
62 | |||
63 | 1. [Roll a Dice] for a new map | ||
64 | 2. Click on [GeoLink][example-geolink] for maps. Or Add a new one by **Right Click** on map. | ||
65 | 3. Add more contents into [Editor] by text in [Markdown] | ||
66 | 4. Generated document is at left hand side, **Right click** for context menu. | ||
67 | You can: | ||
68 | + Select content block for browsing | ||
69 | + Switch layouts for various use cases | ||
70 | |||
71 | |||
72 | If you want know more, take a look at subjects below: | ||
73 | 1. [How to write text in Markdown?][subject] | ||
74 | 2. [How can I save contents for next time][subject] | ||
75 | 3. [I want XXX feature in maps][subject] | ||
76 | 3. [I am a expeienced developer, show me what you got!][subject] | ||
77 | |||
78 | |||
79 | <br> | ||
80 | |||
81 | > Have Fun ~ | ||
82 | |||
83 | <br> | ||
84 | |||
85 | [Roll a dice]: #Click%20it! "=>.mde-roll" | ||
86 | [example-geolink]: geo:24,121?xy=121,24 | ||
87 | [Markdown]: https://www.markdownguide.org/basic-syntax/ | ||
88 | [Editor]: #This%20is%20editor! "=>.editor" | ||
89 | [subject]: placeholder` | ||
90 | |||
48 | const editor = new EasyMDE({ | 91 | const editor = new EasyMDE({ |
49 | element: textArea, | 92 | element: textArea, |
50 | initialValue: defaultContent, | 93 | initialValue: defaultContent, |
@@ -68,7 +111,7 @@ const editor = new EasyMDE({ | |||
68 | toolbar: [ | 111 | toolbar: [ |
69 | { | 112 | { |
70 | name: 'roll', | 113 | name: 'roll', |
71 | title: 'Roll a dice', | 114 | title: 'Roll a Dice', |
72 | text: '\u{2684}', | 115 | text: '\u{2684}', |
73 | action: () => addMapRandomlyByPreset() | 116 | action: () => addMapRandomlyByPreset() |
74 | }, | 117 | }, |