XF 2.1 Xenforo 2.1.9 cannot copy and paste to hotlink images from clipboard with image attachments turned off (worked in 1.5)

MMAcomm

Active member
As described here (I have investigated the reply, that does not solve this issue)

Desribed here with much confusion in the replies about the behavior. The issue is NOT attachments. Some of us turn attachments off for space/copyright reasons:



1.5 Behavior:
Turn off image attachments.
Users can right click an image from the web and select 'copy image' and the right click and paste it into the text box. This created an instant hotlinked image preview in the rich text editor. This was very useful for skipping additional steps of copying and pasting image URLs, clicking a drop down menu, pasting the URL. Many extra steps.


2.1.9 Behavior:
Turn off image attachments.
Right click 'copy image' from the web, right click 'paste' into the text editor. Nothing happens.


Is there a fix for this?
Is there a work around to avoid the copying and pasting URL text into image menu of the text editor? This is antiquated behavior and adds steps.


Thank you.
 
Last edited:

RallyFan

Active member
For big articles this, however, would not work as you would have to upload manually a big bunch of images and that’s actually tedious. Specially when we talk about big posts/articles.
I think one big thing is that it highly depends on what you are posting / your forum.

For most news and sports articles, pictures are a nicety but not really necessary (infact sometimes can distract from the article itself).

However for articles (lets say) that are trying to explain something (like say a step by step how to), pictures would be almost necessary.

For example recently a guy came onboard as a Xenforo customer and his board focuses on repairing hard drives and computers at a board level. So in this example we are talking about (and if they didn't allow images to be hosted directly), the issue could be quite problematic.

Whereas if they allow uploading of images the problem isn't a problem.

Part config related and part how you use the forum I guess.
 

Mike

XenForo developer
Staff member
It's not something you can directly change because it's part of minified JS. However, the fix is running here, so you should be able to replace your js/xf/editor-compiled.js file with the one here: https://xenforo.com/community/js/xf/editor-compiled.js?_v=c0a09d67 (Though I would only do that if you'r running a very recent version of XF 2.1, ideally 2.1.10.)

Note that I'd recommend going to <url>/install/ after replacing the file and rebuilding master data, as this should force a JS version update which will avoid any issues with the updated JS not being served as expected.
 

Zentral

Member
It's not something you can directly change because it's part of minified JS. However, the fix is running here, so you should be able to replace your js/xf/editor-compiled.js file with the one here: https://xenforo.com/community/js/xf/editor-compiled.js?_v=c0a09d67 (Though I would only do that if you'r running a very recent version of XF 2.1, ideally 2.1.10.)

Note that I'd recommend going to <url>/install/ after replacing the file and rebuilding master data, as this should force a JS version update which will avoid any issues with the updated JS not being served as expected.

Hello,

Thank you @Mike, this was definitely a lifesaver. It now works as intended (at least for us). Thanks for your amazing work and quick response. Maybe this should be posted somewhere for people to know. We noticed there were several people with the same issue scattered all over the forum.

Best regards,
Zentral.
 

Zentral

Member
Hello,

I'm sorry to revive this thread but I noticed the same inconsistency with the image bb code tags happens with color and size format tags when they are copied on the clipboard. Any formatting past the bold, italics, underlined tags is lost when copy pasting into the editor.
Is there maybe a way to fix this the same way the image BBCode tags were fixed? Maybe a workaround like the one @Mike provided earlier will also work for the formatting tags?

Regards,
Zentral
 

Zentral

Member
Hi,

Bumping this thread (sorry @Mike) because I feel like this issue is basically the same as the OP posted but with a different BBCode.
I'd rather have both answers in the seam thread than create a new one for the font options.

Regards,
Zentral
 

Mike

XenForo developer
Staff member
TBH, it really doesn't have any relation. But in most cases, styling is stripped out when pasting and this is intentional/expected.
 

Zentral

Member
TBH, it really doesn't have any relation. But in most cases, styling is stripped out when pasting and this is intentional/expected.
Hello,

Thanks for the input @Mike. Is it possible to find a workaround for this maybe? Like the one you found for images.

Thanks in advance and keep the good work!
Zentral.
 

Mike

XenForo developer
Staff member
There isn't really anything to workaround -- it's the expected behavior and it's mostly intentional. It's almost necessary with how some clipboard content is formatted (inline styling applied when you wouldn't have any expectation of it being there).

While you can make a suggestion, I think it's very unlikely that there will be any significant changes here.
 

Zentral

Member
Hi,

Oh, okay. I understand this could be as design but it’s unfortunate for us. Is there any possibility of modification of the editor-compiled.js file further to achieve this? Like the modification you sent us. Should we contact the modding community for an addon? Or is this something that support could help us with? Thanks again @Mike! You and the team are amazing.

Regards,
Zentral.
 
Top