Skip to content

Build your personal knowledge base with Trilium Notes

feat(script-api): expose markdown conversions in autocomplete typings

Elian Doran5fe18b535193
diff --git a/packages/commons/src/lib/script_api.ts b/packages/commons/src/lib/script_api.ts
index 5a25bb7a56..d558f38952 100644
--- a/packages/commons/src/lib/script_api.ts
+++ b/packages/commons/src/lib/script_api.ts
@@ -1243,6 +1243,20 @@ export interface BackendApi {
* @returns unescaped string
*/
unescapeHtml(str: string): string;
+ /**
+ * Converts the given HTML string to Markdown.
+ *
+ * @param html - HTML content to convert
+ * @returns Markdown representation of the input HTML
+ */
+ htmlToMarkdown(html: string): string;
+ /**
+ * Converts the given Markdown string to HTML.
+ *
+ * @param markdown - Markdown content to convert
+ * @returns HTML representation of the input Markdown
+ */
+ markdownToHtml(markdown: string): string;
/**
* sql
* @type {module:sql}