ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old June 13th, 2002, 11:02 AM
CTretina CTretina is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 9 CTretina User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to CTretina Send a message via Yahoo to CTretina
Lightbulb WYSIWYG Editor and Image Uploading

To all who may be interested:

I recently read Mitchell Harper's excellent series of articles entitled "Building a WYSIWYG HTML Editor," and thought of one useful addition: is it possible to modify the editor so that the user could insert locally-stored images, have those images display in the editor, and then have the editor upload those images to the server on submission? Obviously, with this change in place, the editor could successfully emulate the functionality of, say, Microsoft FrontPage!

I'm not sure what sort of implications this would have, but I'd appreciate any comments, questions, suggestions, etc. relating to this topic. Thank you for your time and have a good one.

Reply With Quote
  #2  
Old June 13th, 2002, 11:15 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
the best way is to have a image center, where you can upload delete and view images, the you select a image and with a bit of javascipt add it to your editor, im not sure how you would do this in asp.

Reply With Quote
  #3  
Old June 14th, 2002, 10:04 AM
PabstER PabstER is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2002
Posts: 26 PabstER User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hey,
Well Mitch wrote those article and saved some of the "good stuff" for our software product, ConMan. For an idea on how to setup an image manager, checkout www.contentconcepts.com/onlinedemo.php, which is where you can try conman and see how it works, etc

you should be able to get some nice ideas from it.

Reply With Quote
  #4  
Old June 15th, 2002, 08:51 PM
Kiwi Kiwi is offline
Guru-in-training
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2002
Location: Not where I want to be...yet!
Posts: 38 Kiwi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Re: WYSIWYG Editor and Image Uploading

Quote:
Originally posted by CTretina
To all who may be interested:

I recently read Mitchell Harper's excellent series of articles entitled "Building a WYSIWYG HTML Editor," and thought of one useful addition: is it possible to modify the editor so that the user could insert locally-stored images, have those images display in the editor, and then have the editor upload those images to the server on submission? Obviously, with this change in place, the editor could successfully emulate the functionality of, say, Microsoft FrontPage!

I'm not sure what sort of implications this would have, but I'd appreciate any comments, questions, suggestions, etc. relating to this topic. Thank you for your time and have a good one.


If you want to get into the nuts and bolts of asp, I'd suggest having a look at this product, which is a free asp based file manager : http://www.iisworks.com/fileman/

And, of course, check out ConMan.

Alternatively, if you're interested in learning a new technology, try ASP.NET, which has a pretty good native method built in now, so you don't have to muck about with vbscript classes any more.


Reply With Quote
  #5  
Old June 17th, 2002, 04:02 AM
ta6rma ta6rma is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: N.E. England
Posts: 2 ta6rma User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Yes I have done this in ASP for a content management system I developed for our intranet here. I use ASPUpload but it is possible to do it with free components.
Summary:
You need to add a button to the editor that opens another window, containing a file upload field. This will browse the local PC for the image, & upload to a specified directory. Once this is done, you close the new window & pass the url of the image back to the editor with a query string - then the editor will display the image, and when you save, the image will appear in the web page as normal.
I can dig out the code if anyone wants any more details.
Rich

Reply With Quote
  #6  
Old November 26th, 2002, 05:36 AM
marc.nard marc.nard is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 5 marc.nard User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 36 sec
Reputation Power: 0
hi ta6rma (rich)
I've read your suggestion (I'm working with PHP) but I don't understand what do you mean when you say "you close the new window & pass the url of the image back to the editor with a query string". Can you show the related code please

Reply With Quote
  #7  
Old November 26th, 2002, 07:42 AM
ta6rma ta6rma is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: N.E. England
Posts: 2 ta6rma User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi Marc
I've done a version in both ASP and PHP so should be able to help you.
In my editor, the 'insert image' button opens a new window containing a file upload field, the user browses for a file & uploads it.
After a successful upload this code executes:

header("Location:upload_done.php?src=".$uploadedfile_name);

which sends the filename to a new page.
This page is as follows:
<html><head>
<script language="javascript">
// get id of the uploaded image from query string...
<?php echo "var imgSrc='".$HTTP_GET_VARS['src']."'";?>
// ...pass url to the insert routine in the editor...
opener.insertImage(imgSrc);
// ...and close (return to the editor window)
self.close();
</script></head><body></body></html>

This calls the insertImage() function in the main editor window:

function insertImage(imgName){
if (imgName !=null) {
imgSrc = imgPath+imgName;
doFormat('InsertImage', imgSrc);
}
}

in my editor, doFormat() runs the execCommand functions.
You will have to define the variable imgPath to point to your uploads directory.

hope this helps
Rich

Reply With Quote
  #8  
Old August 5th, 2003, 12:06 PM
amuller24 amuller24 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 19 amuller24 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi

ta6rma u have email

I am interested in learning how to implement this in ASP.

Many Thanks

Allan

Reply With Quote
  #9  
Old August 5th, 2003, 01:44 PM
EiSa EiSa is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: Norway
Posts: 184 EiSa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 22 m 24 sec
Reputation Power: 7
This is a great article, but I prefer htmlArea:
http://www.interactivetools.com/pro...index.html#demo

And since this is open source and free, here you find all the add-ons:
http://www.interactivetools.com/ifo...ea_Add-Ons_F19/

Reply With Quote
  #10  
Old August 26th, 2003, 05:33 AM
esthera esthera is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 20 esthera User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Do you have an example of doing this in asp?

Can you post it?

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > WYSIWYG Editor and Image Uploading


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT