mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -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 { editingInputIsRichText } from "./rich-text-input";
|
||||
|
||||
export let alwaysEnabled = false;
|
||||
|
||||
const { focusedInput, fields } = noteEditorContext.get();
|
||||
|
||||
// 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 sameKeyCombination = "Control+Alt+Shift+C";
|
||||
|
|
|
@ -38,7 +38,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
</IconButton>
|
||||
</ButtonGroup>
|
||||
|
||||
<ClozeButtons on:surround />
|
||||
<ClozeButtons on:surround alwaysEnabled={true} />
|
||||
|
||||
<ButtonGroup>
|
||||
<IconButton
|
||||
|
|
Loading…
Reference in a new issue