Skip to content

Commit 1d6057d

Browse files
committed
1.5.2 - Several bug fixes, documentation and replacing electron with tauri
1 parent 8c5901f commit 1d6057d

File tree

3 files changed

+49
-18
lines changed

3 files changed

+49
-18
lines changed

CHANGELOG.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ EasyEdit is an easy markdown editor that allows you to write Markdown (MD) and p
77
*EasyEdit is a free and open-source project. You can use it for free and modify it as you like.*
88

99
## Latest CODE version
10-
- 1.5.1-tauri - The same build just packaged with tauri package manager
11-
- 1.5.1 - Several bug fixes and improvements, documentation
12-
10+
- 1.5.2 - Several bug fixes, documentation and replacing electron with tauri
1311

1412
## Version changes
13+
- 1.5.1-tauri - The same build just packaged with tauri package manager
1514
- 1.5.0 - Implemented File System Access API for modern browsers (Chrome/Edge/Opera)
1615
- 1.4.6 - Implemented new ascii template and ascii-art in preview
1716
- 1.4.5 - Implemented theme picker or creator

release/latest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "1.5.1"
2+
"version": "1.5.2"
33
}

src/components/InsertDropdown.tsx

Lines changed: 46 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,59 @@ export default function InsertDropdown({ onRuler, onIndent1, onIndent2, onList1,
1616
<button
1717
className="dropdown-item"
1818
onClick={() => {
19-
// insert a simple link to the project homepage
20-
onInsertTemplate('[EasyEdit HomePage](https://github.com/gcclinux/easyedit)');
19+
const date = new Date();
20+
const parts = date.toString().split(' ');
21+
// parts: ['Sun', 'Dec', '21', '2025', '22:05:41', 'GMT+0000', '(Coordinated', 'Universal', 'Time)']
22+
// We need time in AM/PM.
23+
const time = date.toLocaleTimeString('en-US', { hour12: true }); // "10:05:29 PM"
24+
// We need timezone. 'GMT' is hardcoded in user request example but might imply local.
25+
// If we want exactly "Sun Dec 21 10:05:29 PM GMT 2025":
26+
// Let's assume the user wants their local time representation but formatted this way.
27+
// Getting explicit "GMT" or "EST" is flaky in JS without libraries.
28+
// However, `date.toString()` usually gives `GMT-0500` or similar.
29+
30+
// Let's try to stick to a slightly cleaner native string if possible, or build it.
31+
// User asked for: Sun Dec 21 10:05:29 PM GMT 2025
32+
33+
const dayName = parts[0]; // Sun
34+
const month = parts[1]; // Dec
35+
const day = parts[2]; // 21
36+
const year = parts[3]; // 2025
37+
38+
// To format nicely:
39+
const dateStr = `${dayName} ${month} ${day} ${time} GMT ${year}`;
40+
onInsertTemplate(dateStr);
41+
onClose();
42+
}}
43+
>
44+
<div className="hdr-title">Date</div>
45+
<div className="hdr-desc"><em>Today's date</em></div>
46+
<div className="hdr-sep" />
47+
</button>
48+
<button
49+
className="dropdown-item"
50+
onClick={() => {
51+
// insert a simple link to the project homepage
52+
onInsertTemplate('[EasyEdit HomePage](https://github.com/gcclinux/easyedit)');
2153
onClose();
2254
}}
2355
>
2456
<div className="hdr-title">Link</div>
2557
<div className="hdr-desc"><em>Simple link</em></div>
2658
<div className="hdr-sep" />
2759
</button>
28-
<button
29-
className="dropdown-item"
30-
onClick={() => {
31-
// insert a checklist example
32-
onInsertTemplate('- [ ] This item is unchecked\n- [X] This item is checked\n');
33-
onClose();
34-
}}
35-
>
36-
<div className="hdr-title">Checklist</div>
37-
<div className="hdr-desc"><em>Insert a checked / unchecked list</em></div>
38-
<div className="hdr-sep" />
39-
</button>
60+
<button
61+
className="dropdown-item"
62+
onClick={() => {
63+
// insert a checklist example
64+
onInsertTemplate('- [ ] This item is unchecked\n- [X] This item is checked\n');
65+
onClose();
66+
}}
67+
>
68+
<div className="hdr-title">Checklist</div>
69+
<div className="hdr-desc"><em>Insert a checked / unchecked list</em></div>
70+
<div className="hdr-sep" />
71+
</button>
4072
<button className="dropdown-item" onClick={() => { onRuler(); onClose(); }}>
4173
<div className="hdr-title">Ruler</div>
4274
<div className="hdr-desc"><em>Markdown ruler / page split</em></div>

0 commit comments

Comments
 (0)