Skip to main content

html_text_editor 1.0.1 copy "html_text_editor: ^1.0.1" to clipboard
html_text_editor: ^1.0.1 copied to clipboard

A customizable rich text editor package for Flutter with text formatting and image support.

Html Text Editor #

A customizable rich text editor for Flutter applications with powerful formatting tools, document editing capabilities, and flexible toolbar customization.

Features #

  • Rich text formatting
  • Bold, italic, underline, and strikethrough
  • Text alignment
  • Numbered and bullet lists
  • Paragraph formatting
  • Font size selection
  • Text color and highlighting
  • Link conversion
  • Image insertion
  • Shape insertion
  • Table support
  • HTML conversion
  • JSON conversion
  • Document change callbacks
  • Customizable toolbar
  • Custom editor height
  • Custom border and selected tab colors

Demo #

Add your short MP4 demo video here.

Installation #

flutter pub add custom_rich_text_editor

Usage #

Import the package:

import 'package:custom_rich_text_editor/custom_rich_text_editor.dart';

Basic Example #

 final GlobalKey<CustomRichTextEditorState> _editorKey =
      GlobalKey<CustomRichTextEditorState>();
       String _plainText = '';
  final TextEditingController _bodyController = TextEditingController();

CustomRichTextEditor(
  controller: _bodyController,
  onInsertMarkup: (value) {},
  key: _editorKey,
  hintText: 'Start writing your document...',
  minHeight: 450,
  onChanged: (value) {
    setState(() {
      _plainText = value;
    });
  },
)

Parameters #

Parameter Type Default
controller TextEditingController Required
onInsertMarkup void Function(String) Required
initialText String ''
hintText String 'Write something...'
minHeight double 300
onChanged void Function(String)? null
onDocumentChanged void Function(List<EditorBlock>)? null
isBold bool true
isItalic bool true
isUnderLine bool true
isStrikeThrough bool true
isParagraph bool true
numbericPoint bool true
bulletPoint bool true
isAlighnment bool true
isLinkConvert bool true
isImage bool true
isShape bool true
isTable bool true
isSelectFontSize bool true
textColor bool true
heighlight bool true
borderColor Color? null
selectedTabColor Color? null

All formatting options are enabled by default and can be disabled individually.

Example #

See the example directory for a complete implementation.

License #

MIT License

1
likes
105
points
65
downloads

Publisher

unverified uploader

Weekly Downloads

A customizable rich text editor package for Flutter with text formatting and image support.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

cupertino_icons, flutter, flutter_project_name_changer, google_fonts, image_picker, uuid

More

Packages that depend on html_text_editor