Page MenuHomePhabricator

Allow directly upload files while using TinyMCE
Closed, ResolvedPublic

Description

I would be really nice if I could directly upload files while using TinyMCE. At the moment it says its not supported.

Like when I copy my manuals from local into the wiki I have to put every single image one by one. Maybe combine it with for example the extension ClipUpload.

Is this possible to add?

Greets
Yaron

Event Timeline

• Aklapper renamed this task from Is it possible to use direct upload while using TinyMCE? to Allow directly upload files while using TinyMCE.Mar 3 2020, 8:46 PM
• Aklapper removed Yaron666 as the assignee of this task.
aoxomoxoa subscribed.

Helo Yaron
Thank you for your request, this is indeed a very important feature for the TinyMCE extension. In fact it used to be that one could drag/drop or copy/paste from an HTML source into the TinyMCE editor and it would automatically upload all the images.
Somewhere along the line I must have made a change which has broken that feature, so I will try to fix it and post here when I'm done.
There is a separate problem with drag/drop copy/paste from HTML into the TinyMCE editor. This is because the copy/drag part of the operation doesn't pick up the CSS definitions for the classes in the html being copied/dragged. As a result what is pasted/dropped in the TinyMCE editor may not 'look' like the source document.
This may not be a problem for you, especially if your source document is a local wiki. I will fix the upload and then we can see if this fixes the issue for you?
Alternatively, if you are looking to transfer the content of a local wiki to a remote one, then there are other options for doing that (see, for example here). Bulk transfers of pages and files between wikis is a little outside the scope of the TinyMCE extension. If you need help on doing that it might be advisable to ask on the MediaWiki-l mailing list, where you will get much better advice than I can give!
Otherwise, check back and I will post here when I've fixed the drag/drop copy/paste upload feature of TinyMCE
Kind regards, Duncan

Thank you. Thats far more than I was expecting. :)

Greets
Yaron

Change 579865 had a related patch set uploaded (by Duncancrane; owner: Duncancrane):
[mediawiki/extensions/TinyMCE@master] images: fixes to dropping, pasting and uploading images

https://gerrit.wikimedia.org/r/579865

Hi Yaron
I just added a patch to Gerrit with a fix for this. It will need to reviewed and accepted before the change is made to the master branch. However, if you'd like, or need, to try it sooner you can download the pactch from the link in the gerritbot comment above.
I hope it works well for you, but do note the comment about css above as things may not look exactly as you'd expect after the drop/paste.
B.T.W. did you notice their is an 'image upload' button of the TinyMCE menu bar if you just wish to upload a file from your local disk or a URL?
Hope you are enjoying the extension and please do let me know if you've any other suggestions/comments.
Kind regards, Duncan

Change 582095 had a related patch set uploaded (by Duncancrane; owner: Duncancrane):
[mediawiki/extensions/TinyMCE@master] Merge branch 'master' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TinyMCE into March-2020

https://gerrit.wikimedia.org/r/582095

Change 579865 abandoned by Yaron Koren:
images: fixes to dropping, pasting and uploading images

Reason:
Superseded by 582095.

https://gerrit.wikimedia.org/r/579865

Change 579865 restored by Yaron Koren:
images: fixes to dropping, pasting and uploading images

Reason:
Maybe this is needed?

https://gerrit.wikimedia.org/r/579865

Change 579865 merged by jenkins-bot:
[mediawiki/extensions/TinyMCE@master] images: fixes to dropping, pasting and uploading images

https://gerrit.wikimedia.org/r/579865

Change 582095 abandoned by Duncancrane:
[mediawiki/extensions/TinyMCE@master] Fixes to dropping, pasting and uploading images, replace userCan(), etc.

Reason:
This has been achieved by another patch

https://gerrit.wikimedia.org/r/582095