Jump to content

CKEditor Problem With Links in Table


vwatson
 Share

Recommended Posts

I'm adding links to meeting minutes in pdf format on a site. Four times so far, inserting a link to the pdf file using the ckeditor link icon has resulted in the editor placing the link outside of the table. 

I need to figure out what's going on as this will freak my client out if this happens when I turn the site over to them. :(

It happens after closing the link dialog box. The link is placed up above the table, rather than in the table cell where the text was initially.

For the textarea field I have ACF turned off and HTML Purifier turned on. I'll turn off the Purifier as well and see if it happens again.

The attached image shows the editor after the link is misplaced (the 1/11/2012 one). The text was initially in the first table cell.

Just wondering if anyone else has experienced anything like this or if you have a clue what's going on.

table-link-issue.jpg

Link to comment
Share on other sites

I would strongly recommend not doing this with an RTE  textarea - it is always going to be a mess :)

I would suggest building the table in your template file with the API. You can iterate through the PDFs in the files field, or use a repeater, or even child pages if you need more info for each PDF.

Let me know if you need some help with this.

Link to comment
Share on other sites

Yeah for their newsletter section, which was only 4 per year, I used a repeater. I just thought it would get pretty messy with a repeater for these since there's more of them. They sometimes have a few per month, so as many as 24+ per year.

Link to comment
Share on other sites

  • 1 month later...

@vwatson

I was able to duplicate this issue when selecting text in a <td> and dragging the selection a little bit past the actual text. What I found is that you've got to be really careful with the link selection in a table cell, or else CKEditor will include part of the <td> element in the selection. The result is that when inserting a link of that selection, you get an invalid link, which isn't allowed there, so CKE moves it above the table. So far I can't figure out how to automatically modify that selection to narrow it in, but I did figure out how to detect it and cancel the action. I've also set it to show an alert box telling you to re-try the selection. This at least prevents the insertion of the invalid link. Please replace your /wire/modules/InputfieldCKEditor/plugins/pwlink/ directory with the contents of the attached ZIP file. Do you find this also resolves the issue there? Thanks.

pwlink.zip

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...