...
This commit is contained in:
@@ -143,7 +143,7 @@ class MarkdownEditor {
|
||||
this.currentFile = null;
|
||||
this.filenameInput.value = '';
|
||||
this.filenameInput.focus();
|
||||
this.editor.setValue('');
|
||||
this.editor.setValue('# New File\n\nStart typing...\n');
|
||||
this.updatePreview();
|
||||
|
||||
if (window.showNotification) {
|
||||
@@ -192,7 +192,7 @@ class MarkdownEditor {
|
||||
*/
|
||||
updatePreview() {
|
||||
const markdown = this.editor.getValue();
|
||||
let html = this.marked.parse(markdown);
|
||||
let html = window.marked.parse(markdown);
|
||||
|
||||
// Process mermaid diagrams
|
||||
html = html.replace(/<pre><code class="language-mermaid">([\s\S]*?)<\/code><\/pre>/g, (match, code) => {
|
||||
|
||||
Reference in New Issue
Block a user