Put this in your Custom Javascript in the ACP:
$(() => app.require('hooks').then((hooks) => { hooks.on('action:composer.enhanced', ({ postContainer }) => { postContainer.find('textarea.write').on('keydown', function (e) { if (e.key == 'Tab') { e.preventDefault(); var start = this.selectionStart; var end = this.selectionEnd; // set textarea value to: text before caret + tab + text after caret this.value = this.value.substring(0, start) + "\t" + this.value.substring(end); // put caret at right position again this.selectionStart = this.selectionEnd = start + 1; } }); }); }));General Discussion
A place to talk about whatever you want
3.8k
Topics
23.3k
Posts
Copyright © 2024 NodeBB | Contributors