A lightweight HTML-Richtext editor for Flutter

Overview

Flutter HTML Editor

Flutter HTML Editor is a simple HTML-based Richtext editor, which is able to edit and parse a selected set of HTML tags into a Flutter widget.

Check out the some usage examples to see how the package can be used.

Features

  • Code Editor where HTML text can be written with an optional preview output
  • Richtext-Renderer which takes in HTML produced by the editor and converts it into a widget
  • Customization options for Editor and Renderer
  • Use Variables in the text
  • Written purely in Dart

Usage

  1. Import the package import 'package:light_html_editor/light_html_editor.dart';
  2. Create an environment with a finite width, as the widgets will take up all available horizontal space
  3. Instantiate RichTextEditor or RichTextRenderer
  4. Set desired parameters like the onChanged callbacks for retrieving the richtext

Examples

Simple usage without fancy settings

SizedBox(
    width: 400,
    child: RichTextEditor(
        onChanged: (String html) {
            // called every time the code in the input text is changed
            // do something with the richtext
        },
    ),
),

Example Output of Flutter HTML Editor

Variables

SizedBox(
    width: 400,
    child: RichTextEditor(
    placeholders: [
        RichTextPlaceholder(
        "VAR",
        "Some longer text that got shortened!",
        ),
    ],
    onChanged: (String html) {
        // do something with the richtext
      },
    ),
),

Example Output with variables

You might also like...

🎨 Flutter Material Theme editor

🎨 Flutter Material Theme editor

🎨 Panache A Flutter Material Theme editor. Panache helps you to create beautiful Material themes for your Flutter applications. Customize widgets col

Dec 30, 2022

A Flutter based code editor

A Flutter based code editor

rich_code_editor A simple package that supports creating code editors in Flutter. Flutter version supported: Flutter 1.22.5 Getting Started There are

Dec 16, 2022

Rich text editor for Flutter

Rich text editor for Flutter

A rich text editor for Flutter FlutterQuill is a rich text editor and a Quill component for Flutter. This library is a WYSIWYG editor built for the mo

Jan 4, 2023

An online Dart editor with support for console, web, and Flutter apps

An online Dart editor with support for console, web, and Flutter apps

DartPad DartPad is a free, open-source online editor to help developers learn about Dart and Flutter. You can access it at dartpad.dev. What is it? Wh

Jan 4, 2023

Panache - 🎨 Flutter Material Theme editor

Panache - 🎨 Flutter Material Theme editor

🎨 Panache A Flutter Material Theme editor. Panache helps you to create beautiful Material themes for your Flutter applications. Customize widgets col

Jan 3, 2023

An Instagram like text editor Flutter widget that helps you to change your text style.

An Instagram like text editor Flutter widget that helps you to change your text style.

TextEditor An instagram like text editor widget for flutter Show some ❤️ and star the repo to support the project Features Edit TextStyle object font

Dec 16, 2022

FLUTTER API: Video Editor allows trim, crop, rotate and scale video with a super flexible UI Design

FLUTTER API: Video Editor allows trim, crop, rotate and scale video with a super flexible UI Design

video_editor My other APIs Scroll Navigation Video Viewer Helpers Features Super flexible UI Design. Support actions: Crop Trim Scale Rotate Cover sel

Dec 26, 2022

Umbra - visual editor for shaders in Flutter

Umbra Generated by the Very Good CLI 🤖 Umbra, visual editor for shaders in Flutter. Getting Started 🚀 This project contains 3 flavors: development s

Dec 14, 2022

Rich text editor for Flutter based on Delta format (Quill fork)

Visual Editor Visual Editor is a Rich Text editor for Flutter originally forked from Flutter Quill. The editor is built around the powerful Delta docu

Jan 7, 2023
Comments
  • Need export maxLines, and add Expaneded

    Need export maxLines, and add Expaneded

    Hi, in the desktop app, Need export maxLines, and add Expaneded.

    selectable_textfield.dart line 78 maxLines: null,

    If I need the editor full height, editor.dart line 330 add Expanded

    enhancement 
    opened by Leadrive 1
  • initializing in futurebuilder

    initializing in futurebuilder

    Hi, i cannot get this to work in FutureBuilder, any ideas? When testing RichTextEditor above FutureBuilder, it renders properly.

      final controller = HtmlEditorController();
    
      FutureBuilder<BookChapter>(
          future: DBProvider().getTranscript(s.mId as int),
          builder: (context, snapshot) {
            if (snapshot.hasData) {
              BookChapter bc = snapshot.data!;
              if (bc.content != null) {
                Container(
                  width: 500,
                  height: 500,
                  child: RichTextEditor(
                    alwaysShowButtons: true,
                    placeholders: [
                      RichTextPlaceholder("TEST"),
                    ],
                    controller: controller,
                    initialValue:
                        content,
                    onChanged: (String html) {
    
    opened by mirozahorak 1
Owner
Herry
Herry
The EasyRichText widget provides an easy way to use RichText.

easy_rich_text The EasyRichText widget makes the RichText widget easy. You do not have to split the string manually. This widget use regular expressio

hans.huang 55 Jan 4, 2023
Json editor - A json editor on flutter

Features Support add comment; Support show errors for invalid json text; Pretty

Chan Young 12 Nov 18, 2022
A Flutter widget for rendering HTML and CSS as Flutter widgets

flutter_html A Flutter widget for rendering HTML and CSS as Flutter widgets. Screenshot 1 Screenshot 2 Screenshot 3 Table of Contents: Installing Curr

Vishal Raj 1 Dec 15, 2021
A revolutionary new browser. HTML to Flutter transpiler. Written in Go (using Dart FFI) and Flutter.

Flutter Browser An experimental HTML & CSS to Flutter transpiler written in Go, using Dart FFI and Flutter. Screenshots Notice This works great for si

Mitja 12 Oct 24, 2022
Generate responsive pages and apps on HTML, Tailwind, Flutter and SwiftUI.

Figma to Code Most design to code plugins are bad, some are even paid. This project aims to raise the bar by generating responsive layouts in Tailwind

Bernardo Ferrari 2.8k Jan 4, 2023
Flutter package to render html as widgets that supports hyperlink, image, audio, video, iframe and many other tags.

HtmlWidget monorepo This repo contains the source code for everything HtmlWidget-related. Name Link flutter_widget_from_html_core flutter_widget_from_

Đào Hoàng Sơn 445 Jan 6, 2023
This library helps you to convert Delta to HTML. Based on Flutter_Quill Delta

Delta_To_HTML This library helps you to convert Delta to HTML. Based on Flutter_Quill Delta [ currently in under development ] Usage import 'package:d

Secanonm 4 Dec 20, 2022
WYSIWYG editor for Flutter with a rich set of supported formatting options. (WIP)

✨ rich_editor WYSIWYG editor for Flutter with a rich set of supported formatting options. Based on https://github.com/dankito/RichTextEditor, but for

Festus Olusegun 116 Dec 27, 2022
A Flutter material theme editor

Flutter Theme ⚠️ WARNING: This app is still under development so please expect bugs and missing features in the app. ⚠️ Inspired by Panache, a Flutter

null 0 Jan 2, 2022
A Flutter package that provides a WYSIWYG editor backed by flutter_inappwebview and the Summernote library.

Flutter Html Editor - Enhanced Flutter HTML Editor Enhanced is a text editor for Android, iOS, and Web to help write WYSIWYG HTML code with the Summer

Tanay Neotia 200 Dec 31, 2022