When I copy an existing table on another website that contains links, and paste that table into the copy/paste textarea, I want those links to be preserved. I have explicitly set the text format so links are allowed, yet the act of copying and pasting seems to remove the links I need.

I notice that when copying HTML into an application like Google Sheets, the links are preserved. I wonder if we can preserve links in our paste in the same way.

Comments

jenlampton created an issue. See original summary.

jenlampton’s picture

This is hard :/

jenlampton’s picture

Issue summary: View changes
jenlampton’s picture

Status: Active » Needs review
StatusFileSize
new2.58 KB

Here we go, let's give this a try.

lolandese’s picture

I have some difficulty to reproduce a reliable test case. This is what I did on the latest dev:

  • Applied the patch and cleared the cache.
  • Created a test table to copy/paste the output.
  • Copy pasted into Google Sheets and confirm links are preserved.
  • On the Edit page of a content type that contains a table field wit text format Full HTML I used the field Paste table data here and click Import & Rebuild.

Although the table is imported correctly (BTW an awesome feature) it is missing the necessary HTML thus the links after saving the node.

It looks like you a WYSIWYG active on your paste field? What do I miss?

jenlampton’s picture

Hm, I don't think you missed anything, those were the steps I followed almost exactly. I was testing on Firefox, and I wonder if it works differently in Chrome or other browsers. Which browser were you testing in?

lolandese’s picture

Indeed, Chrome.

lolandese’s picture

Status: Needs review » Needs work

Still missing the necessary HTML thus the links after saving the node on Chrome. Not tested on FF.

lolandese’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
liam morland’s picture

Status: Needs work » Closed (outdated)

Drupal 7 is no longer supported. If this applies to a supported version, please re-open.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.