mirror of
https://github.com/zadam/trilium.git
synced 2025-12-05 06:54:23 +01:00
Compare commits
3 Commits
a7d5f26842
...
29b1cfd978
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29b1cfd978 | ||
|
|
2163334c4f | ||
|
|
f5d180af6b |
@ -1017,7 +1017,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