Board index » delphi » Re: HTML template

Re: HTML template


2006-07-09 08:18:47 PM
delphi93
Hi Robert,
Robert writes:
Quote
Is there a program/component that will allow for a user to create an HTML
template(WSIWG) and save it so I can load it in my program as text, replace
the placemarkers with data, and then display the form?
I've been looking for such component too! But it seems like the main
problem is, that I only want portions of the text HTML-markedup'ed and
only needed simple HTML codes like Bold, italic and link-creation (html,
mailto) (table was a "nice to have" item).
But I didn't find anything. It seems like KSDHTML can do the job though.
Tell me what you ended up with!
-Kurt
 
 

Re: HTML template

Quote
>Is there a program/component that will allow for a user to create an
HTML
>template(WSIWG) and save it so I can load it in my program as text,
replace
>the placemarkers with data, and then display the form?

I've been looking for such component too! But it seems like the main
problem is, that I only want portions of the text HTML-markedup'ed and
only needed simple HTML codes like Bold, italic and link-creation (html,
mailto) (table was a "nice to have" item).
This process always has 3 steps.
1) Create your template in a WYSIWYG editor of your choice
2) Insert place holder tags
3) Parse the template, replace the tags and output to a viewer
I create my templates in Dreamweaver, use my own parser
www.compnet101.com/atagparser to parse the template and Dave
Baldwin's THTMLViewer component to view it - works great..
 

Re: HTML template

"JEM" <.john.at.compnet101.com.>writes
Quote
>>Is there a program/component that will allow for a user to create an

This process always has 3 steps.

1) Create your template in a WYSIWYG editor of your choice
2) Insert place holder tags
3) Parse the template, replace the tags and output to a viewer

In my case, after parsing and replacing tags, I need to save the HTML page
and send it as an email. Efficiency is not an issue, the displayed text is
about one or two screens of information, and the number of transactions is
just a few dozen per day. There is only one template and once they settle on
the format, it probably will be changed very infrequently, which is why Word
is an attractive option to build the template with: a year from now, I don't
have to remind anybody (including myself) how to use my template builder,
and also Word supposedly will generate correct HTML for the then current
browsers.
So far, it seems that:
1. Build the template with Word.
2. Read as text, parse and replace, save as text but with HTML extension.
3. Attach the HTML file to tjvMail, fill in the subject and recipient, and
mail out
works OK. But I am certainly no expert on this, if anybody has better
solutions, feel free.
Robert
Quote
I create my templates in Dreamweaver, use my own parser
www.compnet101.com/atagparser to parse the template
Can atagparser handle tables? I have a new project coming along. Thanks for
the help.
Robert
 

Re: HTML template

Quote
>This process always has 3 steps.
>
>1) Create your template in a WYSIWYG editor of your choice
>2) Insert place holder tags
>3) Parse the template, replace the tags and output to a viewer
So far, it seems that:

1. Build the template with Word.
2. Read as text, parse and replace, save as text but with HTML extension.
3. Attach the HTML file to tjvMail, fill in the subject and recipient, and
mail out
Why would you use Word to create an HTML template?
Why not just use FrontPage, GoLive or DreamWeaver to create
the template page? HTML is what they do best. Documents are
what Word does best - not HTML.
This would allow you a great deal of control over the
reports output (via stylesheets) and would be easily changed
and edited by anyone familiar with HTML..
 

Re: HTML template

Robert
Or even better - use OE or Outlook - create it - send it to yourself so you know it looks OK - save as HTML - voila
Roy Lambert
 

Re: HTML template

One could use an html editing component like ProfDHTMLEdit (at
www.profgrid.com/dhtmledit.html I haven't used it and there must
be others as well) to do the editing, keeping everything under the
control of your own app -- that way you could be sure that the editor
doesn't put in stuff that conflicts with the tag style you choose. I
would be a little worried about letting the user use any program to edit
the html, you have no control of what goes in there.
Another option would be to let them create word documents and then use
the mail merge components from TMS software. (I haven't tried them either)
 

Re: HTML template

"Roy Lambert" <XXXX@XXXXX.COM>writes
Quote

As others have said replacing markers (eg mailmerge) is a doddle.

I'm almost there. Remaining problem is I to place the HTML as an attachment
to the email message. If I place it into the body of the message, it
displays as text. Displays OK as an attachment, but it still leaves the body
of the message editable.
The user should not change the email message going out. If they need to
change anything, they would cancel the message, make the required changes in
the database, and try again.
 

Re: HTML template

"JEM" <.john.at.compnet101.com.>writes
Quote

Why would you use Word to create an HTML template?

Why not just use FrontPage, GoLive or DreamWeaver to create
the template page?
Because for a simple template, the end user would have to install and learn
a new program. Seems like overkill. I mean, if they want to do that on their
own, fine, but my solution should, if at all possible, use the tools they
already know.
Robert
 

Re: HTML template

Quote
Is there a program/component that will allow for a user to create an HTML
template(WSIWG) and save it so I can load it in my program as text,
replace the placemarkers with data, and then display the form?
Tod do this, I use RichView "www.trichview.com/" with the mail merge
option and HTML export. My clients have found the word processing is similar
enough to Word for simple tasks that training was almost nil. My client
maintains RVF files with tags for the merge fields; to do so, I added a drag
drop facility to the RichView editor so my client can easily place the
tags. Our merge runs in a batch process and prints. It would be
straightforward to auto export the merged document to HTML and insert in in
the body of an email [or attach it]. I think you may find RichView is a very
affordable and high quality option.
Robert Baker
 

Re: HTML template

Robert
In that case your best approach is to use one of the comms libraries (eg Synapse or Indy) to send it - that way there's no chance the user can edit it. It does mean a bit more work for you because you will need to provide facilities to maintain email addresses etc.
Roy Lambert
 

Re: HTML template

Robert writes:
Quote
I'm almost there. Remaining problem is I to place the HTML as an
attachment to the email message. If I place it into the body of the
message, it displays as text.
Did you change the mime type to text/html?
--
Peter Below (TeamB)
Don't be a vampire (slash7.com/pages/vampires),
use the newsgroup archives :
www.tamaracka.com/search.htm
groups.google.com
www.prolix.be
 

Re: HTML template

"Peter Below (TeamB)" <none>writes
Quote
Robert writes:

>I'm almost there. Remaining problem is I to place the HTML as an
>attachment to the email message. If I place it into the body of the
>message, it displays as text.

Did you change the mime type to text/html?

Where do I need to change that? I am using tjvMail 2.10
Robert
 

Re: HTML template

I knew if I read far enough into this thread someone would have already
mentioned TPageProducer. Used it a long time ago and the only thing I didn't
like about it is that the tags look very strange in wysiwyg mode, I think
because they use <html brackets>.
"Peter Below (TeamB)" <none>writes
Quote

Look at the TPageProducer component in the online help. It also has a
number of simblings for filling a html template from a dataset.