【问题标题】:Flutter - How to get a text field with HTML tag for the end users as inputFlutter - 如何为最终用户获取带有 HTML 标记的文本字段作为输入
【发布时间】:2022-12-03 16:08:23
【问题描述】:

我有一个用户可以在文本字段中插入数据的移动应用程序。 我想给用户使用的可能性HTML标签撰写他们的“酷”描述(粗体文本、斜体等)。

我可以为用户做这样的事情吗? (见附图)

【问题讨论】:

标签: android flutter dart text


【解决方案1】:
html_editor_enhanced: ^2.5.0

核实

import 'package:html_editor/html_editor.dart';
HtmlEditorController controller = HtmlEditorController();

@override Widget build(BuildContext context) {
 return HtmlEditor(
controller: controller,
 htmlEditorOptions: HtmlEditorOptions(
  hint: "Your text here...",
 ), 
 otherOptions: OtherOptions(
);

【讨论】:

    猜你喜欢
    • 2020-08-31
    • 2021-09-26
    • 2019-07-22
    • 2021-03-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多