aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2024-10-06 14:12:26 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-10-07 16:15:56 +0800
commit31cc063c23df57832779b004a22d85cd6cf5caf0 (patch)
tree75fd8c2ac9f039e0f3ba4a26c496a2dada671b0e /src
parent2f82762ace33a0986c1ec3fc72da83113810dae9 (diff)
feat: new default content for tutorial
Diffstat (limited to 'src')
-rw-r--r--src/editor.mjs49
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
46const defaultContent = 46const 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
53use: Leaflet
54height: 120px
55XYZ: https://tile.openstreetmap.jp/styles/osm-bright/512/{z}/{x}/{y}.png
56\`\`\`
57
58
59DumbyMap generates **interactive document with maps** from raw texts.
60
61You can use it to:
62
631. [Roll a Dice] for a new map
642. Click on [GeoLink][example-geolink] for maps. Or Add a new one by **Right Click** on map.
653. Add more contents into [Editor] by text in [Markdown]
664. 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
72If you want know more, take a look at subjects below:
731. [How to write text in Markdown?][subject]
742. [How can I save contents for next time][subject]
753. [I want XXX feature in maps][subject]
763. [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
48const editor = new EasyMDE({ 91const 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 },