4D Write Pro is a powerful text engine, entirely programmable, and fully integrated into 4D and its database. It has an unlimited number of uses. Beyond generating complex documents by programming, or creating letters and quotes as in classic word processors, 4D Write Pro allows you to easily publish your documents on the web.
We’ve prepared an example to show you how you can easily create a beautiful newsletter that can be exported to HTML!
Publish YOUR DOCUMENTS ON THE WEB
The process is pretty simple. First, create a 4D Write Pro area and set the view mode to “embedded” with the “Show HTML WYSIWYG” option enabled in the Property List.
Note that some functionalities are not supported with the HTML export, simply because there is no HTML equivalent! (headers, tabs, etc.). This option will make sure that what you see in 4D Write Pro will indeed be what you’ll get in a web browser.
When you’re satisfied with the final outcome, you can export your document with the WP EXPORT DOCUMENT command. It’s simply that straightforward! With a single line of code, your document is displayed in the browser:
// Export doc to HTML format
$path:=Get 4D folder(Database folder)+"WriteProExport.html"
WP EXPORT DOCUMENT(WParea;$path;wk web page complete;wk normal)
// Display HTML doc in Firefox
Many things can be achieved using 4D Write Pro, the different commands make creating complex (yet visually appealing) documents a breeze!