flutter_smooth_markdown_editor library

Stable Markdown editor integration surface.

Import this library when an app needs the editor widget, controller, commands, export helpers, or wikilink support without depending on lower level document codec APIs.

Classes

BlockParseResult
Result of a block parsing operation
BlockParserPlugin
Plugin for parsing block-level markdown elements
BuilderRegistry
Registry for Markdown widget builders
InlineParseResult
Result of an inline parsing operation
InlineParserPlugin
Plugin for parsing inline markdown elements
MarkdownConfig
Configuration options for Markdown parsing and rendering behavior.
MarkdownEditorCapabilities
Configures which built-in editor commands are available.
MarkdownEditorController
Controller for Markdown source editing.
MarkdownEditorCustomBlockContext
Context passed to MarkdownEditorCustomBlockBuilder.
MarkdownEditorCustomBlockEditorContext
Context passed to MarkdownEditorCustomBlockEditorBuilder.
MarkdownEditorImagePickEvent
Image picking/insertion lifecycle event.
MarkdownEditorImageSelection
Image data returned by SmoothMarkdownEditor.onPickImage.
MarkdownEditorSlashCommand
Host-provided slash command that inserts Markdown when selected.
MarkdownEditorThemeData
Editor-specific visual styling.
MarkdownRenderContext
Context passed to builders during rendering
MarkdownStyleSheet
Defines the visual styling for all Markdown elements.
MarkdownWidgetBuilder
Base class for building widgets from Markdown nodes
ParserPlugin
Base interface for parser plugins
ParserPluginRegistry
Registry for managing parser plugins
SmoothMarkdownEditor
A Markdown source editor with formatted editing, live preview, and Scratch-inspired commands.
WikilinkBuilder
Renders WikilinkNode inline.
WikilinkNode
AST node for a [[wikilink]] inline element.
WikilinkPlugin
Parser plugin for Scratch-style [[wikilink]] inline nodes.

Enums

MarkdownEditorCommand
Editing commands supported by the Markdown editor.
MarkdownEditorImagePickStatus
Image picking/insertion lifecycle status reported to host apps.
MarkdownEditorMode
Display mode for SmoothMarkdownEditor.

Functions

markdownToHtml(String markdown) String
Converts Markdown source to a compact HTML fragment for copy/export actions.
markdownToPlainText(String markdown) String
Converts Markdown source to a readable plain-text representation.

Typedefs

BlockRenderer = Widget Function(List<MarkdownNode> nodes)
Function type for rendering block-level nodes
InlineRenderer = Widget Function(List<MarkdownNode> nodes, TextStyle? baseStyle)
MarkdownEditorCustomBlockBuilder = Widget? Function(BuildContext context, MarkdownEditorCustomBlockContext contextData)
Builds a host-provided formatted view for a custom Markdown block.
MarkdownEditorCustomBlockEditorBuilder = Widget? Function(BuildContext context, MarkdownEditorCustomBlockEditorContext contextData)
Builds a host-provided editor for a custom Markdown block.
MarkdownEditorImagePickerCallback = FutureOr<MarkdownEditorImageSelection?> Function()
Called when the image command should pick/import an image.
MarkdownEditorImagePickEventCallback = void Function(MarkdownEditorImagePickEvent event)
Called when image picking/insertion status changes.
MarkdownEditorMarkdownExportCallback = FutureOr<void> Function(String markdown)
Called when the export menu requests a Markdown file export.
MarkdownEditorMarkdownImportCallback = FutureOr<String?> Function()
Called when the editor should import Markdown from a host-provided file.
MarkdownEditorPdfExportCallback = FutureOr<void> Function(String markdown, String html)
Called when the editor requests a Scratch-style PDF/print export.
MarkdownEditorShortcutCallback = KeyEventResult Function(KeyEvent event, MarkdownEditorController controller)
Host callback for editor keyboard shortcuts.
MarkdownEditorSlashCommandCallback = FutureOr<String?> Function(String query)
Called when a custom slash command is selected.
MarkdownEditorToolbarBuilder = Widget Function(BuildContext context, Widget defaultToolbar)
Wraps or replaces the default editor toolbar.