1.8 image upload/embed issue on TinyMCE

First, thx Brett for this great work!

Ive installed 1.8 and i testing around and found that i cant embed/upload a file when i using the "embed content" link on the upper right corner of the tinyMce Editor. The windows popup well but then i get the message "no items found", the same message on the tab upload!
i uploaded a file and tested again but the same message is shown...

Can someone confirm this issue or did i set the permisson wrong or something else?


  • Anyone else embed images pass to tinymce like small ?

    What am I doing wrong?


  • @Alexgon: unfortunately, Elgg 1.8 embeds the small thumbnail of images into tinymce postings. This is different to Elgg 1.7 where the embed plugin embedded/linked the full-size image into the postings. I don't know what's the sense in including the thumbnail either - maybe to prevent the image to extend the text area in case it is too large. You would need to modify the embed plugin code to get back the old behaviour of Elgg 1.7.

  • Thanks iionly, Can you tell me what function or code I need to change, please?

  • It seems it's not completely simple to change the behaviour. In the file mod/embed/views/default/embed/item.php line 37

    $image = elgg_view_entity_icon($entity, 'small', array('link_class' => 'embed-insert'));

    the size of the embedded image is defined. You can replace 'small' with 'medium' or 'large' to get larger sizes of the images inserted. So far, so easy. Unfortunately, the same piece of code also sets the size of the image preview in the embed item selection list. So, you will also get 'large' previews here and here surely 'small' would be better.

    You could also get the larger versions of the images in the postings without changing the code, if you edit the html embed code after you have embedded an image before saving the posting. If you click on the HTML button in the tinymce edit options you'll see the embed code. Here you can also replace 'small' with either 'medium' or 'large'. Surely this is also not a perfect solution at all - especially for normal site visitors, but without some more recoding in the embed plugin, there's no other solution that the two described.

  • The embedded image can be simply resized afterwards by dragging the handles. However it *is a thumbnail that is displayed - small, medium, large. Could call this a sort of a 'feature-wise bug' in the PlugIn -- but it really a design issue -- it's designed one way and some people want it another way & if we don't like the way Elgg/PlugIns does things.. we change the code to suit our wants ;) :=
    $ImageSize='small'; //:DC:
    if(elgg_get_context()=='embed') //:DC:
        $ImageSize='large'; //:DC:
    $image = elgg_view_entity_icon( $entity, $ImageSize //:DC:
        ,array( 'link_class'=>'embed-insert' ) );
    echo elgg_view_image_block($image, $body);
    -- gives the large thumbnail for the Embed View in context 

    'Feature-wise Bug' :-)
    I said that because need to look at rational of the code -- Using 'Embed Content' --> gives thumbnail in content and Links to Original Image <a href="http://localhost/elgg1810/file/view/999xxxx"><img class="elgg-photo " src="http://localhost/elgg1810/mod/file/thumbnail.php?file_guid=62&amp;size=large" border="0" alt="Image-xxxx" width="379" height="379" /></a> -- Content does link to original - if the viewer wants to see that. And so - we just needed to put thumbnail in initial content itself.

  • Thank you iionly and DhrupDeScoop.

    As a temporary solution is useful to me.
    I will continue investigating to get embed list thumbnails and
    tinymce large images.

  • I will look closer at those code changes I tested with before - to see what more can be done to make the embedding thingy smoother and more useful..


Feedback and Planning

Feedback and Planning

Discussions about the past, present, and future of Elgg and this community site.