vwatson Posted January 11, 2017 Share Posted January 11, 2017 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. Link to comment Share on other sites More sharing options...
vwatson Posted January 11, 2017 Author Share Posted January 11, 2017 It just happened again with the Purifier turned off. Link to comment Share on other sites More sharing options...
vwatson Posted January 11, 2017 Author Share Posted January 11, 2017 The last two times it's been on the first link in the first table cell. Can't remember if the earlier ones were in that same cell. Link to comment Share on other sites More sharing options...
adrian Posted January 11, 2017 Share Posted January 11, 2017 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 More sharing options...
vwatson Posted January 11, 2017 Author Share Posted January 11, 2017 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 More sharing options...
adrian Posted January 11, 2017 Share Posted January 11, 2017 Then go with child pages, or pull info from the file's description and tags fields. You could possibly put the date in the description and the type (Regular, Financial. etc) in the tags field. Link to comment Share on other sites More sharing options...
ryan Posted February 26, 2017 Share Posted February 26, 2017 @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 3 Link to comment Share on other sites More sharing options...
vwatson Posted February 27, 2017 Author Share Posted February 27, 2017 Thank you. Seems to have corrected the problem. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now