Documentation ¶
Overview ¶
Package markdown provides an markdown bubble which can render markdown in a pretty manor.
Index ¶
- func RenderMarkdown(width int, content string) (string, error)
- type Model
- func (m *Model) GotoBottom()
- func (m *Model) GotoTop()
- func (m Model) Init() tea.Cmd
- func (m *Model) NewStatusMessageCmd(s string) tea.Cmd
- func (m *Model) SetFileNameCmd(filename string) tea.Cmd
- func (m *Model) SetSizeCmd(w, h int) tea.Cmd
- func (m *Model) SetViewportDisabled(disabled bool)
- func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)
- func (m Model) View() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Model ¶
type Model struct { Viewport viewport.Model ViewportDisabled bool FileName string StatusMessage string StatusMessageLifetime time.Duration // contains filtered or unexported fields }
Model represents the properties of a markdown bubble.
func (*Model) GotoBottom ¶
func (m *Model) GotoBottom()
GotoBottom jumps to the bottom of the viewport.
func (*Model) NewStatusMessageCmd ¶
NewStatusMessage sets a new status message, which will show for a limited amount of time.
func (*Model) SetFileNameCmd ¶
SetFileName sets current file to render, this returns a cmd which will render the text.
func (*Model) SetSizeCmd ¶
SetSize sets the size of the bubble.
func (*Model) SetViewportDisabled ¶
SetViewportDisabled toggles the state of the viewport.
Click to show internal directories.
Click to hide internal directories.