feat: add monaco editor and align markdown toggle in tabs
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user