tabsupport

package
Version: v0.0.0-...-4ab50a3 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2021 License: MIT Imports: 2 Imported by: 5

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.

Source Files

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