fix(editor): add find/replace bar and tidy CodeMirror scrolling

This commit is contained in:
2026-11-06 09:00:35 +08:00
parent 715c8068f8
commit a58a94b05f
4 changed files with 237 additions and 14 deletions

View File

@@ -25,6 +25,18 @@ __MDP_PAGE_CSS__
<button id="find-next" title="Next" aria-label="Next"></button>
<button id="find-close" title="Close" aria-label="Close"></button>
</div>
<div class="findbar" id="edit-findbar" role="search" hidden>
<input id="edit-find-input" type="search" placeholder="__MDP_SEARCH_PLACEHOLDER__" aria-label="__MDP_SEARCH_PLACEHOLDER__">
<span id="edit-find-state"></span>
<button id="edit-find-prev" title="Previous" aria-label="Previous"></button>
<button id="edit-find-next" title="Next" aria-label="Next"></button>
<button id="edit-find-close" title="Close" aria-label="Close"></button>
<span class="edit-replace-group" id="edit-replace-group" hidden>
<input id="edit-replace-input" type="text" placeholder="Replace with" aria-label="Replace with">
<button id="edit-replace-one" class="edit-replace-btn" type="button">Replace</button>
<button id="edit-replace-all" class="edit-replace-btn" type="button">All</button>
</span>
</div>
<div id="app">
<div id="preview">__MDP_PREVIEW_HTML__</div>
<textarea id="editor" spellcheck="false">__MDP_RAW_MD_ESCAPED__</textarea>