html_editor_enhanced 2.6.0 ->Text input does not appear when using the editor as a custom widget in FlutterFlow

Troubleshooting

Hello,

I am using the html_editor_enhanced package as a custom widget in FlutterFlow. The toolbar buttons and all UI elements appear correctly, but the text input area does not show up, and I am unable to type or delete text.

Steps to Reproduce:

  1. Register html_editor_enhanced as a custom widget in FlutterFlow.

  2. Implement the editor with a basic setup (e.g., adding the toolbar and enabling text input).

  3. Run the project in FlutterFlow or on an emulator.

  4. The editor UI appears, but the text input field is missing, and text cannot be typed.

What have you tried so far?
// Automatic FlutterFlow imports
import '/backend/backend.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/widgets/index.dart'; // Imports other custom widgets
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom widget code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!

import 'package:html_editor_enhanced/html_editor.dart';

class HtmlEditorWidget extends StatefulWidget {
  const HtmlEditorWidget({
    super.key,
    this.width,
    this.height,
  });

  final double? width;
  final double? height;

  @override
  State<HtmlEditorWidget> createState() => HtmlEditorWidgetState();
}

class HtmlEditorWidgetState extends State<HtmlEditorWidget> {
  final HtmlEditorController _controller = HtmlEditorController();
  String savedHtml = ""; // ์ €์žฅ๋œ HTML ๋‚ด์šฉ

  @override
  Widget build(BuildContext context) {
    return Container(
      width: widget.width ?? double.infinity,
      height: widget.height ?? 400,
      padding: const EdgeInsets.all(10),
      decoration: BoxDecoration(
        border: Border.all(color: Colors.grey),
        borderRadius: BorderRadius.circular(8),
      ),
      child: Column(
        children: [
          // HTML Editor
          Expanded(
            child: HtmlEditor(
              controller: _controller,
              htmlEditorOptions: HtmlEditorOptions(
                hint: "์—ฌ๊ธฐ์— ์ž…๋ ฅํ•˜์„ธ์š”...",
              ),
              otherOptions: OtherOptions(
                height: widget.height ?? 300,
              ),
            ),
          ),
          const SizedBox(height: 10),
          // ์ €์žฅ & ๋ถˆ๋Ÿฌ์˜ค๊ธฐ ๋ฒ„ํŠผ
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceAround,
            children: [
              ElevatedButton(
                onPressed: () async {
                  String? html = await _controller.getText();
                  setState(() {
                    savedHtml = html ?? "";
                  });
                  print("์ €์žฅ๋œ HTML: $savedHtml");
                },
                child: Text("์ €์žฅ"),
              ),
              ElevatedButton(
                onPressed: () {
                  _controller.setText(savedHtml);
                },
                child: Text("๋ถˆ๋Ÿฌ์˜ค๊ธฐ"),
              ),
            ],
          ),
        ],
      ),
    );
  }
}
Did you check FlutterFlow's Documentation for this topic?
No
1