plugins.clipboard-image.settings.default.affix
String that sandwiches the image’s path.
Type: null or string or raw lua code
Default:
null
Plugin default:
default
: "{img_path}"
markdown
: "![]({img_path})"
Example:
<div class="mdbook-alerts mdbook-alerts-note">
<p class="mdbook-alerts-title">
<span class="mdbook-alerts-icon"></span>
note
</p>
```nix
# You can use line break escape sequence
affix = "<\n %s\n>";
```
</div>
> ```nix
> # Or lua's double square brackets
> affix.__raw = \'\'
> [[<
> %s
> >]]
> \'\'
> ```
Declared by:
plugins.clipboard-image.settings.default.img_dir
Directory name where the image will be pasted to.
note
If you want to create nested dir, it is better to use table since windows and unix have different path separator.
Type: null or string or list of string or raw lua code
Default:
null
Plugin default: "img"
Declared by:
plugins.clipboard-image.settings.default.img_dir_txt
Directory that will be inserted into text/buffer.
Type: null or string or list of string or raw lua code
Default:
null
Plugin default: "img"
Declared by:
plugins.clipboard-image.settings.default.img_handler
Function that will handle image after pasted.
note
img
is a table that contain pasted image’s {name}
and {path}
.
Type: null or lua function string
Default:
null
Plugin default: "function(img) end"
Declared by:
plugins.clipboard-image.settings.default.img_name
Image’s name.
Type: null or string or raw lua code
Default:
null
Plugin default:
{
__raw = "function() return os.date('%Y-%m-%d-%H-%M-%S') end";
}
Declared by: