flutter_widget_from_html icon indicating copy to clipboard operation
flutter_widget_from_html copied to clipboard

How to handle the first line indentation

Open SinglTown opened this issue 1 year ago • 1 comments

Adding    before text is effective, but when setting the paragraph alignment to justify,    becomes ineffective. Is there another way to set the first-line indentation for paragraphs?

String htmlContent = ''' <p>test content test content test content test content test content test content test content test content test content</p> '''; return Scaffold( appBar: AppBar( backgroundColor: Theme.of(context).colorScheme.inversePrimary, title: Text(widget.title), ), body: SelectionArea( child: HtmlWidget( htmlContent, customStylesBuilder: (dom.Element element){ Map<String,String>? style = {}; element.innerHtml = '&emsp;&emsp;${element.innerHtml}'; style['text-align'] = 'justify'; return style; }, ), ) );

SinglTown avatar May 14 '24 02:05 SinglTown

We probably need text-indent support for that, see #196.

daohoangson avatar Jun 10 '24 13:06 daohoangson