- Try to move Add... functionality to overviews

This commit is contained in:
Josako
2024-12-13 10:41:29 +01:00
parent 3176b95323
commit 88ee4f482b
4 changed files with 24 additions and 4 deletions

View File

@@ -130,6 +130,21 @@ document.addEventListener('DOMContentLoaded', function() {
});
});
</script>
<script>
document.addEventListener('DOMContentLoaded', function() {
document.querySelectorAll('textarea[data-handle-enter="true"]').forEach(function(textarea) {
textarea.addEventListener('keydown', function(e) {
if (e.key === 'Enter' && e.shiftKey) {
e.preventDefault();
const start = this.selectionStart;
const end = this.selectionEnd;
this.value = this.value.substring(0, start) + '\n' + this.value.substring(end);
this.selectionStart = this.selectionEnd = start + 1;
}
});
});
});
</script>
<style>