-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.html
More file actions
2102 lines (1980 loc) · 118 KB
/
index.html
File metadata and controls
2102 lines (1980 loc) · 118 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Primary Meta Tags -->
<title>Markups - Free Online Markdown Editor with Live Preview</title>
<meta name="title" content="Markups - Free Online Markdown Editor with Live Preview">
<meta name="description"
content="Write Markdown with real-time preview, Mermaid diagrams, KaTeX math, syntax highlighting, and export to PDF/HTML/DOCX. Privacy-focused, no login required.">
<meta name="keywords"
content="markups, markdown editor, live preview, mermaid diagrams, katex math, syntax highlighting, pdf export, online markdown, free markdown editor, github markdown">
<meta name="author" content="Nir-Bhay">
<meta name="robots" content="index, follow">
<link rel="canonical" href="https://markups.vercel.app/">
<!-- Theme & PWA -->
<meta name="theme-color" content="#5865f2">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta name="apple-mobile-web-app-title" content="Markups">
<meta name="mobile-web-app-capable" content="yes">
<meta name="application-name" content="Markups">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://markups.vercel.app/">
<meta property="og:title" content="Markups - Free Online Markdown Editor with Live Preview">
<meta property="og:description"
content="Write Markdown with real-time preview, Mermaid diagrams, KaTeX math, syntax highlighting, and export to PDF/HTML/DOCX. Privacy-focused, no login required.">
<meta property="og:image" content="https://markups.vercel.app/image/og-image.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:site_name" content="Markups">
<meta property="og:locale" content="en_US">
<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:url" content="https://markups.vercel.app/">
<meta name="twitter:title" content="Markups - Free Online Markdown Editor with Live Preview">
<meta name="twitter:description"
content="Write Markdown with real-time preview, Mermaid diagrams, KaTeX math, syntax highlighting, and export to PDF/HTML/DOCX. Privacy-focused, no login required.">
<meta name="twitter:image" content="https://markups.vercel.app/image/og-image.png">
<meta name="twitter:creator" content="@NirBhay">
<!-- JSON-LD Structured Data -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebApplication",
"name": "Markups",
"url": "https://markups.vercel.app/",
"description": "A premium, privacy-focused Markdown editor with live preview, Mermaid diagrams, KaTeX math equations, and multi-format export capabilities.",
"applicationCategory": "ProductivityApplication",
"operatingSystem": "Any",
"browserRequirements": "Requires JavaScript. Requires HTML5.",
"offers": {
"@type": "Offer",
"price": "0",
"priceCurrency": "USD"
},
"featureList": [
"Real-time Markdown Preview",
"Mermaid Diagram Support",
"KaTeX Math Equations",
"Syntax Highlighting",
"Export to PDF, HTML, DOCX",
"Multiple Themes",
"Auto-save",
"Multi-tab Support",
"Focus Mode",
"Typewriter Mode"
],
"screenshot": "https://markups.vercel.app/image/screenshot.png",
"author": {
"@type": "Person",
"name": "Nir-Bhay",
"url": "https://github.com/Nir-Bhay"
},
"datePublished": "2024-01-01",
"dateModified": "2026-01-05"
}
</script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-8WMNRN5GFM"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-8WMNRN5GFM');
</script>
<!-- Microsoft Clarity -->
<script type="text/javascript">
(function (c, l, a, r, i, t, y) {
c[a] = c[a] || function () { (c[a].q = c[a].q || []).push(arguments) };
t = l.createElement(r); t.async = 1; t.src = "https://www.clarity.ms/tag/" + i;
y = l.getElementsByTagName(r)[0]; y.parentNode.insertBefore(t, y);
})(window, document, "clarity", "script", "uwrtfye6w8");
</script>
<!-- Vercel Web Analytics -->
<script>
window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); };
</script>
<script defer src="/_vercel/insights/script.js"></script>
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap"
rel="stylesheet">
<!-- Material Symbols for Export Modal -->
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap"
rel="stylesheet">
<!-- Styles -->
<link rel="stylesheet" href="/css/premium-ui.css">
<link rel="stylesheet" href="/css/github-markdown-light.css">
<link rel="icon" type="image/png" href="favicon.png">
<link rel="manifest" href="/manifest.json">
<link rel="apple-touch-icon" href="favicon.png">
<script type="module" src="/src/main.js"></script>
</head>
<body class="view-split">
<!-- ==================== HEADER ==================== -->
<header class="premium-header" role="banner">
<!-- Brand -->
<div class="header-brand">
<div class="brand-logo">M</div>
<span class="brand-name">Markups</span>
</div>
<!-- Tabs -->
<div class="header-tabs" id="tabs-list">
<button class="header-tab active" data-tab="1">
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor">
<path
d="M14 4.5V14a2 2 0 01-2 2H4a2 2 0 01-2-2V2a2 2 0 012-2h5.5L14 4.5zm-3 0A1.5 1.5 0 019.5 3V1H4a1 1 0 00-1 1v12a1 1 0 001 1h8a1 1 0 001-1V4.5h-2z" />
</svg>
<span class="tab-name">Untitled.md</span>
<span class="tab-close" aria-label="Close tab">×</span>
</button>
<button class="header-tab-add" id="new-tab-button" aria-label="New tab">
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor">
<path
d="M8 4a.5.5 0 01.5.5v3h3a.5.5 0 010 1h-3v3a.5.5 0 01-1 0v-3h-3a.5.5 0 010-1h3v-3A.5.5 0 018 4z" />
</svg>
</button>
</div>
<!-- Mobile: New File button (left side) -->
<button class="mobile-header-btn" id="mobile-new-file-btn" aria-label="New file" title="New file">
<svg width="20" height="20" viewBox="0 0 16 16" fill="currentColor">
<path
d="M8 4a.5.5 0 01.5.5v3h3a.5.5 0 010 1h-3v3a.5.5 0 01-1 0v-3h-3a.5.5 0 010-1h3v-3A.5.5 0 018 4z" />
</svg>
</button>
<!-- Mobile: Import button (left side, next to +) -->
<button class="mobile-header-btn" id="mobile-import-nav-btn" aria-label="Import file" title="Import file">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
<polyline points="17 8 12 3 7 8"></polyline>
<line x1="12" y1="3" x2="12" y2="15"></line>
</svg>
</button>
<!-- Mobile View Switcher (center) -->
<div class="mobile-view-switcher" id="mobile-view-switcher">
<button class="mobile-view-btn active" data-view="editor">Write</button>
<button class="mobile-view-btn" data-view="preview">Preview</button>
</div>
<!-- Mobile: Theme toggle (right side) -->
<button class="mobile-header-btn" id="mobile-theme-btn" aria-label="Toggle theme" title="Toggle theme">
<svg class="icon-sun" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
<svg class="icon-moon" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="display:none;">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
</svg>
</button>
<!-- Mobile: Export button (right side, before hamburger) -->
<button class="mobile-header-btn mobile-export-btn" id="mobile-export-nav-btn" aria-label="Export"
title="Export">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
<polyline points="7 10 12 15 17 10"></polyline>
<line x1="12" y1="15" x2="12" y2="3"></line>
</svg>
</button>
<!-- Mobile Hamburger (right side) -->
<button class="mobile-header-menu" id="mobile-header-menu" aria-label="Menu">
<svg width="22" height="22" viewBox="0 0 16 16" fill="currentColor">
<path fill-rule="evenodd"
d="M2.5 12a.5.5 0 01.5-.5h10a.5.5 0 010 1H3a.5.5 0 01-.5-.5zm0-4a.5.5 0 01.5-.5h10a.5.5 0 010 1H3a.5.5 0 01-.5-.5zm0-4a.5.5 0 01.5-.5h10a.5.5 0 010 1H3a.5.5 0 01-.5-.5z" />
</svg>
</button>
<!-- Actions -->
<div class="header-actions">
<!-- Search -->
<button class="header-btn icon-with-label" id="search-btn" title="Search (Ctrl+F)">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<circle cx="11" cy="11" r="8"></circle>
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
</svg>
<span class="btn-label">Search</span>
</button>
<!-- Find & Replace -->
<button class="header-btn icon-with-label" id="find-replace-btn" title="Find & Replace (Ctrl+Shift+H)">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<circle cx="11" cy="8" r="5"></circle>
<line x1="20" y1="20" x2="16.65" y2="16.65"></line>
<path d="M6 17h8"></path>
<path d="M10 21l-2-2 2-2"></path>
<path d="M14 17l2 2-2 2"></path>
</svg>
<span class="btn-label">Replace</span>
</button>
<!-- Version History -->
<button class="header-btn icon-with-label" id="version-history-btn" title="Version History (Ctrl+Shift+V)">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"></circle>
<polyline points="12 6 12 12 16 14"></polyline>
</svg>
<span class="btn-label">History</span>
</button>
<!-- Import -->
<button class="header-btn icon-with-label" id="import-button" title="Import File">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
<polyline points="17 8 12 3 7 8"></polyline>
<line x1="12" y1="3" x2="12" y2="15"></line>
</svg>
<span class="btn-label">Upload</span>
</button>
<!-- Help -->
<button class="header-btn icon-with-label" id="help-button" title="Help (Ctrl+H)">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"></circle>
<path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path>
<line x1="12" y1="17" x2="12.01" y2="17"></line>
</svg>
<span class="btn-label">Help</span>
</button>
<!-- View Mode Toggle -->
<div class="view-mode-toggle">
<button class="view-mode-btn" id="view-code" data-view="editor" title="Editor only">Write</button>
<button class="view-mode-btn active" id="view-split" data-view="split" title="Split view">Split</button>
<button class="view-mode-btn" id="view-preview" data-view="preview"
title="Preview only">Preview</button>
</div>
<!-- Theme Toggle -->
<button class="header-btn icon-with-label" id="dark-mode-toggle" title="Toggle theme">
<svg class="icon-sun" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
<svg class="icon-moon" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="display:none;">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
</svg>
<span class="btn-label">Theme</span>
</button>
<!-- Settings -->
<button class="header-btn icon-with-label" id="settings-btn" title="Settings">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="3"></circle>
<path
d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z">
</path>
</svg>
<span class="btn-label">Settings</span>
</button>
<!-- Export -->
<button class="header-btn primary icon-with-label" id="export-btn" title="Export Document (Ctrl+Shift+E)">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
<polyline points="7 10 12 15 17 10"></polyline>
<line x1="12" y1="15" x2="12" y2="3"></line>
</svg>
<span class="btn-label">Export</span>
</button>
</div>
</header>
<!-- ==================== TOOLBAR ==================== -->
<div class="premium-toolbar" id="toolbar" role="toolbar" aria-label="Formatting toolbar">
<!-- Text Formatting -->
<div class="toolbar-group">
<button class="toolbar-btn" id="toolbar-bold" title="Bold (Ctrl+B)" aria-label="Bold">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
<path
d="M8.21 13c2.106 0 3.412-1.087 3.412-2.823 0-1.306-.984-2.283-2.324-2.386v-.055a2.176 2.176 0 001.852-2.14c0-1.51-1.162-2.46-3.014-2.46H3.843V13H8.21zM5.908 4.674h1.696c.963 0 1.517.451 1.517 1.244 0 .834-.629 1.32-1.73 1.32H5.908V4.673zm0 6.788V8.598h1.73c1.217 0 1.88.492 1.88 1.415 0 .943-.643 1.449-1.832 1.449H5.907z" />
</svg>
</button>
<button class="toolbar-btn" id="toolbar-italic" title="Italic (Ctrl+I)" aria-label="Italic">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
<path
d="M7.991 11.674L9.53 4.455c.123-.595.246-.71 1.347-.807l.11-.52H7.211l-.11.52c1.06.096 1.128.212 1.005.807L6.57 11.674c-.123.595-.246.71-1.346.806l-.11.52h3.774l.11-.52c-1.06-.095-1.129-.211-1.006-.806z" />
</svg>
</button>
<button class="toolbar-btn" id="toolbar-strikethrough" title="Strikethrough" aria-label="Strikethrough">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
<path
d="M6.333 5.686c0 .31.083.581.27.814H5.166a2.776 2.776 0 01-.099-.76c0-1.627 1.436-2.768 3.48-2.768 1.969 0 3.39 1.175 3.445 2.85h-1.23c-.11-1.08-.964-1.743-2.25-1.743-1.23 0-2.18.602-2.18 1.607zm2.194 7.478c-2.153 0-3.589-1.107-3.705-2.81h1.23c.144 1.06 1.129 1.703 2.544 1.703 1.34 0 2.31-.705 2.31-1.675 0-.827-.547-1.374-1.914-1.675L8.046 8.5H1v-1h14v1h-3.504c.468.437.675.994.675 1.697 0 1.826-1.436 2.967-3.644 2.967z" />
</svg>
</button>
</div>
<span class="toolbar-divider"></span>
<!-- Headings -->
<div class="toolbar-group">
<button class="toolbar-btn toolbar-btn-text" id="toolbar-h1" title="Heading 1"
aria-label="Heading 1">H1</button>
<button class="toolbar-btn toolbar-btn-text" id="toolbar-h2" title="Heading 2"
aria-label="Heading 2">H2</button>
<button class="toolbar-btn toolbar-btn-text" id="toolbar-h3" title="Heading 3"
aria-label="Heading 3">H3</button>
</div>
<span class="toolbar-divider"></span>
<!-- Insert -->
<div class="toolbar-group">
<button class="toolbar-btn" id="toolbar-link" title="Insert Link (Ctrl+K)" aria-label="Insert Link">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
<path
d="M4.715 6.542L3.343 7.914a3 3 0 104.243 4.243l1.828-1.829A3 3 0 008.586 5.5L8 6.086a1.001 1.001 0 00-.154.199 2 2 0 01.861 3.337L6.88 11.45a2 2 0 11-2.83-2.83l.793-.792a4.018 4.018 0 01-.128-1.287z" />
<path
d="M6.586 4.672A3 3 0 007.414 9.5l.775-.776a2 2 0 01-.896-3.346L9.12 3.55a2 2 0 112.83 2.83l-.793.792c.112.42.155.855.128 1.287l1.372-1.372a3 3 0 10-4.243-4.243L6.586 4.672z" />
</svg>
</button>
<button class="toolbar-btn" id="toolbar-url" title="Format URL (auto-detect)" aria-label="Format URL">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
<path
d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm7.5-6.923c-.67.204-1.335.82-1.887 1.855A7.97 7.97 0 0 0 5.145 4H7.5V1.077zM4.09 4a9.267 9.267 0 0 1 .64-1.539 6.7 6.7 0 0 1 .597-.933A7.025 7.025 0 0 0 2.255 4H4.09zm-.582 3.5c.03-.877.138-1.718.312-2.5H1.674a6.958 6.958 0 0 0-.656 2.5h2.49zM4.847 5a12.5 12.5 0 0 0-.338 2.5H7.5V5H4.847zM8.5 5v2.5h2.99a12.495 12.495 0 0 0-.337-2.5H8.5zM4.51 8.5a12.5 12.5 0 0 0 .337 2.5H7.5V8.5H4.51zm3.99 0V11h2.653c.187-.765.306-1.608.338-2.5H8.5zm-4.68 3.5c.138.386.295.744.468 1.068.552 1.035 1.218 1.65 1.887 1.855V12H5.145zm.182 2.472a6.696 6.696 0 0 1-.597-.933A9.268 9.268 0 0 1 4.09 12H2.255a7.024 7.024 0 0 0 3.072 2.472zM3.82 11a13.652 13.652 0 0 1-.312-2.5h-2.49c.062.89.291 1.733.656 2.5H3.82zm6.853 3.472A7.024 7.024 0 0 0 13.745 12H11.91a9.27 9.27 0 0 1-.64 1.539 6.688 6.688 0 0 1-.597.933zM8.5 12v2.923c.67-.204 1.335-.82 1.887-1.855.173-.324.33-.682.468-1.068H8.5zm3.68-1h2.146c.365-.767.594-1.61.656-2.5h-2.49a13.65 13.65 0 0 1-.312 2.5z" />
</svg>
</button>
<button class="toolbar-btn" id="toolbar-image" title="Insert Image" aria-label="Insert Image">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
<path d="M6.002 5.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0z" />
<path
d="M2.002 1a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V3a2 2 0 00-2-2h-12zm12 1a1 1 0 011 1v6.5l-3.777-1.947a.5.5 0 00-.577.093l-3.71 3.71-2.66-1.772a.5.5 0 00-.63.062L1.002 12V3a1 1 0 011-1h12z" />
</svg>
</button>
<button class="toolbar-btn" id="toolbar-table" title="Insert Table" aria-label="Insert Table">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
<path
d="M0 2a2 2 0 012-2h12a2 2 0 012 2v12a2 2 0 01-2 2H2a2 2 0 01-2-2V2zm15 2h-4v3h4V4zm0 4h-4v3h4V8zm0 4h-4v3h3a1 1 0 001-1v-2zm-5 3v-3H6v3h4zm-5 0v-3H1v2a1 1 0 001 1h3zm-4-4h4V8H1v3zm0-4h4V4H1v3zm5-3v3h4V4H6zm4 4H6v3h4V8z" />
</svg>
</button>
</div>
<span class="toolbar-divider"></span>
<!-- Code -->
<div class="toolbar-group">
<button class="toolbar-btn" id="toolbar-code" title="Code Block" aria-label="Code Block">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
<path
d="M5.854 4.854a.5.5 0 10-.708-.708l-3.5 3.5a.5.5 0 000 .708l3.5 3.5a.5.5 0 00.708-.708L2.707 8l3.147-3.146zm4.292 0a.5.5 0 01.708-.708l3.5 3.5a.5.5 0 010 .708l-3.5 3.5a.5.5 0 01-.708-.708L13.293 8l-3.147-3.146z" />
</svg>
</button>
<button class="toolbar-btn toolbar-btn-text" id="toolbar-inline-code" title="Inline Code"
aria-label="Inline Code">`</button>
</div>
<span class="toolbar-divider"></span>
<!-- Lists -->
<div class="toolbar-group">
<button class="toolbar-btn" id="toolbar-ul" title="Bullet List" aria-label="Bullet List">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
<path fill-rule="evenodd"
d="M5 11.5a.5.5 0 01.5-.5h9a.5.5 0 010 1h-9a.5.5 0 01-.5-.5zm0-4a.5.5 0 01.5-.5h9a.5.5 0 010 1h-9a.5.5 0 01-.5-.5zm0-4a.5.5 0 01.5-.5h9a.5.5 0 010 1h-9a.5.5 0 01-.5-.5zm-3 1a1 1 0 100-2 1 1 0 000 2zm0 4a1 1 0 100-2 1 1 0 000 2zm0 4a1 1 0 100-2 1 1 0 000 2z" />
</svg>
</button>
<button class="toolbar-btn" id="toolbar-ol" title="Numbered List" aria-label="Numbered List">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
<path fill-rule="evenodd"
d="M5 11.5a.5.5 0 01.5-.5h9a.5.5 0 010 1h-9a.5.5 0 01-.5-.5zm0-4a.5.5 0 01.5-.5h9a.5.5 0 010 1h-9a.5.5 0 01-.5-.5zm0-4a.5.5 0 01.5-.5h9a.5.5 0 010 1h-9a.5.5 0 01-.5-.5z" />
<path
d="M1.713 11.865v-.474H2c.217 0 .363-.137.363-.317 0-.185-.158-.31-.361-.31-.223 0-.367.152-.373.31h-.59c.016-.467.373-.787.986-.787.588-.002.954.291.957.703a.595.595 0 01-.492.594v.033a.615.615 0 01.569.631c.003.533-.502.8-1.051.8-.656 0-1-.37-1.008-.794h.582c.008.178.186.306.422.309.254 0 .424-.145.422-.35-.002-.195-.155-.348-.414-.348h-.3zm-.004-4.699h-.604v-.035c0-.408.295-.844.958-.844.583 0 .96.326.96.756 0 .389-.257.617-.476.848l-.537.572v.03h1.054V9H1.143v-.395l.957-.99c.138-.142.293-.304.293-.508 0-.18-.147-.32-.342-.32a.33.33 0 00-.342.338v.041zM2.564 5h-.635V2.924h-.031l-.598.42v-.567l.629-.443h.635V5z" />
</svg>
</button>
<button class="toolbar-btn" id="toolbar-task" title="Task List" aria-label="Task List">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
<path
d="M14 1a1 1 0 011 1v12a1 1 0 01-1 1H2a1 1 0 01-1-1V2a1 1 0 011-1h12zM2 0a2 2 0 00-2 2v12a2 2 0 002 2h12a2 2 0 002-2V2a2 2 0 00-2-2H2z" />
<path
d="M10.97 4.97a.75.75 0 011.071 1.05l-3.992 4.99a.75.75 0 01-1.08.02L4.324 8.384a.75.75 0 111.06-1.06l2.094 2.093 3.473-4.425a.235.235 0 01.02-.022z" />
</svg>
</button>
</div>
<span class="toolbar-divider"></span>
<!-- Block Elements -->
<div class="toolbar-group toolbar-block-group">
<button class="toolbar-btn" id="toolbar-quote" title="Blockquote" aria-label="Blockquote">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
<path
d="M12 12a1 1 0 001-1V8.558a1 1 0 00-1-1h-1.388c0-.351.021-.703.062-1.054.062-.372.166-.703.31-.992.145-.29.331-.517.559-.683.227-.186.516-.279.868-.279V3c-.579 0-1.085.124-1.52.372a3.322 3.322 0 00-1.085.992 4.92 4.92 0 00-.62 1.458A7.712 7.712 0 009 7.558V11a1 1 0 001 1h2zm-6 0a1 1 0 001-1V8.558a1 1 0 00-1-1H4.612c0-.351.021-.703.062-1.054.062-.372.166-.703.31-.992.145-.29.331-.517.559-.683.227-.186.516-.279.868-.279V3c-.579 0-1.085.124-1.52.372a3.322 3.322 0 00-1.085.992 4.92 4.92 0 00-.62 1.458A7.712 7.712 0 003 7.558V11a1 1 0 001 1h2z" />
</svg>
</button>
<button class="toolbar-btn" id="toolbar-hr" title="Horizontal Rule" aria-label="Horizontal Rule">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
<path d="M0 8a.5.5 0 01.5-.5h15a.5.5 0 010 1H.5A.5.5 0 010 8z" />
</svg>
</button>
</div>
<!-- Spacer -->
<div class="toolbar-spacer" style="flex: 1;"></div>
<!-- Tools -->
<div class="toolbar-group toolbar-tools-group">
<!-- Emoji -->
<button class="toolbar-btn" id="toolbar-emoji" title="Insert Emoji" aria-label="Insert Emoji">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"></circle>
<path d="M8 14s1.5 2 4 2 4-2 4-2"></path>
<line x1="9" y1="9" x2="9.01" y2="9"></line>
<line x1="15" y1="9" x2="15.01" y2="9"></line>
</svg>
</button>
<!-- AI Writer -->
<button class="toolbar-btn" id="ai-writer-button" title="AI Writing Assistant (Ctrl+Shift+A)" aria-label="AI Writing Assistant">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon>
</svg>
</button>
<!-- Table of Contents -->
<button class="toolbar-btn" id="toc-button" title="Table of Contents" aria-label="Toggle Outline">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<line x1="8" y1="6" x2="21" y2="6"></line>
<line x1="8" y1="12" x2="21" y2="12"></line>
<line x1="8" y1="18" x2="21" y2="18"></line>
<line x1="3" y1="6" x2="3.01" y2="6"></line>
<line x1="3" y1="12" x2="3.01" y2="12"></line>
<line x1="3" y1="18" x2="3.01" y2="18"></line>
</svg>
</button>
<!-- Scroll Sync -->
<button class="toolbar-btn" id="scroll-sync-button" title="Scroll Sync" aria-label="Toggle Scroll Sync">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<polyline points="17 1 21 5 17 9"></polyline>
<path d="M3 11V9a4 4 0 0 1 4-4h14"></path>
<polyline points="7 23 3 19 7 15"></polyline>
<path d="M21 13v2a4 4 0 0 1-4 4H3"></path>
</svg>
</button>
<!-- Spell Check / Lint -->
<button class="toolbar-btn" id="lint-button" title="Check Spelling" aria-label="Lint Document">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<polyline points="20 6 9 17 4 12"></polyline>
</svg>
</button>
<!-- Statistics -->
<button class="toolbar-btn" id="stats-button" title="Statistics" aria-label="Statistics">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<line x1="18" y1="20" x2="18" y2="10"></line>
<line x1="12" y1="20" x2="12" y2="4"></line>
<line x1="6" y1="20" x2="6" y2="14"></line>
</svg>
</button>
</div>
<span class="toolbar-divider"></span>
<!-- Mode Tools -->
<div class="toolbar-group toolbar-modes-group">
<!-- Focus Mode -->
<button class="toolbar-btn" id="focus-button" title="Focus Mode" aria-label="Focus Mode">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<path d="M5 3h4M3 5v4M19 3h-4M21 5v4M5 21h4M3 19v-4M19 21h-4M21 19v-4"></path>
</svg>
</button>
<!-- Typewriter Mode -->
<button class="toolbar-btn" id="typewriter-button" title="Typewriter Mode" aria-label="Typewriter Mode">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<line x1="4" y1="12" x2="20" y2="12"></line>
</svg>
</button>
<!-- Fullscreen -->
<button class="toolbar-btn" id="fullscreen-button" title="Fullscreen" aria-label="Fullscreen">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<polyline points="15 3 21 3 21 9"></polyline>
<polyline points="9 21 3 21 3 15"></polyline>
<line x1="21" y1="3" x2="14" y2="10"></line>
<line x1="3" y1="21" x2="10" y2="14"></line>
</svg>
</button>
</div>
<span class="toolbar-divider"></span>
<!-- Templates & Snippets -->
<div class="toolbar-group toolbar-extras-group">
<!-- Templates -->
<button class="toolbar-btn" id="templates-button" title="Templates" aria-label="Templates">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path>
<polyline points="14 2 14 8 20 8"></polyline>
<line x1="16" y1="13" x2="8" y2="13"></line>
<line x1="16" y1="17" x2="8" y2="17"></line>
<polyline points="10 9 9 9 8 9"></polyline>
</svg>
</button>
<!-- Writing Goals -->
<button class="toolbar-btn" id="goals-button" title="Writing Goals" aria-label="Writing Goals">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"></circle>
<polyline points="12 6 12 12 16 14"></polyline>
</svg>
</button>
</div>
<!-- Mobile Toolbar Overflow Button -->
<button class="toolbar-overflow-btn" id="toolbar-overflow-btn" title="More tools"
aria-label="More formatting tools">
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
<circle cx="12" cy="5" r="2"></circle>
<circle cx="12" cy="12" r="2"></circle>
<circle cx="12" cy="19" r="2"></circle>
</svg>
</button>
<!-- Mobile Toolbar Overflow Sheet -->
<div class="toolbar-overflow-sheet" id="toolbar-overflow-sheet">
<div class="toolbar-overflow-grid">
<button class="toolbar-overflow-item" data-action="strikethrough" title="Strikethrough">
<svg width="18" height="18" viewBox="0 0 16 16" fill="currentColor">
<path
d="M6.333 5.686c0 .31.083.581.27.814H5.166a2.776 2.776 0 01-.099-.76c0-1.627 1.436-2.768 3.48-2.768 1.969 0 3.39 1.175 3.445 2.85h-1.23c-.11-1.08-.964-1.743-2.25-1.743-1.23 0-2.18.602-2.18 1.607zm2.194 7.478c-2.153 0-3.589-1.107-3.705-2.81h1.23c.144 1.06 1.129 1.703 2.544 1.703 1.34 0 2.31-.705 2.31-1.675 0-.827-.547-1.374-1.914-1.675L8.046 8.5H1v-1h14v1h-3.504c.468.437.675.994.675 1.697 0 1.826-1.436 2.967-3.644 2.967z" />
</svg>
<span>Strikethrough</span>
</button>
<button class="toolbar-overflow-item" data-action="table" title="Table">
<svg width="18" height="18" viewBox="0 0 16 16" fill="currentColor">
<path
d="M0 2a2 2 0 012-2h12a2 2 0 012 2v12a2 2 0 01-2 2H2a2 2 0 01-2-2V2zm15 2h-4v3h4V4zm0 4h-4v3h4V8zm0 4h-4v3h3a1 1 0 001-1v-2zm-5 3v-3H6v3h4zm-5 0v-3H1v2a1 1 0 001 1h3zm-4-4h4V8H1v3zm0-4h4V4H1v3zm5-3v3h4V4H6zm4 4H6v3h4V8z" />
</svg>
<span>Table</span>
</button>
<button class="toolbar-overflow-item" data-action="hr" title="Horizontal Rule">
<svg width="18" height="18" viewBox="0 0 16 16" fill="currentColor">
<path d="M0 8a.5.5 0 01.5-.5h15a.5.5 0 010 1H.5A.5.5 0 010 8z" />
</svg>
<span>Divider</span>
</button>
<button class="toolbar-overflow-item" data-action="quote" title="Blockquote">
<svg width="18" height="18" viewBox="0 0 16 16" fill="currentColor">
<path
d="M12 12a1 1 0 001-1V8.558a1 1 0 00-1-1h-1.388c0-.351.021-.703.062-1.054.062-.372.166-.703.31-.992.145-.29.331-.517.559-.683.227-.186.516-.279.868-.279V3c-.579 0-1.085.124-1.52.372a3.322 3.322 0 00-1.085.992 4.92 4.92 0 00-.62 1.458A7.712 7.712 0 009 7.558V11a1 1 0 001 1h2zm-6 0a1 1 0 001-1V8.558a1 1 0 00-1-1H4.612c0-.351.021-.703.062-1.054.062-.372.166-.703.31-.992.145-.29.331-.517.559-.683.227-.186.516-.279.868-.279V3c-.579 0-1.085.124-1.52.372a3.322 3.322 0 00-1.085.992 4.92 4.92 0 00-.62 1.458A7.712 7.712 0 003 7.558V11a1 1 0 001 1h2z" />
</svg>
<span>Blockquote</span>
</button>
<button class="toolbar-overflow-item" data-action="task" title="Task List">
<svg width="18" height="18" viewBox="0 0 16 16" fill="currentColor">
<path
d="M14 1a1 1 0 011 1v12a1 1 0 01-1 1H2a1 1 0 01-1-1V2a1 1 0 011-1h12zM2 0a2 2 0 00-2 2v12a2 2 0 002 2h12a2 2 0 002-2V2a2 2 0 00-2-2H2z" />
<path
d="M10.97 4.97a.75.75 0 011.071 1.05l-3.992 4.99a.75.75 0 01-1.08.02L4.324 8.384a.75.75 0 111.06-1.06l2.094 2.093 3.473-4.425a.235.235 0 01.02-.022z" />
</svg>
<span>Task List</span>
</button>
<button class="toolbar-overflow-item" data-action="ol" title="Numbered List">
<svg width="18" height="18" viewBox="0 0 16 16" fill="currentColor">
<path fill-rule="evenodd"
d="M5 11.5a.5.5 0 01.5-.5h9a.5.5 0 010 1h-9a.5.5 0 01-.5-.5zm0-4a.5.5 0 01.5-.5h9a.5.5 0 010 1h-9a.5.5 0 01-.5-.5zm0-4a.5.5 0 01.5-.5h9a.5.5 0 010 1h-9a.5.5 0 01-.5-.5z" />
</svg>
<span>Ordered List</span>
</button>
<button class="toolbar-overflow-item" data-action="emoji" title="Emoji">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"></circle>
<path d="M8 14s1.5 2 4 2 4-2 4-2"></path>
<line x1="9" y1="9" x2="9.01" y2="9"></line>
<line x1="15" y1="9" x2="15.01" y2="9"></line>
</svg>
<span>Emoji</span>
</button>
<button class="toolbar-overflow-item" data-action="codeblock" title="Code Block">
<svg width="18" height="18" viewBox="0 0 16 16" fill="currentColor">
<path
d="M5.854 4.854a.5.5 0 10-.708-.708l-3.5 3.5a.5.5 0 000 .708l3.5 3.5a.5.5 0 00.708-.708L2.707 8l3.147-3.146zm4.292 0a.5.5 0 01.708-.708l3.5 3.5a.5.5 0 010 .708l-3.5 3.5a.5.5 0 01-.708-.708L13.293 8l-3.147-3.146z" />
</svg>
<span>Code Block</span>
</button>
</div>
</div>
</div>
<!-- ==================== MAIN CONTAINER ==================== -->
<main class="main-container" id="container">
<!-- Document Outline (Left Sidebar) -->
<aside class="doc-outline" id="doc-outline">
<div class="outline-header">
<span class="outline-title">
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor">
<path
d="M2 2.5a.5.5 0 01.5-.5h11a.5.5 0 010 1h-11a.5.5 0 01-.5-.5zm2 2a.5.5 0 01.5-.5h9a.5.5 0 010 1h-9a.5.5 0 01-.5-.5zm0 2a.5.5 0 01.5-.5h6a.5.5 0 010 1h-6a.5.5 0 01-.5-.5zm0 2a.5.5 0 01.5-.5h9a.5.5 0 010 1h-9a.5.5 0 01-.5-.5z" />
</svg>
Table of Contents
</span>
<button class="outline-close" id="outline-close" title="Close Outline" aria-label="Close Outline">
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor">
<path
d="M4.646 4.646a.5.5 0 01.708 0L8 7.293l2.646-2.647a.5.5 0 01.708.708L8.707 8l2.647 2.646a.5.5 0 01-.708.708L8 8.707l-2.646 2.647a.5.5 0 01-.708-.708L7.293 8 4.646 5.354a.5.5 0 010-.708z" />
</svg>
</button>
</div>
<div class="outline-scroll-indicator" id="outline-scroll-indicator">
<div class="scroll-progress"></div>
</div>
<nav class="outline-content" id="outline-content">
<div class="outline-empty" id="outline-empty">
<svg width="32" height="32" viewBox="0 0 16 16" fill="currentColor" opacity="0.3">
<path
d="M14 1a1 1 0 011 1v12a1 1 0 01-1 1H2a1 1 0 01-1-1V2a1 1 0 011-1h12zM2 0a2 2 0 00-2 2v12a2 2 0 002 2h12a2 2 0 002-2V2a2 2 0 00-2-2H2z" />
<path
d="M3 3.5a.5.5 0 01.5-.5h9a.5.5 0 010 1h-9a.5.5 0 01-.5-.5zM3 6a.5.5 0 01.5-.5h5a.5.5 0 010 1h-5A.5.5 0 013 6z" />
</svg>
<p>No headings found</p>
<small>Add headings to your document to see the outline</small>
</div>
<ul class="outline-list" id="outline-list">
<!-- Generated by JS -->
</ul>
</nav>
</aside>
<!-- Editor Pane -->
<section class="editor-pane" id="edit">
<div class="editor-wrapper" id="editor-wrapper">
<div id="editor"></div>
</div>
<!-- AI Writer Panel -->
<div class="ai-writer-panel" id="ai-writer-panel" style="display:none;">
<!-- Rendered by AI Writer JS -->
</div>
</section>
<!-- Split Divider -->
<div class="split-divider" id="split-divider"></div>
<!-- Preview Pane -->
<section class="preview-pane" id="preview">
<div class="preview-wrapper" id="preview-wrapper">
<article class="preview-content markdown-body" id="output">
<!-- Rendered Markdown -->
</article>
</div>
<!-- TOC Sidebar (Right) -->
<aside class="toc-sidebar" id="toc-sidebar">
<div class="toc-header">
<div class="toc-section-title">ON THIS PAGE</div>
<button class="toc-close-btn" id="toc-close-btn" title="Hide table of contents">
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor">
<path
d="M4.646 4.646a.5.5 0 01.708 0L8 7.293l2.646-2.647a.5.5 0 01.708.708L8.707 8l2.647 2.646a.5.5 0 01-.708.708L8 8.707l-2.646 2.647a.5.5 0 01-.708-.708L7.293 8 4.646 5.354a.5.5 0 010-.708z" />
</svg>
</button>
</div>
<nav id="toc-content">
<ul class="toc-list" id="toc-list">
<!-- Generated by JS -->
</ul>
</nav>
</aside>
</section>
<!-- Floating Edit Button (visible in preview mode) -->
<button class="floating-edit-btn" id="floating-edit-btn" title="Switch to Edit mode">
<svg width="18" height="18" viewBox="0 0 16 16" fill="currentColor">
<path
d="M12.854.146a.5.5 0 00-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 000-.708l-3-3zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 01.5.5v.5h.5a.5.5 0 01.5.5v.5h.5a.5.5 0 01.5.5v.5h.5a.5.5 0 01.5.5v.207l6.5-6.5zm-7.468 7.468A.5.5 0 016 13.5V13h-.5a.5.5 0 01-.5-.5V12h-.5a.5.5 0 01-.5-.5V11h-.5a.5.5 0 01-.5-.5V10h-.5a.499.499 0 01-.175-.032l-.179.178a.5.5 0 00-.11.168l-2 5a.5.5 0 00.65.65l5-2a.5.5 0 00.168-.11l.178-.178z" />
</svg>
<span>Edit</span>
</button>
<!-- Floating TOC Button (mobile only - visible in preview mode) -->
<button class="floating-toc-btn" id="floating-toc-btn" title="Table of Contents">
<svg width="18" height="18" viewBox="0 0 16 16" fill="currentColor">
<path
d="M2 2.5a.5.5 0 00-.5.5v1a.5.5 0 00.5.5h1a.5.5 0 00.5-.5V3a.5.5 0 00-.5-.5H2zM2 6.5a.5.5 0 00-.5.5v1a.5.5 0 00.5.5h1a.5.5 0 00.5-.5V7a.5.5 0 00-.5-.5H2zM1.5 11a.5.5 0 01.5-.5h1a.5.5 0 01.5.5v1a.5.5 0 01-.5.5H2a.5.5 0 01-.5-.5v-1zM5 3a.5.5 0 000 1h9a.5.5 0 000-1H5zM5 7a.5.5 0 000 1h9a.5.5 0 000-1H5zM5 11a.5.5 0 000 1h9a.5.5 0 000-1H5z" />
</svg>
</button>
<!-- Mobile TOC Overlay -->
<div class="mobile-toc-overlay" id="mobile-toc-overlay"></div>
</main>
<!-- ==================== STATUS BAR ==================== -->
<footer class="premium-status-bar" role="contentinfo">
<div class="status-item" id="word-count">
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor">
<path
d="M2.5 3a.5.5 0 000 1h11a.5.5 0 000-1h-11zm0 3a.5.5 0 000 1h11a.5.5 0 000-1h-11zm0 3a.5.5 0 000 1h11a.5.5 0 000-1h-11zm0 3a.5.5 0 000 1h6a.5.5 0 000-1h-6z" />
</svg>
<span>0 words</span>
</div>
<span id="word-count-header" class="hidden">0 words</span>
<div class="status-item" id="char-count">
<span>0 chars</span>
</div>
<span id="char-count-header" class="hidden">0 chars</span>
<div class="status-divider"></div>
<div class="status-item" id="reading-time">
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor">
<path d="M8 3.5a.5.5 0 00-1 0V9a.5.5 0 00.252.434l3.5 2a.5.5 0 00.496-.868L8 8.71V3.5z" />
<path d="M8 16A8 8 0 108 0a8 8 0 000 16zm7-8A7 7 0 111 8a7 7 0 0114 0z" />
</svg>
<span>0 min read</span>
</div>
<span id="reading-time-header" class="hidden">0 min read</span>
<div class="status-spacer"></div>
<button class="status-item status-btn" id="word-wrap-toggle" title="Toggle Word Wrap">
<span>Wrap: On</span>
</button>
<div class="status-divider"></div>
<div class="status-item" id="cursor-position">
<span>Ln 1, Col 1</span>
</div>
<div class="status-divider"></div>
<div class="status-saved" id="save-status">
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor">
<path
d="M13.854 3.646a.5.5 0 010 .708l-7 7a.5.5 0 01-.708 0l-3.5-3.5a.5.5 0 11.708-.708L6.5 10.293l6.646-6.647a.5.5 0 01.708 0z" />
</svg>
<span>All changes saved</span>
</div>
<div class="status-divider"></div>
<div class="status-item">
<span>UTF-8</span>
</div>
<div class="status-item">
<span>Markdown</span>
</div>
<!-- Mobile Menu Toggle -->
<button class="mobile-menu-toggle" id="mobile-menu-toggle" aria-label="Menu">
<svg width="20" height="20" viewBox="0 0 16 16" fill="currentColor">
<path fill-rule="evenodd"
d="M2.5 12a.5.5 0 01.5-.5h10a.5.5 0 010 1H3a.5.5 0 01-.5-.5zm0-4a.5.5 0 01.5-.5h10a.5.5 0 010 1H3a.5.5 0 01-.5-.5zm0-4a.5.5 0 01.5-.5h10a.5.5 0 010 1H3a.5.5 0 01-.5-.5z" />
</svg>
</button>
</footer>
<!-- ==================== HIDDEN INPUTS ==================== -->
<input type="file" id="file-input" accept=".md,.markdown,.txt" style="display: none;">
<input type="file" id="image-input" accept="image/*" style="display: none;">
<!-- Search Input (Hidden by default, toggled by search button) -->
<div class="search-overlay hidden" id="search-overlay">
<div class="search-container">
<input type="text" id="search-input" class="search-input" placeholder="Search in document...">
<span class="search-match-count" id="search-match-count"></span>
<button class="search-close" id="search-close">×</button>
</div>
</div>
<!-- Autosave Indicator -->
<div class="autosave-indicator hidden" id="autosave-indicator">
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor">
<path
d="M13.854 3.646a.5.5 0 010 .708l-7 7a.5.5 0 01-.708 0l-3.5-3.5a.5.5 0 11.708-.708L6.5 10.293l6.646-6.647a.5.5 0 01.708 0z" />
</svg>
<span>Saved</span>
</div>
<!-- ==================== TOAST CONTAINER ==================== -->
<div class="toast-container" id="toast-container"></div>
<!-- ==================== MODALS ==================== -->
<!-- Premium Settings Modal -->
<div class="settings-modal-overlay" id="settings-modal-overlay"></div>
<div class="settings-modal" id="settings-modal">
<!-- Settings Sidebar -->
<div class="settings-sidebar">
<div class="settings-sidebar-header">
<div class="settings-app-icon"></div>
<div class="settings-app-info">
<span class="settings-app-title">Settings</span>
<span class="settings-app-subtitle">Markdown Pro</span>
</div>
</div>
<nav class="settings-nav">
<button class="settings-nav-item active" data-tab="general">
<span class="material-symbols-outlined">settings</span>
<span>General</span>
</button>
<button class="settings-nav-item" data-tab="editor">
<span class="material-symbols-outlined">edit_note</span>
<span>Editor</span>
</button>
<button class="settings-nav-item" data-tab="preview">
<span class="material-symbols-outlined">visibility</span>
<span>Preview</span>
</button>
<button class="settings-nav-item" data-tab="themes">
<span class="material-symbols-outlined">palette</span>
<span>Themes</span>
</button>
<button class="settings-nav-item" data-tab="keyboard">
<span class="material-symbols-outlined">keyboard</span>
<span>Keyboard</span>
</button>
<button class="settings-nav-item" data-tab="about">
<span class="material-symbols-outlined">info</span>
<span>About</span>
</button>
</nav>
</div>
<!-- Settings Content -->
<div class="settings-content">
<div class="settings-content-header">
<div class="settings-content-title">
<h2 id="settings-panel-title">General Settings</h2>
<p id="settings-panel-description">Configure your general preferences and application behavior.</p>
</div>
<button class="settings-close-btn" id="settings-close" aria-label="Close settings">
<span class="material-symbols-outlined">close</span>
</button>
</div>
<div class="settings-content-body custom-scrollbar">
<!-- General Tab -->
<div class="settings-tab-panel active" id="settings-tab-general">
<section class="settings-section">
<h3 class="settings-section-title">
<span class="material-symbols-outlined">dark_mode</span>
Appearance
</h3>
<div class="settings-group">
<label class="settings-toggle-item">
<div class="settings-toggle-info">
<span class="settings-toggle-label">Dark Mode</span>
<span class="settings-toggle-desc">Switch between light and dark interface</span>
</div>
<div class="settings-toggle">
<input type="checkbox" id="dark-mode-checkbox">
<span class="settings-toggle-slider"></span>
</div>
</label>
<label class="settings-toggle-item">
<div class="settings-toggle-info">
<span class="settings-toggle-label">Auto Save</span>
<span class="settings-toggle-desc">Automatically save your work</span>
</div>
<div class="settings-toggle">
<input type="checkbox" id="auto-save-checkbox" checked>
<span class="settings-toggle-slider"></span>
</div>
</label>
<label class="settings-toggle-item">
<div class="settings-toggle-info">
<span class="settings-toggle-label">Scroll Sync</span>
<span class="settings-toggle-desc">Synchronize editor and preview scroll</span>
</div>
<div class="settings-toggle">
<input type="checkbox" id="sync-scroll-checkbox" checked>
<span class="settings-toggle-slider"></span>
</div>
</label>
</div>
</section>
</div>
<!-- Editor Tab -->
<div class="settings-tab-panel" id="settings-tab-editor">
<section class="settings-section">
<h3 class="settings-section-title">
<span class="material-symbols-outlined">text_fields</span>
Typography
</h3>
<div class="settings-grid">
<div class="settings-field">
<label class="settings-field-label">Font Family</label>
<div class="settings-select-wrapper">
<select id="font-family-dropdown" class="settings-select">
<option value="JetBrains Mono" selected>JetBrains Mono</option>
<option value="Fira Code">Fira Code</option>
<option value="Consolas">Consolas</option>
<option value="Monaco">Monaco</option>
<option value="Source Code Pro">Source Code Pro</option>
</select>
<span class="material-symbols-outlined">expand_more</span>
</div>
</div>
<div class="settings-field">
<label class="settings-field-label">Font Size</label>
<div class="settings-select-wrapper">
<select id="font-size-dropdown" class="settings-select">
<option value="12">12px</option>
<option value="14" selected>14px</option>
<option value="16">16px</option>
<option value="18">18px</option>
<option value="20">20px</option>
</select>
<span class="material-symbols-outlined">expand_more</span>
</div>
</div>
<div class="settings-field">
<label class="settings-field-label">Line Height</label>
<div class="settings-select-wrapper">
<select id="line-height-dropdown" class="settings-select">
<option value="1.2">1.2 (Compact)</option>
<option value="1.4">1.4 (Standard)</option>
<option value="1.6" selected>1.6 (Relaxed)</option>
<option value="1.8">1.8 (Loose)</option>
</select>
<span class="material-symbols-outlined">expand_more</span>
</div>
</div>
<div class="settings-field">
<label class="settings-field-label">Tab Size</label>
<div class="settings-select-wrapper">
<select id="tab-size-dropdown" class="settings-select">
<option value="2" selected>2 Spaces</option>
<option value="4">4 Spaces</option>
<option value="8">8 Spaces</option>
</select>
<span class="material-symbols-outlined">expand_more</span>
</div>
</div>
</div>
</section>
<div class="settings-divider"></div>
<section class="settings-section">
<h3 class="settings-section-title">