NiceHtmlEditor constructor
const
NiceHtmlEditor({ - Key? key,
- String value = '',
- void onChange(
- String value
)?,
- String placeholder = 'Enter text...',
- double height = 300,
- 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],
- bool readOnly = false,
- int minLines = 5,
- int? maxLines,
- 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,
});