File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ Add `markedit-api` to your (TypeScript) project's devDependencies:
1919``` json
2020{
2121 "devDependencies" : {
22- "markedit-api" : " https://github.com/MarkEdit-app/MarkEdit-api#v0.18 .0"
22+ "markedit-api" : " https://github.com/MarkEdit-app/MarkEdit-api#v0.19 .0"
2323 }
2424}
2525```
@@ -60,6 +60,8 @@ interface MarkEdit {
6060 listFiles(path : string ): Promise <string [] | undefined >;
6161 // Get the content of a file.
6262 getFileContent(path ? : string ): Promise <string | undefined >;
63+ // Get the data URI (base64 encoded) of a file.
64+ getFileDataURI(path ? : string ): Promise <string | undefined >;
6365 // Get the information of a file.
6466 getFileInfo(path ? : string ): Promise <FileInfo | undefined >;
6567 // Get the path of a standard directory.
Original file line number Diff line number Diff line change @@ -159,6 +159,13 @@ export interface MarkEdit {
159159 */
160160 getFileContent ( path ?: string ) : Promise < string | undefined > ;
161161
162+ /**
163+ * Get the data URI (base64 encoded) of a file.
164+ * @param path The file path. The current file is used as a fallback.
165+ * @returns The file data URI as a string, or undefined if failed.
166+ */
167+ getFileDataURI ( path ?: string ) : Promise < string | undefined > ;
168+
162169 /**
163170 * Get the information of a file.
164171 * @param path The file path. The current file is used as a fallback.
Original file line number Diff line number Diff line change 11{
22 "name" : " markedit-api" ,
3- "version" : " 0.18 .0" ,
3+ "version" : " 0.19 .0" ,
44 "description" : " Type definitions for the latest MakrEdit API." ,
55 "main" : " ./index.cjs" ,
66 "module" : " ./index.js" ,
You can’t perform that action at this time.
0 commit comments