Skip to content

Griboedow/SimplePasteImage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimplePasteImage is an extension which allows to automatically upload images when you copy-paste something on a wiki page in VisualEditor.

MediaWiki page: https://www.mediawiki.org/wiki/Extension:SimplePasteImage

Installation

  • Allow uploads from external URLs by specifying $wgAllowCopyUploads = true; in LocalSettings.php
  • Download and place the file(s) in a directory called SimplePasteImage in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php file: wfLoadExtension( 'SimplePasteImage' );
  • Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Simple demo

Simple gif to show how it works: SimplePasteImage

Todo list

It is a PoC for now. We havea big list to do:

  • Check behaviour on re-upload deletd file
  • Error reporting
  • Wait form
  • Test paste when copy from local apps (Word?). Likely we cannot paste images in this case but
  • Test older MWs (oldest supproted?). Looks like we can make it very generic (we need ot modify buffer only).
  • Enable when pasting one file
  • Fix image URLs, make it so image is not a link to its file
  • Test what if copy-paste images from VE of the same wiki
  • ...
  • Ofc refactoring. Currently it is a mess, I wanted to see if the idea works at all

Nevertheless, it works in simple scenarios

About

Auto-upload images on paste

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors