ID |
Date |
Icon |
Author |
Author Email |
Category |
OS |
ELOG Version |
Subject |
67746
|
Mon Jan 12 23:26:18 2015 |
| Eric Quintero | ericq@caltech.edu | Bug report | Mac OSX | 3.0.0 | Problem with embedded Iframes | We've upgraded our ELOG installation to v3, and we really like the new CKeditor. However, one of my users has noticed a problem when using Iframe HTML elements with CKeditor; namely that the HTML is not present when trying to edit the post, and saving the post erases the HTML.
I was able to reproduce this fairly simply, by trying to embed a youtube video. I would create a new post, click the "Source" view in CKeditor, and paste something like the following:
<iframe width="420" height="315" src="//www.youtube.com/embed/RzZgFKoIfQI" frameborder="0" allowfullscreen></iframe>
Upon submission, this produces a totally normal .log file in the logbook directory, and the video is viewable on the ELOG page:
Date: Mon, 22 Dec 2014 15:52:20 -0800
Author: test
Type: General
Category: General
Subject: test
Attachment:
Encoding: HTML
========================================
<iframe width="420" height="315" src="//www.youtube.com/embed/RzZgFKoIfQI" frameborder="0" allowfullscreen></iframe>
Then, upon hitting "Edit," I am greeted by a totally empty CKeditor window, and hitting "Source" does not display the original HTML.
Any help is greatly appreciated!
PS: Including the first line of the logfile in this very post would cause the submitted post to be truncated for some reason, although the preview looked fine. Pasting it here also caused the log to end abruptly. The string is "(dollar sign)(at symbol)MID(at symbol)(dollar sign): 9" |
67769
|
Mon Jan 26 23:13:47 2015 |
| Eric Quintero | ericq@caltech.edu | Question | All | 3.0.0 | Link to full resolution image attachments | Hi all,
It's possible my question is entirely within the domain of CKeditor, but I figure it may also have something to do with how it's plugged into ELOG.
In essence, when attaching a PDF to an ELOG post as an image, the post body shows the generated thumbnail and there is a link to the full resolution PDF at the bottom of the post.
However, if instead, I attach a JPG or PNG, the link to the full resolution image is not present in the post (though it can be accessed through the small paperclip icon).
Is there a way to show links to the thumbnailed images, or even for the thumbnail itself to be a hyperlink to the full resolution source?
Thanks for your time,
Eric Q. |
67775
|
Wed Jan 28 17:18:08 2015 |
| Eric Quintero | ericq@caltech.edu | Question | All | 3.0.0 | Re: Link to full resolution image attachments |
Stefan Ritt wrote: |
Strange. If I attach a big image to this post (see below), I see the thumbnail, but when I click on it it, I get redirected to the full resolution image. No idea why it is not working for you.
|
Sorry, I wasn't sufficiently clear. The issue I mentioned only applied to images that are inlined in the body of the post using the "Image" button in the CKeditor toolbar.
Oddly enough, on this logbook, I am not able to upload an image in that way; after selecting the image and pressing "Send it to the Server," nothing happens. |
67793
|
Fri Jan 30 22:45:02 2015 |
| Eric Quintero | ericq@caltech.edu | Question | All | 3.0.0 | Re: Link to full resolution image attachments | Since I am unable to attach an image to this logbook, I made a post over the the Linux Demo logbook showing an image that was uploaded with the CKeditor toolbar "Image" button that doesn't link to the full resolution image.
Incidentially, Dario Milicic's recent commit to the git repository (83a10a5), adds the exact functionality I'm looking for to drag-and-drop attachments with the "dndfiles" CKeditor plugin. I've looked througe the "image2" code myself, but I don't have much experience with javascript, and haven't figure out how to do the equivalent for that plugin.
Thanks for your time. |
67800
|
Wed Feb 4 08:51:37 2015 |
| Eric Quintero | ericq@caltech.edu | Question | All | 3.0.0 | Re: Link to full resolution image attachments | You make a valid point!
My perspective is from my lab's specific use case, in which we often post plots of data in the body of the text, and it is useful for the ELOG-generated thumbnails to link to the full resolution plot. In previous versions, I believe this was the behavior. It would be convenient for my users if this continued to be the case, but I understand that it is not neccesarily the appropriate default behavior for all users of ELOG.
Andreas Luedeke wrote: |
If you add the picture in the HTML editor, then you can add any link you like.
I don't see why the specific link to the full resolution picture should be the default.
If you want to have it, why not just add it by hand?
I took the liberty to edit your Linux Demo post accordingly.
For attachments that is a completely different story, since you cannot add any links there, only ELOG can do this for you
|
|
68080
|
Wed Aug 12 23:44:16 2015 |
| Eric Quintero | ericq@caltech.edu | Question | All | 3.0.0-70b274b | Show attachments = 0 | I have "Show attachments = 0" set in [global], but attachments are shown in the "Full" view. Is this the intended behavior? Looking at individual entries correctly hides the attachments.
We use inline images often, so when an attachement is shown at the bottom of a post it is effectively a duplicate, which clutters things up a bit. |
68105
|
Mon Aug 31 17:14:08 2015 |
| Eric Quintero | ericq@caltech.edu | Question | All | 3.0.0-70b274b | Re: Show attachments = 0 | The automatic hiding behavior is what I'm after, and I've discovered that it is only a problem for PDF attachments. I have reproduced this on the demo logbook on git revision f828049.
I've taken a look at the source you mentioned, but as far as I can tell, it is just looking for the opening of the img tag in the HTML source, and I'm not sure why that is different for a PDF. |
68146
|
Fri Oct 16 00:24:50 2015 |
| Eric Quintero | ericq@caltech.edu | Question | All | 3.0.0-70b274b | Re: Show attachments = 0 | Hm, looking through the source, there are many many places where PDF files are treated differently than strictly image filetypes (PNG, etc.). This makes sense in the context of multi-page documents.
Still, I like using PDFs for vector plots... I suppose I should also confess to the following modification I've made to my ELOG for treating PDFs like images in drag-and-drop uploading.
--- a/scripts/ckeditor/plugins/dndfiles/plugin.js
+++ b/scripts/ckeditor/plugins/dndfiles/plugin.js
@@ -142,7 +142,7 @@ CKEDITOR.plugins.add( 'dndfiles', {
return;
if(src.indexOf(".png") >= 0 || src.indexOf(".jpg") >= 0 || src.indexOf(".jpeg") >= 0
- || src.indexOf(".gif") >= 0 || src.indexOf(".svg") >= 0) { // This is an image
+ || src.indexOf(".gif") >= 0 || src.indexOf(".svg") >= 0 || src.indexOf(".pdf") >= 0) { // This is an image
html += '<a href = ' + src + '><img src = "' + thumb + '">' + '</a>';
} else { // this is not an image
// Server appends 14 characters in front of the name so we should remove them
|
|