Documentation ¶
Overview ¶
Package tabsupport offers functionality to add tab support to a textarea element.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
func Add(textArea *dom.HTMLTextAreaElement)
Add is a helper that modifies a <textarea>, so that pressing tab key will insert tabs.
func KeyDownHandler ¶
func KeyDownHandler(element dom.HTMLElement, event dom.Event)
KeyDownHandler is a keydown event handler for a <textarea> element. It makes it so that pressing tab key will insert tabs.
To use it, first make it available to the JavaScript world, e.g.:
js.Global.Set("TabSupportKeyDownHandler", jsutil.Wrap(tabsupport.KeyDownHandler))
Then use it as follows in the HTML:
<textarea onkeydown="TabSupportKeyDownHandler(this, event);"></textarea>
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.