moinwiki / moin

MoinMoin Wiki Development (2.0+), unstable, for production please use 1.9.x.
https://moinmo.in/
Other
303 stars 90 forks source link

Paste pictures in to the page from clipboard (CTRL+P) #112

Open ThomasWaldmann opened 12 years ago

ThomasWaldmann commented 12 years ago

Original report by Anonymous.


Please enable creation of pictures (attachments) directly out of clipboard in the GUI editor as a part of page content with CTRL+P in place of the following 3 step process:

We use wiki as knowledge management tool where we store a lot of user guides and manuals for software. And we want to encourage users to create/update them themselves but to achieve it we have to make it as user friendly as possible and one of first problems we faced is including graphics and screenshots using clipboard (CTRL+P)

ThomasWaldmann commented 12 years ago

Original comment by Reimar Bauer (Bitbucket: ReimarBauer, GitHub: ReimarBauer).


moin2 is different in the case of attachments and pages. We have only items. Thomas already mentioned that you can create an item by just drag and drop it to the index page. Why does someone first wants to copy it to a clipboard? Currently I don't know how a clipboard stores the data, e.g. is it mimetype encoded or is there a protocol, history available. We need some meta information (is that standadized by e.g. dublin core) for creating the item. If that all is given it may not too difficult to have an additional input method like the one we have for uploading on item modify now. We just need a way to get it by javascript for all browsers, e.g.

ThomasWaldmann commented 12 years ago

Original comment by Anonymous.


Dear All, Is any chance that this functionality will be provided any time soon? Regards Kamil

ThomasWaldmann commented 12 years ago

Original comment by Anonymous.


Dear All, I found following plugin description:

http://cksource.com/forums/viewtopic.php?f=18&t=23646

ThomasWaldmann commented 12 years ago

Original comment by Anonymous.


Hi, Two products that do this are Jira and Youtrack.

This is what I found in internet:

It's not impossible... it was done using another WYSIWYG editor (OpenWYSIWYG), but I'm sure it can be done with FCKEditor as well.

The only caveat is it's not entirely automated, but it's close enough that the users don't mind.

Here's how:

When a user pastes anything into the WYSIWYG box (detected by JavaScript), the editor scans the HTML and looks to see if there are any "FILE:\" .JPG, .GIF, or other image-type links.

If it finds one, it pops up a dialog box saying "Pasted Image detected - you must upload to the server". The box also includes an HTML File Upload box (which feeds a back-end ASP Image Uploader), and the URL to the image "FILE:\C:......" in text, just above the box. The instructions say "select the following text", then have a big blue arrow, then "Paste it here:" and the Upload box appears. Then there is another big blue arrow and the instructions "Then Press OK". We can't automatically put the image local URL into the upload box due to browser security features, but we CAN check to see if they copied and pasted the URL correctly.... and throw an error if not. This process automatically repeats for all the images detected in the WYSIWYG window.

One more quote from internet in python:

http://www.dahlsys.com/software/clipboard_upload/index.html

One more quote from internet:

Although this isn't what you had in mind, and until this sort of functionality gets addressed it does get rid of the need of having to create a new file every time:

One more quote from TWIKI page:

TWIKI solution: http://twiki.org/cgi-bin/view/Plugins/JavaPasteAddOn

One more quote from TinyMCE forum:

http://www.tinymce.com/forum/viewtopic.php?id=5585

One more quote from http://www.codeproject.com:

http://www.codeproject.com/KB/graphics/ClipboardActiveX.aspx

ThomasWaldmann commented 12 years ago

Original comment by Thomas Waldmann (Bitbucket: thomaswaldmann, GitHub: thomaswaldmann).


We use CKeditor as the GUI editor in moin2 (currently ONLY for text/html items, no GUI editor for wiki text yet).

I am not sure whether CKeditor supports inserting picture from clipboard (and how it interact with the server for such a case), can you provide more details about this?

In moin2, we currently support drag&drop uploading of one or multiple items on the index view, maybe this is easy and comfortable enough. We know that dealing with attachments is not very comfortable in moin 1.x and try to improve this.