Content-Length: 278307 | pFad | http://github.com/flutter/flutter/issues/109292

C6 flutter_markdown: give access to children · Issue #109292 · flutter/flutter · GitHub
Skip to content

flutter_markdown: give access to children #109292

@arielt

Description

@arielt

flutter_markdown: search (and highlight) rendered text

I want to search and highlight text in the Markdown widget.

Currently, it can be done in several nonideal ways:

  1. Preprocess input to Markdown(data: ..), making found text bold: **found text**. Highlight by setting style: MarkdownStyleSheet(
    strong: ...)
    This approach has drawbacks of highlighting all entries with the themed tag, not only searched ones. Also, simple preprocessing without taking context into account can break syntax elements: links, tables e.t.c.

  2. Create InlineSyntax, to locate searched text and insert node with a custom tag. Create MarkdownElementBuilder for the custom tag.
    This approach has a drawback of losing parent element style, as described in Flutter-markdown: Writing an inline sytax/builder for colored text #105571. Also, the text of elements like links seems to be unavailable for inline syntaxes and will not be found.

Proposal

flutter_markdown builds Markdown widget out of standard Flutter widgets. Giving access to children's widgets, especially with an ability to assign TextEditingController, may help to achieve search and highlighting goals.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: proposalA detailed proposal for a change to Flutterp: flutter_markdownflutter/packages flutter_markdownpackageflutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: http://github.com/flutter/flutter/issues/109292

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy