Image Download Pattern
Release 3.0.0 and above, Release 2.9.3 and above.
Sets the default URL pattern of the images that downloadAndUploadImages() downloads and uploads again. (default: '')
The pattern is used only when downloadAndUploadImages() is called without the urlPattern argument. When the argument is given, the argument is used instead.
// synapeditor.config.js
{
'editor.download.image.pattern': '^https?://([^/]+\\.)?example\\.com/'
}
| Key | Type | Default | Description |
|---|---|---|---|
editor.download.image.pattern | string | RegExp | '' | URL pattern of the images to download. A string is read as a regular expression, so escape . and other special characters. |
| Configured content | Behavior |
|---|---|
urlPattern argument given | The argument is used. This setting is ignored. |
| No argument, this setting is set | This setting is used. |
| No argument, this setting is empty | downloadAndUploadImages() throws an error (Image download pattern not defined). |