Documentation
¶
Overview ¶
Package tui is the terminal editor behind `mnemos edit`: three panes over one OKF document — its link-graph neighborhood, its frontmatter fields, and its body — with the index kept in sync on save.
The panes are one flat Model rather than nested tea.Models. They are tightly coupled (unsaved metadata gates navigation, the $EDITOR shell-out suspends the whole program), so keeping the save/dirty/history logic in one Update is simpler than routing messages between a parent and three children.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the editor state for one document at a time.
func NewEditModel ¶
NewEditModel loads uri and builds the editor over it. It fails when the document cannot be opened, so `mnemos edit` reports a bad uri on the terminal it was invoked from rather than inside an alternate screen.
func (Model) Init ¶
Init implements tea.Model. The document is already loaded, so there is no startup command.