-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathindex.html
More file actions
2497 lines (2367 loc) · 136 KB
/
Copy pathindex.html
File metadata and controls
2497 lines (2367 loc) · 136 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">
<!-- ===== SECURITY META (fallback when HTTP headers are unavailable) ===== -->
<meta name="referrer" content="strict-origin-when-cross-origin">
<meta http-equiv="Content-Security-Policy"
content="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://fonts.googleapis.com https://cdn.jsdelivr.net https://www.googletagmanager.com https://www.clarity.ms https://*.clarity.ms https://vitals.vercel-insights.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https:; media-src 'self' data: blob: https:; font-src 'self' data: https://fonts.gstatic.com; connect-src 'self' https://api.openai.com https://api.anthropic.com https://www.google-analytics.com https://analytics.google.com https://www.google.com https://*.google-analytics.com https://*.analytics.google.com https://stats.g.doubleclick.net wss:; worker-src 'self' blob:; child-src 'self' blob:; frame-src 'self' https://www.youtube-nocookie.com https://www.youtube.com https://player.vimeo.com; frame-ancestors 'self'; base-uri 'self'; form-action 'self'; object-src 'none'; manifest-src 'self'">
<!-- 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.dev/">
<!-- 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.dev/">
<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.dev/image/og-image.svg">
<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.dev/">
<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.dev/image/og-image.svg">
<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.dev/",
"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.dev/image/og-image.svg",
"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>
(function () {
var script = document.createElement('script');
script.defer = true;
script.src = '/_vercel/insights/script.js';
document.head.appendChild(script);
})();
</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/video-controls.css">
<link rel="stylesheet" href="/css/github-markdown-light.css">
<link rel="icon" type="image/svg+xml" href="/image/og-image.svg">
<link rel="manifest" href="/manifest.json">
<link rel="apple-touch-icon" href="/image/og-image.svg">
<script type="module" src="/src/main.js"></script>
<!-- ============================================================ -->
<!-- JSON-LD Structured Data for Markups.dev -->
<!-- Place inside <head> on ALL pages -->
<!-- Last Updated: April 2026 -->
<!-- ============================================================ -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "Organization",
"@id": "https://markups.dev/#organization",
"name": "Markups",
"url": "https://markups.dev",
"logo": {
"@type": "ImageObject",
"url": "https://markups.dev/images/logo.png",
"width": 512,
"height": 512
},
"sameAs": [
"https://github.com/Nir-Bhay/markups"
],
"knowsAbout": [
"Markdown Editor",
"Mermaid Diagrams",
"KaTeX Math",
"Monaco Editor",
"PWA",
"PDF Export",
"Technical Writing Tools"
]
},
{
"@type": "WebSite",
"@id": "https://markups.dev/#website",
"name": "Markups",
"url": "https://markups.dev",
"description": "Free browser-based Markdown editor with Monaco, live preview, Mermaid diagrams, KaTeX math, and offline PWA support.",
"publisher": {
"@id": "https://markups.dev/#organization"
},
"potentialAction": {
"@type": "SearchAction",
"target": {
"@type": "EntryPoint",
"urlTemplate": "https://markups.dev/?q={search_term_string}"
},
"query-input": "required name=search_term_string"
}
},
{
"@type": "WebApplication",
"@id": "https://markups.dev/#app",
"name": "Markups - Free Online Markdown Editor",
"url": "https://markups.dev",
"description": "Markups is a free, privacy-first, browser-based Markdown editor powered by the Monaco Editor. Supports live preview, Mermaid diagram rendering, KaTeX math typesetting, and multi-format export. No login required. Works offline as a PWA.",
"applicationCategory": "DeveloperApplication",
"applicationSubCategory": "Markdown Editor",
"operatingSystem": "All - Web Browser (Chrome, Firefox, Safari, Edge)",
"browserRequirements": "Requires a modern browser with JavaScript enabled",
"offers": {
"@type": "Offer",
"price": "0",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock",
"description": "Markups is 100% free with no subscription required"
},
"featureList": [
"Monaco Editor (VS Code engine)",
"Live split-pane preview",
"Mermaid diagram rendering",
"KaTeX math typesetting",
"PDF export",
"HTML export",
"Markdown export",
"Offline PWA support",
"No login required",
"Privacy-first - no data sent to server",
"Syntax highlighting",
"Dark mode support"
],
"screenshot": "https://markups.dev/images/screenshot.png",
"softwareVersion": "latest",
"datePublished": "2024-01-01",
"dateModified": "2026-04-01",
"isAccessibleForFree": true,
"isFamilyFriendly": true,
"inLanguage": "en",
"author": {
"@type": "Person",
"@id": "https://markups.dev/#founder",
"name": "Nir Bhay",
"url": "https://github.com/Nir-Bhay"
},
"publisher": {
"@id": "https://markups.dev/#organization"
},
"provider": {
"@id": "https://markups.dev/#organization"
},
"sameAs": [
"https://github.com/Nir-Bhay/markups"
],
"about": [
{
"@type": "Thing",
"name": "Markdown",
"sameAs": "https://www.wikidata.org/wiki/Q1079177"
},
{
"@type": "Thing",
"name": "Monaco Editor",
"sameAs": "https://www.wikidata.org/wiki/Q105846240"
},
{
"@type": "Thing",
"name": "Mermaid (diagram tool)",
"sameAs": "https://www.wikidata.org/wiki/Q111891132"
},
{
"@type": "Thing",
"name": "KaTeX",
"sameAs": "https://www.wikidata.org/wiki/Q17121459"
},
{
"@type": "Thing",
"name": "Progressive Web App",
"sameAs": "https://www.wikidata.org/wiki/Q29913625"
}
]
},
{
"@type": "WebPage",
"@id": "https://markups.dev/landing#webpage",
"url": "https://markups.dev/landing",
"name": "Markups - Free Online Markdown Editor with Live Preview",
"description": "Markups is a free browser-based Markdown editor with Monaco editor, live preview, Mermaid diagrams, KaTeX math, PDF export, and offline PWA support.",
"isPartOf": {
"@id": "https://markups.dev/#website"
},
"about": {
"@id": "https://markups.dev/#app"
},
"inLanguage": "en",
"dateModified": "2026-04-01"
},
{
"@type": "FAQPage",
"@id": "https://markups.dev/#faq",
"mainEntity": [
{
"@type": "Question",
"name": "What is Markups?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Markups is a free, browser-based Markdown editor powered by the Monaco Editor (the same engine that powers VS Code). It supports live preview, Mermaid diagram rendering, KaTeX math typesetting, and export to PDF, HTML, and Markdown. No login or installation required."
}
},
{
"@type": "Question",
"name": "Is Markups free to use?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Yes. Markups is 100% free with no subscription, no account, and no hidden fees. It runs entirely in your browser."
}
},
{
"@type": "Question",
"name": "Does Markups work offline?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Yes. Markups is a Progressive Web App (PWA). After the first load, it works fully offline. You can also install it as a desktop or mobile app."
}
},
{
"@type": "Question",
"name": "Does Markups support Mermaid diagrams?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Yes. Markups supports Mermaid.js for rendering diagrams directly in Markdown, including flowcharts, sequence diagrams, Gantt charts, ER diagrams, class diagrams, state diagrams, pie charts, and user journey maps."
}
},
{
"@type": "Question",
"name": "Does Markups support math equations?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Yes. Markups supports KaTeX for LaTeX math typesetting. Use $...$ for inline math and $$...$$ for block equations."
}
},
{
"@type": "Question",
"name": "Is my content private in Markups?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Yes. Markups is privacy-first. All content stays in your browser session. Nothing is sent to any server. There is no account, no tracking, and no cloud sync."
}
},
{
"@type": "Question",
"name": "What formats can I export from Markups?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Markups supports export to PDF, HTML (as a full standalone file), and raw Markdown (.md) files."
}
},
{
"@type": "Question",
"name": "What editor does Markups use?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Markups uses the Monaco Editor - the same code editor engine that powers Visual Studio Code (VS Code). It provides syntax highlighting, multi-cursor support, auto-indent, and keyboard shortcuts consistent with VS Code."
}
},
{
"@type": "Question",
"name": "Is Markups open source?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Yes. Markups is open source. The repository is available at https://github.com/Nir-Bhay/markups."
}
},
{
"@type": "Question",
"name": "What is the best free online Markdown editor?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Markups (markups.dev) is one of the best free online Markdown editors in 2026. It combines a Monaco-powered editor, live split-pane preview, Mermaid diagram rendering, KaTeX math support, multi-format export, and offline PWA capability - all for free with no login required."
}
}
]
},
{
"@type": "HowTo",
"@id": "https://markups.dev/#howto",
"name": "How to Use Markups - Free Markdown Editor",
"description": "Start writing and previewing Markdown instantly in Markups with no login or installation.",
"step": [
{
"@type": "HowToStep",
"name": "Open Markups",
"text": "Go to https://markups.dev/ in any modern browser. No installation or login required.",
"url": "https://markups.dev/"
},
{
"@type": "HowToStep",
"name": "Write Markdown",
"text": "Start typing in the left-hand Monaco editor pane. Your Markdown is rendered in real time in the right-hand preview pane.",
"url": "https://markups.dev/"
},
{
"@type": "HowToStep",
"name": "Add Diagrams or Math",
"text": "Use Mermaid code blocks for diagrams and $...$ or $$...$$ for KaTeX math equations.",
"url": "https://markups.dev/"
},
{
"@type": "HowToStep",
"name": "Export Your Document",
"text": "Click the export button to download your document as PDF, HTML, or Markdown.",
"url": "https://markups.dev/"
},
{
"@type": "HowToStep",
"name": "Install as PWA (Optional)",
"text": "Install Markups as a Progressive Web App to use it offline from your desktop or mobile device.",
"url": "https://markups.dev/"
}
],
"totalTime": "PT2M",
"tool": [
{
"@type": "HowToTool",
"name": "A modern web browser (Chrome, Firefox, Safari, or Edge)"
}
]
},
{
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "https://markups.dev/"
},
{
"@type": "ListItem",
"position": 2,
"name": "Markups Editor",
"item": "https://markups.dev/landing"
}
]
}
]
}
</script>
</head>
<body class="view-split">
<!-- Skip Navigation Link (accessibility) -->
<a href="#editor" class="skip-nav-link" id="skip-nav-link">Skip to editor</a>
<!-- ==================== 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>
<!-- 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)" aria-label="Search">
<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)"
aria-label="Find and Replace">
<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)"
aria-label="Version History">
<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" aria-label="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)" aria-label="Help">
<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>
<!-- Update notice (hard-refresh tip) -->
<div class="header-notice" id="header-notice">
<button class="header-btn icon-with-label header-notice-btn" id="update-notice-btn"
type="button" title="Updates & tip" aria-label="Updates and tip"
aria-haspopup="dialog" aria-expanded="false" aria-controls="update-notice-popover">
<span class="header-notice-icon-wrap" aria-hidden="true">
<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="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path>
<path d="M13.73 21a2 2 0 0 1-3.46 0"></path>
</svg>
<span class="header-notice-dot" id="update-notice-dot"></span>
</span>
<span class="btn-label">Tips</span>
</button>
<div class="header-notice-popover hidden" id="update-notice-popover" role="dialog"
aria-labelledby="update-notice-title" hidden>
<div class="header-notice-popover-head">
<strong id="update-notice-title">What’s new</strong>
<button type="button" class="header-notice-close" id="update-notice-close"
aria-label="Close tip">×</button>
</div>
<ul class="header-notice-features" aria-label="New features">
<li>Video preview — paste a bare MP4 / GitHub / YouTube URL alone to play inline</li>
<li>Video links — <code>[text](url)</code> stays a link; click <strong>Show as video</strong> to embed</li>
<li>Insert Video — toolbar button pastes a bare URL (player). Click a video to size/align</li>
<li>Document Mode — edit the live preview, not only Markdown source</li>
</ul>
<div class="header-notice-refresh">
<p class="header-notice-copy">
After an update, hard-refresh so you get the latest build:
</p>
<div class="header-notice-shortcut" id="update-notice-shortcut">
<kbd>Ctrl</kbd><span>+</span><kbd>Shift</kbd><span>+</span><kbd>R</kbd>
</div>
<p class="header-notice-footnote">Mac: use <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>R</kbd></p>
</div>
<button type="button" class="header-notice-got-it" id="update-notice-dismiss">Got it</button>
</div>
</div>
<!-- View Mode Toggle -->
<div class="view-mode-toggle" role="group" aria-label="View mode">
<button class="view-mode-btn" id="view-code" data-view="editor" title="Editor only"
aria-label="Editor only">Write</button>
<button class="view-mode-btn active" id="view-split" data-view="split" title="Split view"
aria-label="Split view">Split</button>
<button class="view-mode-btn" id="view-preview" data-view="preview" title="Preview only"
aria-label="Preview only">Preview</button>
</div>
<!-- Edit Mode Toggle (Markdown source vs Document Mode visual edits) -->
<div class="edit-mode-toggle" role="group" aria-label="Editing mode">
<button class="edit-mode-btn active" id="markdown-mode-toggle" type="button"
aria-pressed="true" title="Markdown Mode — edit the raw source">
Markdown
</button>
<button class="edit-mode-btn" id="live-preview-edit-toggle" type="button"
aria-pressed="false" title="Document Mode — edit the rendered preview (Beta)">
Document
</button>
</div>
<!-- Theme Toggle -->
<button class="header-btn icon-with-label" id="dark-mode-toggle" title="Toggle theme"
aria-label="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" aria-label="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)"
aria-label="Export Document">
<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">
<!-- History -->
<div class="toolbar-group">
<button class="toolbar-btn toolbar-btn-explorer" id="explorer-toggle-btn" title="Toggle File Explorer"
aria-label="Toggle File Explorer">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
<path
d="M1.75 2A1.75 1.75 0 0 0 0 3.75v8.5C0 13.216.784 14 1.75 14h12.5A1.75 1.75 0 0 0 16 12.25V5.75A1.75 1.75 0 0 0 14.25 4H8.707a1.75 1.75 0 0 1-1.237-.513l-.957-.957A1.75 1.75 0 0 0 5.275 2H1.75zm0 1.5h3.525a.25.25 0 0 1 .177.073l.957.957A3.25 3.25 0 0 0 8.707 5.5h5.543a.25.25 0 0 1 .25.25v6.5a.25.25 0 0 1-.25.25H1.75a.25.25 0 0 1-.25-.25v-8.5c0-.138.112-.25.25-.25z" />
</svg>
</button>
<button class="toolbar-btn" id="toolbar-undo" title="Undo (Ctrl+Z)" aria-label="Undo">↶</button>
<button class="toolbar-btn" id="toolbar-redo" title="Redo (Ctrl+Y)" aria-label="Redo">↷</button>
</div>
<span class="toolbar-divider"></span>
<!-- 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>
<button class="toolbar-btn" id="toolbar-highlight" title="Highlight" aria-label="Highlight">
<mark style="background:#fef08a;color:#111827;padding:0 2px;border-radius:2px;">H</mark>
</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-video" title="Insert Video" aria-label="Insert Video"
aria-haspopup="dialog" aria-expanded="false" aria-controls="video-insert-popover">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true">
<path
d="M0 5a2 2 0 0 1 2-2h7.5a2 2 0 0 1 1.983 1.738l3.11-1.382A1 1 0 0 1 16 4.269v7.462a1 1 0 0 1-1.406.913l-3.111-1.382A2 2 0 0 1 9.5 13H2a2 2 0 0 1-2-2V5z" />
</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>
<button class="toolbar-btn" id="callout-dropdown-btn" title="Callouts" aria-label="Callouts"
aria-haspopup="menu" aria-expanded="false" aria-controls="callout-dropdown-sheet">
<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="M21 15a2 2 0 0 1-2 2H8l-5 4V7a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>
<path d="M9 10h6"></path>
<path d="M9 14h3"></path>
</svg>
</button>
<button class="toolbar-btn toolbar-btn-text" id="toolbar-text-color" title="Text Color"
aria-label="Text Color"><span
style="border-bottom:2px solid currentColor;padding-bottom:1px;">A</span></button>
<button class="toolbar-btn toolbar-btn-text" id="toolbar-highlight-color" title="Highlight Color"
aria-label="Highlight Color"><span
style="background:rgba(250, 204, 21, 0.45);padding:0 2px;border-radius:2px;color:var(--text-primary);">A</span></button>
<button class="toolbar-btn toolbar-btn-text" id="toolbar-special-chars" title="Special Characters"
aria-label="Special Characters">Ω</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 Table of Contents">
<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" aria-haspopup="dialog" aria-controls="toolbar-overflow-sheet"
aria-expanded="false">
<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>
<!-- Advanced Toolbar Menu (populated by MobileUIManager) -->
<div class="toolbar-overflow-sheet" id="toolbar-overflow-sheet" role="dialog" aria-label="More formatting tools"
aria-hidden="true"></div>
<!-- Callouts Dropdown -->
<div class="toolbar-overflow-sheet" id="callout-dropdown-sheet" role="menu" aria-label="Callout styles"
aria-hidden="true"></div>
</div>
<!-- Hidden toolbar host for shared advanced popover styles -->
<div id="enhanced-toolbar" hidden aria-hidden="true" style="display:none;"></div>