mirror of
https://github.com/zadam/trilium.git
synced 2025-01-16 12:08:03 +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
|
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();
|
macInit.init();
|
||||||
|
|
||||||
searchNotesService.init(); // should be in front of treeService since that one manipulates address bar hash
|
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);
|
convertMarkdownToHtml(text);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$("input[name='search-text']").focus();
|
|
||||||
|
|
||||||
glob.activeDialog = $dialog;
|
glob.activeDialog = $dialog;
|
||||||
|
|
||||||
$dialog.modal();
|
$dialog.modal();
|
||||||
|
@ -53,7 +51,6 @@ async function sendForm() {
|
||||||
|
|
||||||
$importButton.click(sendForm);
|
$importButton.click(sendForm);
|
||||||
|
|
||||||
utils.bindElShortcut($dialog, 'ctrl+return', sendForm);
|
$dialog.on('shown.bs.modal', () => $importTextarea.focus());
|
||||||
|
|
||||||
// for CKEditor integration (button on block toolbar)
|
utils.bindElShortcut($dialog, 'ctrl+return', sendForm);
|
||||||
window.glob.importMarkdownInline = importMarkdownInline;
|
|
Loading…
Reference in a new issue