SmoothMarkdownEditor constructor

const SmoothMarkdownEditor({
  1. Key? key,
  2. MarkdownEditorController? controller,
  3. String data = '',
  4. ValueChanged<String>? onChanged,
  5. MarkdownEditorMode? mode,
  6. MarkdownEditorMode initialMode = MarkdownEditorMode.formatted,
  7. ValueChanged<MarkdownEditorMode>? onModeChanged,
  8. MarkdownEditorThemeData? editorTheme,
  9. MarkdownStyleSheet? styleSheet,
  10. MarkdownConfig? config,
  11. void onTapLink(
    1. String url
    )?,
  12. void onTapImage(
    1. String url,
    2. String? alt,
    3. String? title
    )?,
  13. MarkdownEditorImagePickerCallback? onPickImage,
  14. MarkdownEditorImagePickEventCallback? onImagePickEvent,
  15. Widget imageBuilder(
    1. String url,
    2. String? alt,
    3. String? title
    )?,
  16. Widget codeBuilder(
    1. String code,
    2. String? language
    )?,
  17. MarkdownEditorCustomBlockBuilder? customBlockBuilder,
  18. MarkdownEditorCustomBlockEditorBuilder? customBlockEditorBuilder,
  19. bool useEnhancedComponents = true,
  20. bool enableCache = true,
  21. ParserPluginRegistry? plugins,
  22. BuilderRegistry? builderRegistry,
  23. bool showToolbar = true,
  24. bool initialFocusMode = false,
  25. ValueChanged<bool>? onFocusModeChanged,
  26. bool enableSlashCommands = true,
  27. List<MarkdownEditorSlashCommand> customSlashCommands = const [],
  28. MarkdownEditorCapabilities capabilities = MarkdownEditorCapabilities.all,
  29. List<MarkdownEditorCommand>? toolbarCommands,
  30. List<Widget> toolbarLeading = const <Widget>[],
  31. List<Widget> toolbarTrailing = const <Widget>[],
  32. MarkdownEditorToolbarBuilder? toolbarBuilder,
  33. bool enableKeyboardShortcuts = true,
  34. MarkdownEditorShortcutCallback? onShortcut,
  35. ValueChanged<MarkdownEditorCommand>? onCommand,
  36. ValueChanged<TextSelection>? onSelectionChanged,
  37. ValueChanged<bool>? onFocusChanged,
  38. MarkdownEditorPerformanceCallback? onPerformanceSnapshot,
  39. bool enableWikilinks = true,
  40. List<String> wikilinkSuggestions = const [],
  41. void onTapWikilink(
    1. String url
    )?,
  42. MarkdownEditorMarkdownExportCallback? onExportMarkdown,
  43. MarkdownEditorPdfExportCallback? onExportPdf,
  44. MarkdownEditorMarkdownImportCallback? onImportMarkdown,
  45. double? height,
  46. double minHeight = 360,
  47. bool autofocus = false,
  48. bool enabled = true,
  49. FocusNode? focusNode,
  50. TextStyle? textStyle,
  51. String? placeholder,
  52. Decoration? decoration,
  53. Decoration? sourceDecoration,
  54. 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,
});