﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
623	Contextual image upload	anonymous		"Hi!

FCKeditor is almost perfect. The only thing it seems to
me raises from feedback of people not really good at
playing with web pages: they have some difficulties with
the image upload/insertion.

Some time ago I began writing a WYSIWYG editor like
fck, but I actually dismissed that project. One thing it
was good at was the image insertion, that worked this
way (hard to program, but easy to use):

1) the user click on the ""Insert image button""

2) the editor become invisible

3) a new <INPUT type=""file""> is created and made visible

4) the user browses for an image in its computer and
click on an ""OK"" button

5) the <INPUT type=""file""> become invisible

6) the editor become visible

7) the image can be inserted into the editor (eventually
after a ""Image properties"" windows has been shown),
with a property that links it to the <INPUT type=""file"">
(for example via the image id)

8) the user goes on editing, eventually resizing the image

9) the user ask to save the page

10) every <INPUT type=""file""> that doesn't corresponds
to any image in the html page is deleted (for example
because the user has deleted an image in the page)

11) the HTML code and the <INPUT type=""file""> are
sent to the server

12) the server saves the received images

13) the server parses the received html, replacing the
SRC tag of the IMG uploaded to respect the new image
position

14) for the uploaded images, the server parses the <IMG
tag, reading the STYLE/WIDTH/HEIGHT tags to
determine the used image size. If it is different to that of
the saved image, the server resizes the images (in
through the gd library or through asp.net)

15) the server check if the page is a new page or a pre-
existing-one. In this case, it verify the new html code to
see if some older uploaded image is no more in use; if
so, it deletes the unused images


Well, quite difficult to program, but I have already done it
(in php and making use of mysql), and it works great.
The feeling for the user is pretty like using the well-
known Word, even if the feeling of the programmer is like
entering the hell when managing these procedures.
One important thimg to consider is that the value of the
<INPUT type=""file""> can't be set programmatically
because of security, but it can be made visible/invisible.
----
Moved from SF:[[BR]]
http://sourceforge.net/tracker/index.php?func=detail&aid=1164621&group_id=75348&atid=543656"	New Feature	closed	Normal		General		wontfix	SF	
