/Indentable-textarea

keep previous line indent on new line

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

Indentable-textarea

Allow use of tab in <textarea>

Usage

html

<script src="indentable.js"></script>

js

const textarea = document.querySelector('textarea')
indentable(textarea, 2)
  • arg 1: textarea element
  • arg 2: space count (optional, default: 2)