Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MarkdownView ¶
type MarkdownView struct { Content string Rendered string GlamourStyle string ViewMode ViewMode Renderer *glamour.TermRenderer Styles lipgloss.Style Viewport viewport.Model NeedsRender bool }
MarkdownView represents the model for a markdown component
func NewMarkdownView ¶
func NewMarkdownView(content string, glamourStyle string, viewMode ViewMode) (*MarkdownView, error)
NewMarkdownView initializes a new MarkdownView
func (*MarkdownView) Init ¶
func (m *MarkdownView) Init() tea.Cmd
Init initializes the MarkdownView component
func (*MarkdownView) Resize ¶
func (m *MarkdownView) Resize(width, height int)
Resize adjusts the component based on new terminal dimensions
func (*MarkdownView) SetContent ¶
func (m *MarkdownView) SetContent(content string) error
SetContent updates the Markdown content and triggers re-rendering
func (*MarkdownView) View ¶
func (m *MarkdownView) View() string
View renders the MarkdownView component
Click to show internal directories.
Click to hide internal directories.