diff --git a/docs/IMAGES.md b/docs/IMAGES.md new file mode 100644 index 00000000..ec4be8ed --- /dev/null +++ b/docs/IMAGES.md @@ -0,0 +1,28 @@ +# Image support + +Mark Text can automatically copy your images into a specified directory or handle images from clipboard. + +### Upload to cloud using selected uploader + +Please see [here](IMAGE_UPLOADER_CONFIGRATION.md) for more information. + +### Move to designated local folder + +All images are automatically copied into the specified local directory that may be relative. + +**Prefer relative assets folder:** + +When this option is enabled, all images are copied relative to the opened file or the root directory when a project is opened. You can specify the path via the *relative image folder name* text box. The local resource directory is used if the file is not saved. + +NB: The assets directory name must be a valid path name and Mark Text need write access to the directory. + +Examples for relative paths: + +- `assets` +- `../assets` +- `.`: current file directory +- `assets/123` + +### Keep original location + +Mark Text only saves images from clipboard into the specified local directory. diff --git a/src/main/preferences/schema.json b/src/main/preferences/schema.json index f0010599..0e447886 100644 --- a/src/main/preferences/schema.json +++ b/src/main/preferences/schema.json @@ -355,6 +355,16 @@ ], "default": "path" }, + "imagePreferRelativeDirectory": { + "description": "Image--Whether to prefer the relative image directory.", + "type": "boolean", + "default": false + }, + "imageRelativeDirectoryName": { + "description": "Image--The relative image folder name.", + "type": "string", + "default": "assets" + }, "sideBarVisibility": { "description": "View--Whether the side bar is visible.", "type": "boolean", diff --git a/src/renderer/components/editorWithTabs/editor.vue b/src/renderer/components/editorWithTabs/editor.vue index 0694b54b..e22d41cd 100644 --- a/src/renderer/components/editorWithTabs/editor.vue +++ b/src/renderer/components/editorWithTabs/editor.vue @@ -74,9 +74,11 @@