New
- ExcaliAI
- You can now add
ex-md-font-hand-drawn
orex-md-font-hand-drawn
to thecssclasses:
frontmatter property in embedded markdown nodes and their font face will match the respective Excalidraw fonts.
Fixed
- Adding a script for the very first time (when the script folder did not yet exist) did not show up in the tools panel. Required an Obsidian restart.
- Performance improvements
New and updated In Excalidraw Automate
- functions to make AI integration easier
/**
* Wrapper for createPNG() that returns a base64 encoded string
*/
async createPNGBase64(
templatePath?: string,
scale: number = 1,
exportSettings?: ExportSettings,
loader?: EmbeddedFilesLoader,
theme?: string,
padding?: number,
): Promise<string>;
/**
* Checks if the folder exists, if not, creates it.
* @param folderpath
* @returns
*/
public async checkAndCreateFolder(folderpath: string): Promise<TFolder>;
/**
* Checks if the filepath already exists, if so, returns a new filepath with a number appended to the filename.
* @param filename
* @param folderpath
* @returns
*/
public getNewUniqueFilepath(filename: string, folderpath: string): string;
/**
* Grabs the codeblock contents from the supplied markdown string.
* @param markdown
* @param codeblockType
* @returns an array of dictionaries with the codeblock contents and type
*/
public extractCodeBlocks(markdown: string): { contents: string, type: string }[];
/**
* converts a string to a DataURL
* @param htmlString
* @returns dataURL
*/
public async convertStringToDataURL (htmlString:string):Promise<string>;
/**
* Post's an AI request to the OpenAI API and returns the response.
* @param request
* @returns
*/
public async postOpenAI (request: AIRequest): Promise<RequestUrlResponse>;
/**
* copies elements from view to elementsDict for editing
* @param elements
*/
copyViewElementsToEAforEditing(elements: ExcalidrawElement[], copyImages: boolean = false): void;