Ticket #180 (new enhancement)

Opened 1 year ago

Last modified 10 months ago

Image preview in tinymce

Reported by: simontol Assigned to: misja
Priority: normal Milestone: 0.9.2
Component: new functionality Version: 0.9.0
Severity: normal Keywords:
Cc: renato Patch Included: 1
Review Stage: accepted

Description

Image should be added to the wysiwyg editor instead of {{file x}} tag. Without this it isn't wysiwyg at all...

Attachments

tinymce_images_list_and_preview.diff (1.8 kB) - added by renato on 01/26/08 05:15:41.
Mozilla_Firefox.png (12.8 kB) - added by simontol on 01/27/08 11:08:58.

Change History

12/08/07 09:52:10 changed by simontol

  • owner deleted.
  • component changed from core to new functionality.

A better image/file uploader is needed too. It could take example from Wordpress. I've tested several CMS's Editor/Uploader, like Joomla, Drupal, Wordpress, Xoops etc, and asked some friend of mine, who are computer newbies, to choose the one they like. The response was Wordpress, because the image/file uploader is embedded into the editor page and displays preview of the uploaded images before (and after) these are added to the content. They do like the simple editor bar with not so much buttons, so the one in Elgg now is good as it is. Please take this as a suggestion for the incoming releases, not as a "hurry up" ;-)

Sorry for the bad english,that is a little rusted, hope you understand anyway...

01/24/08 20:51:51 changed by ewout

  • cc set to renato.
  • owner set to misja.
  • haspatch changed.
  • review_stage set to accepted.

Maybe we can look at some tinymce plugin which we may be able to integrate with the file upload mechanism?

01/26/08 05:15:41 changed by renato

  • attachment tinymce_images_list_and_preview.diff added.

01/26/08 05:26:25 changed by renato

  • haspatch set to 1.
  • version set to 0.9.0.
  • milestone set to 0.9.2.

The tinymce_images_list_and_preview.diff patch adds an images list to the "insert/edit image" pop-up. This list consists of the files owned by the user (including those uploaded to communities) which are identified (based on filename extension) as image.

It's not integrated in any way with the "add file" button nor provides any way to upload images, but it's a start. The big point is that image previews are showed.

Please test.

(follow-up: ↓ 6 ) 01/26/08 11:23:45 changed by ewout

Very nice! I usually upload files without titles, and that confused me for a bit (empty strings in the tinymce image dialog). I think that either we should implement the proposal of #248 (at upload time use filename for title) or check in this patch wether the title is empty and then use the filename.

Will test on IE in a moment.

01/26/08 16:19:12 changed by simontol

@renato: I've applied the patch but I've seen no difference. Can you provide a demo link or a screenshot of what I have to expect from your patch?

(in reply to: ↑ 4 ) 01/26/08 19:11:37 changed by ewout

Replying to ewout:

Will test on IE in a moment.

Seems to work ok on IE7.

@simontol: you need some image files in your file storage. The tinymce image insert dialog will present these files to you.

01/27/08 11:08:58 changed by simontol

  • attachment Mozilla_Firefox.png added.

(follow-up: ↓ 8 ) 01/27/08 11:11:59 changed by simontol

@renato: It seems not to work here I've tried both FF2.0 and IE6. This is what I do: 1. Uploaded some images with the upload dialog in "Your Files" Page. 2. Went to "Your Blog" and choose "Post a new Entry" 3. Clicked on the "insert/edit image" icon (the one with the Tree) 4. A new window appeared, no images preview in it...

Attached a screenshot of the insert/edit image dialog. http://elgg.org/trac/attachment/ticket/180/Mozilla_Firefox.png Am I doing something wrong? I'm using Elgg-0.9 updated from svn.

(in reply to: ↑ 7 ) 01/27/08 16:23:41 changed by renato

Replying to simontol:

Am I doing something wrong?

No, you did everything right, maybe I didn't explain very well. What the patch does is insert the "Image List" drop down in that new window, from where you can choose between the images you uploaded. Once you insert one, it'll be displayed in the post (as an image, not as {{file:N}}).

01/27/08 17:28:27 changed by simontol

OK I've got it now! ;-) Good work. Sorry for the misunderstanding...