mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
parent
037610715d
commit
f9aa232d9b
2 changed files with 5 additions and 2 deletions
|
@ -16,6 +16,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
import { context as noteEditorContext } from "./NoteEditor.svelte";
|
import { context as noteEditorContext } from "./NoteEditor.svelte";
|
||||||
import { editingInputIsRichText } from "./rich-text-input";
|
import { editingInputIsRichText } from "./rich-text-input";
|
||||||
|
|
||||||
|
export let alwaysEnabled = false;
|
||||||
|
|
||||||
const { focusedInput, fields } = noteEditorContext.get();
|
const { focusedInput, fields } = noteEditorContext.get();
|
||||||
|
|
||||||
// Workaround for Cmd+Option+Shift+C not working on macOS. The keyup approach works
|
// Workaround for Cmd+Option+Shift+C not working on macOS. The keyup approach works
|
||||||
|
@ -67,7 +69,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$: disabled = !$focusedInput || !editingInputIsRichText($focusedInput);
|
$: disabled =
|
||||||
|
!alwaysEnabled && (!$focusedInput || !editingInputIsRichText($focusedInput));
|
||||||
|
|
||||||
const incrementKeyCombination = "Control+Shift+C";
|
const incrementKeyCombination = "Control+Shift+C";
|
||||||
const sameKeyCombination = "Control+Alt+Shift+C";
|
const sameKeyCombination = "Control+Alt+Shift+C";
|
||||||
|
|
|
@ -38,7 +38,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</ButtonGroup>
|
</ButtonGroup>
|
||||||
|
|
||||||
<ClozeButtons on:surround />
|
<ClozeButtons on:surround alwaysEnabled={true} />
|
||||||
|
|
||||||
<ButtonGroup>
|
<ButtonGroup>
|
||||||
<IconButton
|
<IconButton
|
||||||
|
|
Loading…
Reference in a new issue