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