mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
show warning when trying to indent plain text
https://forums.ankiweb.net/t/2-1-45-release-candidate/11362/55
This commit is contained in:
parent
68dddfe93b
commit
07c2c7ff62
1 changed files with 4 additions and 0 deletions
|
@ -34,6 +34,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
const currentField = document.activeElement as EditingArea;
|
||||
if (getListItem(currentField.shadowRoot!)) {
|
||||
document.execCommand("outdent");
|
||||
} else {
|
||||
alert("Indent/unindent currently only works with lists.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,6 +43,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
const currentField = document.activeElement as EditingArea;
|
||||
if (getListItem(currentField.shadowRoot!)) {
|
||||
document.execCommand("indent");
|
||||
} else {
|
||||
alert("Indent/unindent currently only works with lists.");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue