tabsupport

package
v0.0.0-...-0699c23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2023 License: MIT Imports: 2 Imported by: 10

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.

Directories

Path Synopsis
Package tabsupport offers functionality to add tab support to a textarea element.
Package tabsupport offers functionality to add tab support to a textarea element.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL