mirror of
https://github.com/zadam/trilium.git
synced 2025-12-04 14:34:24 +01:00
Merge 2163334c4f6d88a94cdab18a4cc7558fcd90acdd into 64662d5215ea01f6634fd72b5ff7a77dbc7e9e7d
This commit is contained in:
commit
a7d5f26842
@ -1017,7 +1017,7 @@ div[data-notify="container"] {
|
||||
|
||||
svg.ck-icon {
|
||||
&.ck-icon_inherit-color {
|
||||
* {
|
||||
path {
|
||||
fill: currentColor;
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,12 +37,21 @@ export default function MarkdownImportDialog() {
|
||||
return (
|
||||
<Modal
|
||||
className="markdown-import-dialog" title={t("markdown_import.dialog_title")} size="lg"
|
||||
footer={<Button className="markdown-import-button" text={t("markdown_import.import_button")} onClick={() => setShown(false)} keyboardShortcut="Ctrl+Enter" />}
|
||||
footer={
|
||||
<Button
|
||||
className="markdown-import-button"
|
||||
text={t("markdown_import.import_button")}
|
||||
keyboardShortcut="Ctrl+Enter"
|
||||
onClick={async () => {
|
||||
setShown(false);
|
||||
if (editorApiRef.current) {
|
||||
await convertMarkdownToHtml(text, editorApiRef.current);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
}
|
||||
onShown={() => markdownImportTextArea.current?.focus()}
|
||||
onHidden={async () => {
|
||||
if (editorApiRef.current) {
|
||||
await convertMarkdownToHtml(text, editorApiRef.current);
|
||||
}
|
||||
onHidden={() => {
|
||||
setShown(false);
|
||||
setText("");
|
||||
}}
|
||||
@ -56,6 +65,9 @@ export default function MarkdownImportDialog() {
|
||||
if (e.key === "Enter" && e.ctrlKey) {
|
||||
e.preventDefault();
|
||||
setShown(false);
|
||||
if (editorApiRef.current) {
|
||||
convertMarkdownToHtml(text, editorApiRef.current);
|
||||
}
|
||||
}
|
||||
}}></textarea>
|
||||
</Modal>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user