getSelectionText should take a parameter to replace line breaks with a given char
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 286
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
Sometimes you need to include line feeds in you selected text, so I it would be nice to do this:
const text = getSelectionText(editorState, "\n");
console.log(text);
And the result would be
> Dear Foo\nHow are you ?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the getSelectionText entry point and inspect how it currently handles line breaks. Use the example call in the issue to verify that the new parameter replaces line breaks with the supplied character and that the returned text matches the shown result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100