Opened 16 years ago

Closed 16 years ago

#623 closed New Feature (wontfix)

Contextual image upload

Reported by: anonymous Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: SF Cc:



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

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:

Change History (2)

comment:1 Changed 16 years ago by Martin Kou

Reporter: changed from Martin Kou to anonymous

comment:2 Changed 16 years ago by Wojciech Olchawa

Resolution: wontfix
Status: newclosed

It's a great idea, but I don't think it would be suitable for FCKeditor. Maybe as plugin tough. We should leave handling the server files to administrators and the above method could probably give them less "power" over files.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy