-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FR] custom replacement to modify selectedText #77
Comments
As "Use of eval is strongly discouraged", this plugin will only support custom replacement. For now, only replace one pattern for each command, i.e., If the user wants to replace multi-patterns in one command, the user can modify Example
"customReplaceList": [
{
"name": "test",
"data": [
{
"search": "\\n",
"replace": "\\n\\n"
},
{
"search": "manually add second search",
"replace": "manually add second replace"
},
]
}
], The configuration works like text.replace(/\n/g, "\n\n")
.replace("manually add second search", "manually add second replace"); |
Related work
Custom replacement should add a subpart, advanced custom replacement, for custom js |
The js code can be written in a textarea, the content will be
eval()
in the plugin.The text was updated successfully, but these errors were encountered: