Skip to content

Ref method for copy to clipboard (EnrichedMarkdownText) #528

Description

@attila9654

Is your feature request related to a problem? Please describe.
I'm using this lib to present markdown text to the user. They are also able to copy it with a button under the EnrichedMarkdownText component, but I need to use another libs as well to remove the markdown format from the source text and to copy it to the clipboard.
The copy feature from the context menu is really useful, as it brings the rendered format as well (at least on iOS). It would be nice to have a ref method as well, so the whole text could be copied for example on a button press as mentioned above.

Describe the solution you'd like
Expose a copyToClipboard method from ref for the EnrichedMarkdownText component, so I can copy the content exactly as if a user selects all the content and press copy in the context menu.

Describe alternatives you've considered
For now, I am stripping the markdown format from the source text and copying that to the clipboard. Having this feature would allow me to remove 2 other dependencies (markdown stripping and copy to clipboard).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions