Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(types): correct CommandMappings key for pasteMarkdownIntoText
SiriusXT8f8ea7adc3ce
diff --git a/apps/client/src/components/app_context.ts b/apps/client/src/components/app_context.tsindex f52f2e4988..5727032e68 100644--- a/apps/client/src/components/app_context.ts+++ b/apps/client/src/components/app_context.ts@@ -223,6 +223,7 @@ export type CommandMappings = {showUploadAttachmentsDialog: CommandData & { noteId: string };showIncludeNoteDialog: CommandData & { textTypeWidget: EditableTextTypeWidget };showAddLinkDialog: CommandData & { textTypeWidget: EditableTextTypeWidget, text: string };+ showPasteMarkdownDialog: CommandData & { textTypeWidget: EditableTextTypeWidget };closeProtectedSessionPasswordDialog: CommandData;copyImageReferenceToClipboard: CommandData;copyImageToClipboard: CommandData;@@ -305,7 +306,7 @@ export type CommandMappings = {addLinkToText: CommandData;followLinkUnderCursor: CommandData;insertDateTimeToText: CommandData;- showMarkdownIntoTextDialog: CommandData & { textTypeWidget: EditableTextTypeWidget };+ pasteMarkdownIntoText: CommandData;cutIntoNote: CommandData;addIncludeNoteToText: CommandData;editReadOnlyNote: CommandData;diff --git a/apps/client/src/widgets/dialogs/markdown_import.tsx b/apps/client/src/widgets/dialogs/markdown_import.tsxindex 07669b42c9..43b20d3785 100644--- a/apps/client/src/widgets/dialogs/markdown_import.tsx+++ b/apps/client/src/widgets/dialogs/markdown_import.tsx@@ -19,7 +19,7 @@ export default function MarkdownImportDialog() {const [ text, setText ] = useState("");const [ shown, setShown ] = useState(false);- useTriliumEvent("showMarkdownIntoTextDialog", ({ textTypeWidget }) => {+ useTriliumEvent("showPasteMarkdownDialog", ({ textTypeWidget }) => {setTextTypeWidget(textTypeWidget);if (utils.isElectron()) {const { clipboard } = utils.dynamicRequire("electron");diff --git a/apps/client/src/widgets/type_widgets/editable_text.ts b/apps/client/src/widgets/type_widgets/editable_text.tsindex ee76a107c1..cbc35832ed 100644--- a/apps/client/src/widgets/type_widgets/editable_text.ts+++ b/apps/client/src/widgets/type_widgets/editable_text.ts@@ -410,7 +410,7 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {}pasteMarkdownIntoTextCommand() {- this.triggerCommand("showMarkdownIntoTextDialog", { textTypeWidget: this });+ this.triggerCommand("showPasteMarkdownDialog", { textTypeWidget: this });}getSelectedText() {