[Pushed] Image paste from clipboard broken
#5
(2016-06-29, 09:08 AM)Jan Rheinländer Wrote:
(2016-06-29, 08:55 AM)Euan T Wrote: Hi,

This is a known issue as far as I know. I'm not sure if there's a planned fix in the pipeline for now though I'm afraid.

Hi Euan,

I would be willing to try fixing it if someone can point me in the right direction (where is the issue being tracked? What is the problem about fixing it? Where do I find the relevant source code file)?

Jan

Hi,

The issue is being tracked here: https://github.com/mybb/mybb/issues/2440

We need to intercept the paste from the editor, to see that it's an image being pasted. I'm not sure if SCEditor (the editor we use) raises any kind of event for this or has a callback (if not, we need to open an issue there, but there haven't been any updates on that project in a very long time now and the primary contributor seems to have disappeared).

Once we intercept the image being pasted, the easiest thing to do is to probably create an attachment, which will need to be done via AJAX. That means a new action will be needed in xmlhttp.php to receive the data, create an attachment and return its ID to be associated with the new post.

It's a fairly large (and complex) issue which is why there's been nothing done about it up to now. It'll need a lot of testing too to ensure it works for multiple image formats. When it's come up before, I think the consensus has been that pasting images into the editor should be blocked in some way to prevent it from happening.
Reply


Messages In This Thread
RE: Image paste from clipboard broken - by Euan T - 2016-06-29, 08:55 AM
RE: Image paste from clipboard broken - by Euan T - 2016-06-29, 09:39 AM
RE: Image paste from clipboard broken - by .m. - 2016-06-29, 09:21 AM
RE: Image paste from clipboard broken - by Euan T - 2016-06-29, 12:46 PM
RE: Image paste from clipboard broken - by .m. - 2016-07-07, 03:06 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)