AppFlowy-IO / appflowy-editor

A highly customizable rich-text editor for Flutter. The AppFlowy Editor project for AppFlowy and beyond.
https://pub.dev/packages/appflowy_editor
Other
389 stars 165 forks source link

[FR] Ability to edit placeholder text #800

Open chimon2000 opened 1 month ago

chimon2000 commented 1 month ago

Description

I would like the ability to edit the placeholder text that appears when adding a new paragraph or when creating a blank editor.

Impact

I am not using the editor in the context of a "notion" clone so I would like to be able to "label" the field, and hide the helper text that pops up for each paragraph.

Additional Context

No response

stevenosse commented 1 month ago

Hi @chimon2000

You can customize the default paragraph placeholder by doing:

 map[ParagraphBlockKeys.type] = ParagraphBlockComponentBuilder(
     configuration: BlockComponentConfiguration(
         placeholderText: (node) => 'Custom placeholder',
     ),
);

Or you mean customizing placeholder for each paragraphNode ?

chimon2000 commented 1 month ago

For the text that displays when I create an editor with an empty Delta.