NiceHtmlEditor constructor

const NiceHtmlEditor({
  1. Key? key,
  2. String value = '',
  3. void onChange(
    1. String value
    )?,
  4. String placeholder = 'Enter text...',
  5. double height = 300,
  6. List<NiceHtmlEditorCommand> toolbar = const [NiceHtmlEditorCommand.bold, NiceHtmlEditorCommand.italic, NiceHtmlEditorCommand.underline, NiceHtmlEditorCommand.strikethrough, NiceHtmlEditorCommand.divider, NiceHtmlEditorCommand.h1, NiceHtmlEditorCommand.h2, NiceHtmlEditorCommand.h3, NiceHtmlEditorCommand.divider, NiceHtmlEditorCommand.bulletList, NiceHtmlEditorCommand.orderedList, NiceHtmlEditorCommand.divider, NiceHtmlEditorCommand.alignLeft, NiceHtmlEditorCommand.alignCenter, NiceHtmlEditorCommand.alignRight, NiceHtmlEditorCommand.divider, NiceHtmlEditorCommand.link, NiceHtmlEditorCommand.quote, NiceHtmlEditorCommand.code, NiceHtmlEditorCommand.divider, NiceHtmlEditorCommand.undo, NiceHtmlEditorCommand.redo, NiceHtmlEditorCommand.clear],
  7. bool readOnly = false,
  8. int minLines = 5,
  9. int? maxLines,
  10. bool autofocus = false,
})

Implementation

const NiceHtmlEditor({
  super.key,
  this.value = '',
  this.onChange,
  this.placeholder = 'Enter text...',
  this.height = 300,
  this.toolbar = const [
    NiceHtmlEditorCommand.bold,
    NiceHtmlEditorCommand.italic,
    NiceHtmlEditorCommand.underline,
    NiceHtmlEditorCommand.strikethrough,
    NiceHtmlEditorCommand.divider,
    NiceHtmlEditorCommand.h1,
    NiceHtmlEditorCommand.h2,
    NiceHtmlEditorCommand.h3,
    NiceHtmlEditorCommand.divider,
    NiceHtmlEditorCommand.bulletList,
    NiceHtmlEditorCommand.orderedList,
    NiceHtmlEditorCommand.divider,
    NiceHtmlEditorCommand.alignLeft,
    NiceHtmlEditorCommand.alignCenter,
    NiceHtmlEditorCommand.alignRight,
    NiceHtmlEditorCommand.divider,
    NiceHtmlEditorCommand.link,
    NiceHtmlEditorCommand.quote,
    NiceHtmlEditorCommand.code,
    NiceHtmlEditorCommand.divider,
    NiceHtmlEditorCommand.undo,
    NiceHtmlEditorCommand.redo,
    NiceHtmlEditorCommand.clear,
  ],
  this.readOnly = false,
  this.minLines = 5,
  this.maxLines,
  this.autofocus = false,
});