You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-03 23:50:33 +02:00
Desktop: Fixes #3259: Fixed inserting templates into existing notes
This commit is contained in:
@ -3,6 +3,7 @@ import { FormNote, EditorCommand } from './types';
|
||||
const { time } = require('lib/time-utils.js');
|
||||
const { reg } = require('lib/registry.js');
|
||||
const NoteListUtils = require('../../utils/NoteListUtils');
|
||||
const TemplateUtils = require('lib/TemplateUtils');
|
||||
|
||||
interface HookDependencies {
|
||||
windowCommand: any,
|
||||
@ -68,8 +69,8 @@ export default function useWindowCommandHandler(dependencies:HookDependencies) {
|
||||
};
|
||||
}
|
||||
} else if (command.name === 'insertTemplate') {
|
||||
editorCmd.name = 'insertText',
|
||||
editorCmd.value = time.formatMsToLocal(new Date().getTime());
|
||||
editorCmd.name = 'insertText';
|
||||
editorCmd.value = TemplateUtils.render(command.value);
|
||||
}
|
||||
|
||||
if (command.name === 'focusElement' && command.target === 'noteTitle') {
|
||||
|
Reference in New Issue
Block a user