Przeglądaj źródła

enhance(apis): add setFileContent method for built-in file paths

charlie 2 tygodni temu
rodzic
commit
8d7aaa791e
1 zmienionych plików z 7 dodań i 0 usunięć
  1. 7 0
      libs/src/LSPlugin.ts

+ 7 - 0
libs/src/LSPlugin.ts

@@ -871,6 +871,13 @@ export interface IEditorProxy extends Record<string, any> {
     end: number
     text: string
   }>
+
+  /**
+   * For built-in files path `logseq/custom.js`, `logseq/custom.css`, `logseq/publish.js`, `logseq/publish.css` etc.
+   * @param path
+   * @param content
+   */
+  setFileContent: (path: string, content: string) => Promise<void>
 }
 
 /**