feat: use CodeMirror editor for HTML source view, hide save in preview mode
- HTML preview (iframe) no longer shows Edit/Save toolbar buttons - Clicking Source toggle opens CodeMirror editor with syntax highlighting - Save button appears only in source mode, using saveCodeFile() - Ctrl+S saving supported via CodeMirror keybinding
This commit is contained in:
@@ -388,6 +388,15 @@
|
||||
class="w-full h-full border-none bg-white"
|
||||
title="HTML Preview"
|
||||
/>
|
||||
{:else if isHtml && showRaw}
|
||||
<div class="h-full">
|
||||
<FileCodeEditor
|
||||
bind:this={fileCodeEditorRef}
|
||||
value={fileContent ?? ''}
|
||||
filePath={selectedFile}
|
||||
{onSave}
|
||||
/>
|
||||
</div>
|
||||
{:else if isMarkdown && !showRaw}
|
||||
<div bind:this={markdownEl} class="prose dark:prose-invert max-w-full text-sm p-3">
|
||||
{@html renderedHtml}
|
||||
|
||||
Reference in New Issue
Block a user