feat: add monaco editor and align markdown toggle in tabs

This commit is contained in:
2026-02-23 09:22:26 +03:00
parent 75fbb53390
commit 3abcd9563b
5 changed files with 210 additions and 10 deletions

View File

@@ -266,6 +266,7 @@ class AppController {
#renderCurrentFile() {
const path = this.projectStore.selectedFilePath;
if (!path) {
this.view.setEditorLanguage("");
this.view.renderFile("");
this.view.renderMarkdown("");
this.view.setMarkdownToggleVisible(false);
@@ -277,6 +278,7 @@ class AppController {
const file = this.projectStore.getSelectedFile();
const content = this.draftByPath.get(path) ?? file?.content ?? "";
const isMarkdown = this.#isMarkdownPath(path);
this.view.setEditorLanguage(path);
if (isMarkdown) {
const mode = this.markdownModeByPath.get(path) || "preview";