mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 03:59:05 +01:00
fix(types): correct CommandMappings key for pasteMarkdownIntoText
This commit is contained in:
parent
ac16c42e23
commit
8f8ea7adc3
@ -223,6 +223,7 @@ export type CommandMappings = {
|
|||||||
showUploadAttachmentsDialog: CommandData & { noteId: string };
|
showUploadAttachmentsDialog: CommandData & { noteId: string };
|
||||||
showIncludeNoteDialog: CommandData & { textTypeWidget: EditableTextTypeWidget };
|
showIncludeNoteDialog: CommandData & { textTypeWidget: EditableTextTypeWidget };
|
||||||
showAddLinkDialog: CommandData & { textTypeWidget: EditableTextTypeWidget, text: string };
|
showAddLinkDialog: CommandData & { textTypeWidget: EditableTextTypeWidget, text: string };
|
||||||
|
showPasteMarkdownDialog: CommandData & { textTypeWidget: EditableTextTypeWidget };
|
||||||
closeProtectedSessionPasswordDialog: CommandData;
|
closeProtectedSessionPasswordDialog: CommandData;
|
||||||
copyImageReferenceToClipboard: CommandData;
|
copyImageReferenceToClipboard: CommandData;
|
||||||
copyImageToClipboard: CommandData;
|
copyImageToClipboard: CommandData;
|
||||||
@ -305,7 +306,7 @@ export type CommandMappings = {
|
|||||||
addLinkToText: CommandData;
|
addLinkToText: CommandData;
|
||||||
followLinkUnderCursor: CommandData;
|
followLinkUnderCursor: CommandData;
|
||||||
insertDateTimeToText: CommandData;
|
insertDateTimeToText: CommandData;
|
||||||
showMarkdownIntoTextDialog: CommandData & { textTypeWidget: EditableTextTypeWidget };
|
pasteMarkdownIntoText: CommandData;
|
||||||
cutIntoNote: CommandData;
|
cutIntoNote: CommandData;
|
||||||
addIncludeNoteToText: CommandData;
|
addIncludeNoteToText: CommandData;
|
||||||
editReadOnlyNote: CommandData;
|
editReadOnlyNote: CommandData;
|
||||||
|
|||||||
@ -19,7 +19,7 @@ export default function MarkdownImportDialog() {
|
|||||||
const [ text, setText ] = useState("");
|
const [ text, setText ] = useState("");
|
||||||
const [ shown, setShown ] = useState(false);
|
const [ shown, setShown ] = useState(false);
|
||||||
|
|
||||||
useTriliumEvent("showMarkdownIntoTextDialog", ({ textTypeWidget }) => {
|
useTriliumEvent("showPasteMarkdownDialog", ({ textTypeWidget }) => {
|
||||||
setTextTypeWidget(textTypeWidget);
|
setTextTypeWidget(textTypeWidget);
|
||||||
if (utils.isElectron()) {
|
if (utils.isElectron()) {
|
||||||
const { clipboard } = utils.dynamicRequire("electron");
|
const { clipboard } = utils.dynamicRequire("electron");
|
||||||
|
|||||||
@ -410,7 +410,7 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pasteMarkdownIntoTextCommand() {
|
pasteMarkdownIntoTextCommand() {
|
||||||
this.triggerCommand("showMarkdownIntoTextDialog", { textTypeWidget: this });
|
this.triggerCommand("showPasteMarkdownDialog", { textTypeWidget: this });
|
||||||
}
|
}
|
||||||
|
|
||||||
getSelectedText() {
|
getSelectedText() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user