RichTextEditor constructor
RichTextEditor({
- String? label,
- String? name,
- TextEditingController? controller,
- String? initialHtml,
- String placeholder = 'Write something...',
- bool required = false,
- bool disabled = false,
- String? error,
- FormErrors? errors,
- String? helpText,
- String? className,
- Map<
String, Object?> props = const {}, - Map<
String, Object?> editorProps = const {}, - Map<
String, Object?> style = const {}, - Map<
String, Object?> editorStyle = const {}, - DartStyle? dartStyle,
- DartStyle? editorDartStyle,
- String height = '300px',
- Future<
String> onUploadImage(- File file
- void onChanged(
- String html
- 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);
}