Commit 2a3cee2
TextEdit menu audit + WYSIWYG viewer + UX polish
File menu additions (from TextEdit audit):
- Open Recent submenu wired to NSDocumentController.recentDocumentURLs
- Duplicate (Cmd+Opt+S) — in-memory copy of current document
- Rename… — moves file on disk, updates proxy icon
- Move To… — relocates file via save panel
- Revert to Saved — confirms, then reloads from disk
- Export as PDF… — renders preview HTML → PDFExporter via WKWebView
WYSIWYG viewer mode:
- Preview/viewer is now a directly editable contentEditable surface
- Click anywhere in the formatted document and start typing
- Paste and Match Style enforced automatically in JS: all pasted
content strips RTF/HTML formatting to plain text on arrival
- Viewer edits sync back to document.rawText (debounced 400ms)
- Switching viewer → edit mode extracts innerText before handoff
- PreviewNavigationDelegate merged into PreviewView.Coordinator;
standalone file removed
Paste and Match Style (Cmd+Opt+Shift+V):
- In edit mode: routes to NSTextView.pasteAsPlainText (native)
- In viewer mode: JS paste interceptor handles it automatically
UX:
- Default window width reduced to 660pt (≈60% of 1100)
- No untitled document created on first launch — shows welcome screen
- Tab bar hidden when only one document is open
- Tab bar hidden when sidebar is visible (mutual exclusion)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 214645b commit 2a3cee2
11 files changed
Lines changed: 395 additions & 77 deletions
File tree
- Markfops.xcodeproj
- Markfops
- App
- Commands
- FileIO
- Renderer
- State
- Views
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
139 | 138 | | |
140 | 139 | | |
141 | 140 | | |
| |||
212 | 211 | | |
213 | 212 | | |
214 | 213 | | |
| 214 | + | |
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
353 | | - | |
| 353 | + | |
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| |||
Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
25 | 44 | | |
26 | 45 | | |
27 | 46 | | |
| |||
35 | 54 | | |
36 | 55 | | |
37 | 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 | + | |
38 | 90 | | |
39 | 91 | | |
40 | 92 | | |
41 | 93 | | |
42 | 94 | | |
43 | 95 | | |
44 | 96 | | |
| 97 | + | |
45 | 98 | | |
46 | 99 | | |
47 | 100 | | |
| |||
76 | 129 | | |
77 | 130 | | |
78 | 131 | | |
| 132 | + | |
79 | 133 | | |
80 | 134 | | |
81 | 135 | | |
| |||
91 | 145 | | |
92 | 146 | | |
93 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
94 | 158 | | |
95 | 159 | | |
96 | 160 | | |
| |||
108 | 172 | | |
109 | 173 | | |
110 | 174 | | |
111 | | - | |
| 175 | + | |
112 | 176 | | |
113 | 177 | | |
114 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
This file was deleted.
0 commit comments