Documentation ¶
Index ¶
- type Textarea
- func (t *Textarea) Focus()
- func (t *Textarea) GetSelectionEnd() int
- func (t *Textarea) GetSelectionStart() int
- func (t *Textarea) GetSymbolWidthsAround(before, after int) (wBefore, wAfter int)
- func (t *Textarea) GetSymbolsAroundSelection() (before, after string)
- func (t *Textarea) GetValue() string
- func (t *Textarea) InsertText(text string)
- func (t *Textarea) SetHeight(val int)
- func (t *Textarea) SetSelectionEnd(val int)
- func (t *Textarea) SetSelectionStart(val int)
- func (t *Textarea) SetState(val string, selStart, selEnd int)
- func (t *Textarea) SetValue(val string)
- func (t *Textarea) WrapSelection(begin, end string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Textarea ¶
Textarea provides wrapper functions for <textarea> object
func (*Textarea) GetSelectionEnd ¶
GetSelectionEnd returns selection end utf8 byte position Note that JavaScript strings are UTF-16-encoded, and selectionStart returns a position in the UTF-16 array representing the textarea value
func (*Textarea) GetSelectionStart ¶
GetSelectionStart returns selection start utf8 byte position Note that JavaScript strings are UTF-16-encoded, and selectionStart returns a position in the UTF-16 array representing the textarea value
func (*Textarea) GetSymbolWidthsAround ¶
GetSymbolWidthsAround returns the size of the unicode symbols in utf8 bytes before and after a given utf8 byte range in a string
func (*Textarea) GetSymbolsAroundSelection ¶
GetSymbolsAroundSelection returns one symbol before and one symbol after selection (or around the caret, if there's no selection); one or both strings can be empty if caret is placed at the beginning or the end of the document, or if the document is blank
func (*Textarea) InsertText ¶
InsertText replaces selection with the provided text And adjusts the caret pos
func (*Textarea) SetSelectionEnd ¶
SetSelectionEnd sets selection end character
func (*Textarea) SetSelectionStart ¶
SetSelectionStart sets selection start character
func (*Textarea) WrapSelection ¶
WrapSelection wraps selection with the provided starting and ending text snippets and places the caret before the `end` part