adding transformations (capitalization, mark add/remove) on the replaced text #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is a feature request.
In my editor I already implemented a search/replace, but now I'm converging to prosemirror-search, because it's better code and it's better working on a common ground.
In my implementation, I added the possibility to modify the replaced text in these ways:
changing the capitalization (lower and upper case, upper case the first letter of every word)
adding or removing one or more
MarkThe replaceCommand() could have a third optional argument, or an
optionsobject, specifying a list of changes (seeReplacedChangebelow) to be done to the replaced text.Something like this:
Just tell me if it makes sense, and I'll make a PR.
This seems too specific for this package. I'd recommend you implement your own custom replace command for it.