Documentation ¶
Index ¶
- type Editor
- func (ed *Editor) Focus()
- func (ed *Editor) GetSelection() (start, end int)
- func (ed *Editor) Highlight(on bool)
- func (ed *Editor) InsertText(text string)
- func (ed *Editor) Mount()
- func (ed *Editor) Redo()
- func (ed *Editor) Render() vecty.ComponentOrHTML
- func (ed *Editor) ResizeTextarea()
- func (ed *Editor) SetSelection(start, end int)
- func (ed *Editor) SetState(text string, selStart, selEnd int)
- func (ed *Editor) SetText(text string)
- func (ed *Editor) Undo()
- func (ed *Editor) WrapSelection(begin, end string)
- type Shadow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Editor ¶
type Editor struct { vecty.Core Range *ranges.Range `vecty:"prop"` HighlightingMode bool `vecty:"prop"` ReadonlyMode bool `vecty:"prop"` ErrorLines map[string]bool `vecty:"prop"` WarningLines map[string]bool `vecty:"prop"` UndoStack *undo.Stack `vecty:"prop"` ChangeTimer **time.Timer // note this is a pointer to a pointer Highlighter func(s string) string `vecty:"prop"` OnTopicChange func(topic string) OnChange func(value string) OnLineSelChange func(value string) OnKeyDown func(e *vecty.Event) // contains filtered or unexported fields }
Editor implements editor logic
func (*Editor) GetSelection ¶
GetSelection gets text selection
func (*Editor) InsertText ¶
InsertText inserts text in place of selection
func (*Editor) Render ¶
func (ed *Editor) Render() vecty.ComponentOrHTML
Render implements the vecty.Component interface.
func (*Editor) ResizeTextarea ¶
func (ed *Editor) ResizeTextarea()
ResizeTextarea resizes the height of the textarea to match the computed height of the shadow
func (*Editor) SetSelection ¶
SetSelection sets text selection
func (*Editor) WrapSelection ¶
WrapSelection wraps selection with the provided starting and ending text snippets
Click to show internal directories.
Click to hide internal directories.