RichTextEditor constructor

RichTextEditor({
  1. String? label,
  2. String? name,
  3. TextEditingController? controller,
  4. String? initialHtml,
  5. String placeholder = 'Write something...',
  6. bool required = false,
  7. bool disabled = false,
  8. String? error,
  9. FormErrors? errors,
  10. String? helpText,
  11. String? className,
  12. Map<String, Object?> props = const {},
  13. Map<String, Object?> editorProps = const {},
  14. Map<String, Object?> style = const {},
  15. Map<String, Object?> editorStyle = const {},
  16. DartStyle? dartStyle,
  17. DartStyle? editorDartStyle,
  18. String height = '300px',
  19. Future<String> onUploadImage(
    1. File file
    )?,
  20. void onChanged(
    1. String html
    )?,
  21. List<RichTextToolbarItem> toolbarItems = const [RichTextToolbarItem.bold, RichTextToolbarItem.italic, RichTextToolbarItem.underline, RichTextToolbarItem.strikeThrough, RichTextToolbarItem.divider, RichTextToolbarItem.heading1, RichTextToolbarItem.heading2, RichTextToolbarItem.paragraph, RichTextToolbarItem.divider, RichTextToolbarItem.bulletList, RichTextToolbarItem.orderedList, RichTextToolbarItem.blockquote, RichTextToolbarItem.codeBlock, RichTextToolbarItem.divider, RichTextToolbarItem.link, RichTextToolbarItem.image, RichTextToolbarItem.removeFormat],
})

Creates a rich text editor.

Implementation

RichTextEditor({
  String? label,
  this.name,
  this.controller,
  this.initialHtml,
  this.placeholder = 'Write something...',
  this.required = false,
  this.disabled = false,
  this.error,
  this.errors,
  this.helpText,
  this.className,
  this.props = const {},
  this.editorProps = const {},
  this.style = const {},
  this.editorStyle = const {},
  this.dartStyle,
  this.editorDartStyle,
  this.height = '300px',
  this.onUploadImage,
  this.onChanged,
  this.toolbarItems = const [
    RichTextToolbarItem.bold,
    RichTextToolbarItem.italic,
    RichTextToolbarItem.underline,
    RichTextToolbarItem.strikeThrough,
    RichTextToolbarItem.divider,
    RichTextToolbarItem.heading1,
    RichTextToolbarItem.heading2,
    RichTextToolbarItem.paragraph,
    RichTextToolbarItem.divider,
    RichTextToolbarItem.bulletList,
    RichTextToolbarItem.orderedList,
    RichTextToolbarItem.blockquote,
    RichTextToolbarItem.codeBlock,
    RichTextToolbarItem.divider,
    RichTextToolbarItem.link,
    RichTextToolbarItem.image,
    RichTextToolbarItem.removeFormat,
  ],
}) {
  _id = fieldId('editor', name, props);
}