Table of Contents
ImgPaste Plugin
Compatible with DokuWiki
- 2024-02-06 "Kaos" yes
- 2023-04-04 "Jack Jackrum" yes
- 2022-07-31 "Igor" yes
- 2020-07-29 "Hogfather" yes
Similar to dropfiles
This plugin allows to insert images and any other media files by simply pasting them into the editor. This can be raw image data in the clipboard (eg. when copying from an image editor) or files selected in your file explorer.
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
Change Log
- Version upped (2024-11-21 23:51)
- use nicer data attribute (2024-11-21 15:05)
- Version upped (2024-11-20 23:51)
- correctly handle relative IDs when pasting HTML (2024-11-20 10:31)
- Prosemirror HTML handling (2024-11-19 10:58)
- Version upped (2024-10-21 23:51)
- Merge pull request #36 from cosmocode/relative (2024-10-21 17:56)
- Use new LinkWizard function to create relative links (2024-10-21 15:03)
Usage
Simply use CTRL-V
or whatever pastes on your system while having some image data or file data in the clipboard and editing a page. The media will automatically be uploaded and the media syntax is inserted at your current cursor position.
Prosemirror Support
This plugin also works when using the Prosemirror WYSIWYG editor. In addition to pasting images as described above, the plugin will also intercept pasting HTML. Any images referenced in the HTML will be downloaded and referenced as local media files in the pasted result.
Configuration and Settings
You can specify how image names are constructed. You should make sure the constructed name will be unique (by using the current time). In addition to strftime wildcards, the following placeholders can be used:
Placeholder | Description |
---|---|
@NS@ | Namespace of the currently edited page |
@ID@ | ID of the currently edited page |
@USER@ | Username of the currently logged in user |
@PAGE@ | Name of currently edited page without namespace |