SmoothMarkdownEditor constructor
const
SmoothMarkdownEditor({
- Key? key,
- MarkdownEditorController? controller,
- String data = '',
- ValueChanged<
String> ? onChanged, - MarkdownEditorMode? mode,
- MarkdownEditorMode initialMode = MarkdownEditorMode.formatted,
- ValueChanged<
MarkdownEditorMode> ? onModeChanged, - MarkdownEditorThemeData? editorTheme,
- MarkdownStyleSheet? styleSheet,
- MarkdownConfig? config,
- void onTapLink(
- String url
- void onTapImage()?,
- MarkdownEditorImagePickerCallback? onPickImage,
- MarkdownEditorImagePickEventCallback? onImagePickEvent,
- Widget imageBuilder()?,
- Widget codeBuilder()?,
- MarkdownEditorCustomBlockBuilder? customBlockBuilder,
- MarkdownEditorCustomBlockEditorBuilder? customBlockEditorBuilder,
- bool useEnhancedComponents = true,
- bool enableCache = true,
- ParserPluginRegistry? plugins,
- BuilderRegistry? builderRegistry,
- bool showToolbar = true,
- bool initialFocusMode = false,
- ValueChanged<
bool> ? onFocusModeChanged, - bool enableSlashCommands = true,
- List<
MarkdownEditorSlashCommand> customSlashCommands = const [], - MarkdownEditorCapabilities capabilities = MarkdownEditorCapabilities.all,
- List<
MarkdownEditorCommand> ? toolbarCommands, - List<
Widget> toolbarLeading = const <Widget>[], - List<
Widget> toolbarTrailing = const <Widget>[], - MarkdownEditorToolbarBuilder? toolbarBuilder,
- bool enableKeyboardShortcuts = true,
- MarkdownEditorShortcutCallback? onShortcut,
- ValueChanged<
MarkdownEditorCommand> ? onCommand, - ValueChanged<
TextSelection> ? onSelectionChanged, - ValueChanged<
bool> ? onFocusChanged, - MarkdownEditorPerformanceCallback? onPerformanceSnapshot,
- bool enableWikilinks = true,
- List<
String> wikilinkSuggestions = const [], - void onTapWikilink(
- String url
- MarkdownEditorMarkdownExportCallback? onExportMarkdown,
- MarkdownEditorPdfExportCallback? onExportPdf,
- MarkdownEditorMarkdownImportCallback? onImportMarkdown,
- double? height,
- double minHeight = 360,
- bool autofocus = false,
- bool enabled = true,
- FocusNode? focusNode,
- TextStyle? textStyle,
- String? placeholder,
- Decoration? decoration,
- Decoration? sourceDecoration,
- Decoration? previewDecoration,
Creates a Markdown editor.
Implementation
const SmoothMarkdownEditor({
super.key,
this.controller,
this.data = '',
this.onChanged,
this.mode,
this.initialMode = MarkdownEditorMode.formatted,
this.onModeChanged,
this.editorTheme,
this.styleSheet,
this.config,
this.onTapLink,
this.onTapImage,
this.onPickImage,
this.onImagePickEvent,
this.imageBuilder,
this.codeBuilder,
this.customBlockBuilder,
this.customBlockEditorBuilder,
this.useEnhancedComponents = true,
this.enableCache = true,
this.plugins,
this.builderRegistry,
this.showToolbar = true,
this.initialFocusMode = false,
this.onFocusModeChanged,
this.enableSlashCommands = true,
this.customSlashCommands = const [],
this.capabilities = MarkdownEditorCapabilities.all,
this.toolbarCommands,
this.toolbarLeading = const <Widget>[],
this.toolbarTrailing = const <Widget>[],
this.toolbarBuilder,
this.enableKeyboardShortcuts = true,
this.onShortcut,
this.onCommand,
this.onSelectionChanged,
this.onFocusChanged,
this.onPerformanceSnapshot,
this.enableWikilinks = true,
this.wikilinkSuggestions = const [],
this.onTapWikilink,
this.onExportMarkdown,
this.onExportPdf,
this.onImportMarkdown,
this.height,
this.minHeight = 360,
this.autofocus = false,
this.enabled = true,
this.focusNode,
this.textStyle,
this.placeholder,
this.decoration,
this.sourceDecoration,
this.previewDecoration,
});