Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
10
Erster Beitrag:
vor 2 Jahren, 3 Monaten
Letzter Beitrag:
vor 2 Jahren, 1 Monat
Beteiligte Autoren:
Ericus, Piet van Zanten, Peter Holemans, Fabrice Harari

[WB 19]Brochure Design

Startbeitrag von Ericus am 25.11.2015 11:01

Hi

I hope my description makes some sense. My users want to send a bulk email to their clients but the email format must be in html and the user must be able to create an email with 1,2 or 3 columns and add their own images as well.

Is it possible to do something like that in Webdev? That means after the user selected, let's say, a 3 column format with 3 pictures I prepare a template like that for them. After they complete all the details I hopefully get everything exactly right in the email contents that will be sent out.

Thanks in advance



Ericus Steyn

Antworten:

Hi Ericus

of course it's possible

After all, html format is just a string

Best regards

von Fabrice Harari - am 25.11.2015 14:04
Yes Fabrice but to redesign the wheel. It's to close to XMas holidays for that.

Hopefully somebody, somewhere has one little webdev page that they designed for exactly this purpose and they are prepared to share that page, even for a fee.

I have my great accounting system and now want to add CRM to it with as little effort as possible.


Ericus Steyn

von Ericus - am 25.11.2015 15:18
Hi Ericus,

I'm using TinyMCE for editing emails.
Not using templates, but the user can create almost any layout, tables to create columns etc.
I was also able to use an image browser built in WB, to manage and upload images used in the email.
Due to a bug or at least a limitation in WB it is unfortunately not possible to use the imagebrowser in a page called by PageDisplayDialog, but there's a workaround to create a "pseudo" dialog for this purpose. In normal pages there's no problem.
I have no documentation (it's in my head) but I could send you the class and some pages to give you an idea.
If you're interested I need some time of course to make it a little bit understandable.
It's not tested in AWP, only in dynamic WB pages.

Regards,
Piet

von Piet van Zanten - am 27.11.2015 16:42
Hallo Piet

That is very kind of you. I was thinking I must ask the user to create their document in Word and then just copy and paste it into a html control but I have not tested that yet.

I also found the html editor example from PC Soft but it is a bit limited in what it can do. Tables for instance is not available.

TinyMCE looks perfect. If you can just give me an idea how to integrate it into a web page it will be nice.

I also only use dynamic WB pages.

Thanks in advance.


Ericus Steyn

von Ericus - am 30.11.2015 11:37
Hi Ericus,

I'm using ckeditor (http://ckeditor.com/) in WebDev as a plug-in to create rich HTML content in one of my solutions.

You just need to add the ckeditor.js to the page and do a js initialisation call to the edit control.

As a matter of fact, in our solution a power user can define a template completely containing html with field placeholders (data connections and parsing are executed dynamically during parsing to any SQL application).

While my solutions aims at RTF/PDF as the end form, you can probably use a similar logic to generate a rich HTML body to add into an e-mail.

A layout is defined like this:


And the editor to define the html templates looks like this:


After parsing the user can still edit the html result and add html content (or images and even PDF files to attache to the generated one):


Last, the generated html document can be sent to an identical RTF and PDF result:



I guess you'll need to look for a similar approach if you want to give your users control on how to generate html bodies.
You could even give them the ability to start from an existing rich html created in another html editor and give the option to insert those field placeholders and flow placeholders (e.g. {FOR EACH DDS0001} .... {END FOR EACH DDS0001}) ...

I hope this gives you an idea,

Peter Holemans

von Peter Holemans - am 30.11.2015 14:09
Thanks to all.

I managed to integrate TinyMCE quite easily and it seems to have most of the features I need. If users want more they can create a document in Word and just copy/paste into the edit control.

To upload images I installed the Justboil.me plugin for TinyMCE/

Thanks again



Ericus Steyn

von Ericus - am 01.12.2015 12:55
Hi Ericus,

Good to hear you got it to work on your own.
Thanks for pointing me to justboil.me.

Regards,
Piet

von Piet van Zanten - am 02.12.2015 22:32
Piet or anybody else that knows.

I have an Edit control that is linked to TinyMCE. After entering text in the control and wanting to work with that text the control seems empty.

If I step through the code edt_MyText = "" although I can see the text on the screen.

Is there something else I have to do to get the text and pictures out of this control and into a database field?

Thanks in advance.



Ericus Steyn

von Ericus - am 20.01.2016 07:59
Hi Ericus,

It depends on where you are checking the content.
If you are checking in server code, while the control has not been submitted yet it will be empty as the content has only changed on the browser side.
So you need to use a button or link that has submit to the server enabled.
PageToFile works too for TinyMCE controls.

Regards,
Piet

von Piet van Zanten - am 20.01.2016 12:30
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.