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) GotoTop()
- func (m Model) Init() tea.Cmd
- func (m *Model) SetBorderColor(color lipgloss.AdaptiveColor)
- func (m *Model) SetBorderless(borderless bool)
- func (m *Model) SetFileName(filename string) tea.Cmd
- func (m *Model) SetIsActive(active bool)
- func (m *Model) SetSize(w, h int) tea.Cmd
- 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 BorderColor lipgloss.AdaptiveColor Active bool Borderless bool FileName string ImageString string }
Model represents the properties of a code bubble.
func New ¶
func New(active, borderless bool, borderColor lipgloss.AdaptiveColor) Model
New creates a new instance of markdown.
func (*Model) SetBorderColor ¶
func (m *Model) SetBorderColor(color lipgloss.AdaptiveColor)
SetBorderColor sets the current color of the border.
func (*Model) SetBorderless ¶
SetBorderless sets weather or not to show the border.
func (*Model) SetFileName ¶
SetFileName sets current file to render, this returns a cmd which will render the text.
func (*Model) SetIsActive ¶
SetIsActive sets if the bubble is currently active.
Click to show internal directories.
Click to hide internal directories.