Skip to content

Commit b5fa206

Browse files
Merge pull request #150 from ThisIs-Developer/fix/undo-redo-clear-document
fix: implement robust undo/redo history and clear document action
2 parents fe19aa4 + e5034fb commit b5fa206

3 files changed

Lines changed: 355 additions & 10 deletions

File tree

index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ <h2 class="h5 m-0">Menu</h2>
307307
<div class="markdown-toolbar-group">
308308
<button type="button" class="markdown-tool-btn" data-md-action="undo" title="Undo" aria-label="Undo"><i class="bi bi-arrow-counterclockwise"></i></button>
309309
<button type="button" class="markdown-tool-btn" data-md-action="redo" title="Redo" aria-label="Redo"><i class="bi bi-arrow-clockwise"></i></button>
310-
<button type="button" class="markdown-tool-btn" data-md-action="clear-formatting" title="Clear Markdown formatting" aria-label="Clear Markdown formatting"><i class="bi bi-eraser"></i></button>
310+
<button type="button" class="markdown-tool-btn" data-md-action="clear-formatting" title="Clear document" aria-label="Clear document"><i class="bi bi-eraser"></i></button>
311311
</div>
312312
<div class="markdown-toolbar-group">
313313
<button type="button" class="markdown-tool-btn" data-md-action="bold" title="Bold" aria-label="Bold"><i class="bi bi-type-bold"></i></button>
@@ -373,15 +373,15 @@ <h2 class="h5 m-0">Menu</h2>
373373
<div id="clear-formatting-modal" class="reset-modal-overlay modal-overlay" role="dialog" aria-modal="true" aria-labelledby="clear-formatting-title" aria-hidden="true" style="display:none;">
374374
<div class="reset-modal-box reset-modal-box--wide modal-box">
375375
<div class="modal-header">
376-
<p id="clear-formatting-title" class="reset-modal-message">Clear Markdown formatting?</p>
377-
<button type="button" class="modal-close-btn" id="clear-formatting-close" aria-label="Close clear formatting dialog">
376+
<p id="clear-formatting-title" class="reset-modal-message">Clear active document?</p>
377+
<button type="button" class="modal-close-btn" id="clear-formatting-close" aria-label="Close clear document dialog">
378378
<i class="bi bi-x-lg"></i>
379379
</button>
380380
</div>
381-
<p class="modal-subtext">Only the Markdown formatting in this document content is cleared. The file itself is not deleted.</p>
381+
<p class="modal-subtext">Are you sure you want to clear the content of the active document? The document itself will not be deleted.</p>
382382
<div class="reset-modal-actions">
383383
<button class="reset-modal-btn reset-modal-cancel" id="clear-formatting-cancel">Cancel</button>
384-
<button class="reset-modal-btn reset-modal-confirm" id="clear-formatting-confirm">Clear Markdown</button>
384+
<button class="reset-modal-btn reset-modal-confirm" id="clear-formatting-confirm">Clear Document</button>
385385
</div>
386386
</div>
387387
</div>

0 commit comments

Comments
 (0)