PD editor insert-image

This tutorial will show you how to add an insert image and pre-view function to your PD html editor.

This tutorial will show you how to add an image insert and pre-view feature in the PD on-line HTML editor.

It assumes that you have some basic knowledge of making a file upload page using the PureASP File Upload extension and making a list/menu dynamically.

First of all you need to make a upload page to get the images to the server and storing them in the database with a description and the filename (picture.jpg).

After this create a recordset within the PD on-line HTML editor page (NOT pd_edit.htm) for this image-upload table and select the description and filename.

Now you will have to find some place in the editor to insert the following:

  • hiddenfield
  • menu
  • Add button
  • new browser window
  • Pre-view button

Something like this:

The hiddenfield:

This field will hold the path as value to the directory where you have uploaded your images. We will name this field 'prefix'.

example:

<input type="hidden" name="prefix" value="http://www.domain.com/Images/">

The dynamic menu:

Create a menu and call it 'imagebank'.

<select name="imagebank"> </select>

I had the problem that Ultradev didn't let me insert a dynamic list/menu within the HTML editor page (?), so i had to create a empty document and inserted the same recordset, a list/menu and then applied the dynamic menu. After this i copied/pasted the code from the page to the HTML editor page. This code is easy to find, it resides between the <select> </select> brackets of the list/menu.

So, create the dynamic list/menu and select the appropiate recordset and list/menu. Select get labels from the description field, get values from the filename field and select value equal to the filename field.

 

 

 

 

Marcellino Bommezijn

Marcellino BommezijnMarcellino Bommezijn is one of the managers at dmxzone.com. He is a contributor on the tutorials section.

Owner of Senzes Media (http://www.activecontent.nl) which provides professional services and web applications for mid-sized companies.

ActiveContent CMS is the ASP.NET Content Management solution that is used for building professional and rich-featured websites.

See All Postings From Marcellino Bommezijn >>

Comments

Thanks

November 27, 2001 by Berry van Elk
Thanks for this tutorial, i try'd a lot of things but nothing worked. This tutorial is just perfect.

Align Image?

January 14, 2002 by David Martin

I've used your method to add images...Thanks for the help. How would I go about enhancing this to be able to insert the align="left" or "right" tag? The same goes for adding a border around the image.

 

RE: Align Image?

February 26, 2002 by heinz leo

thats a big question!
do you have a answer now?

Style sheets?

March 1, 2002 by Damien Aviles
i have a style sheet on my site, i would like to keep the style sheet font and size. pd edit won't let me do that. can i have it so that the default font is the style sheet?
See all 12 Comments

You must me logged in to write a comment.