mirror of
https://github.com/zadam/trilium.git
synced 2025-01-16 03:58:53 +08:00
fix inline markdown import dialog
This commit is contained in:
parent
5d80df398b
commit
76dce5197f
2 changed files with 9 additions and 5 deletions
|
@ -159,6 +159,13 @@ $('[data-toggle="tooltip"]').tooltip({
|
|||
html: true
|
||||
});
|
||||
|
||||
// for CKEditor integration (button on block toolbar)
|
||||
window.glob.importMarkdownInline = async () => {
|
||||
const dialog = await import("./dialogs/markdown_import.js");
|
||||
|
||||
dialog.importMarkdownInline();
|
||||
};
|
||||
|
||||
macInit.init();
|
||||
|
||||
searchNotesService.init(); // should be in front of treeService since that one manipulates address bar hash
|
||||
|
|
|
@ -33,8 +33,6 @@ export async function importMarkdownInline() {
|
|||
convertMarkdownToHtml(text);
|
||||
}
|
||||
else {
|
||||
$("input[name='search-text']").focus();
|
||||
|
||||
glob.activeDialog = $dialog;
|
||||
|
||||
$dialog.modal();
|
||||
|
@ -53,7 +51,6 @@ async function sendForm() {
|
|||
|
||||
$importButton.click(sendForm);
|
||||
|
||||
utils.bindElShortcut($dialog, 'ctrl+return', sendForm);
|
||||
$dialog.on('shown.bs.modal', () => $importTextarea.focus());
|
||||
|
||||
// for CKEditor integration (button on block toolbar)
|
||||
window.glob.importMarkdownInline = importMarkdownInline;
|
||||
utils.bindElShortcut($dialog, 'ctrl+return', sendForm);
|
Loading…
Reference in a new issue