Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Control to display html in editbox
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01674982
Message ID:
01675013
Views:
97
Likes (1)
If you need to create HTML output, consider using Markdown text instead of HTML. It lets you write HTML 'markup' as plain text that's **much easier** to edit as plain text using a few common mnemonics like **bold** or *italic* bullets for lists and simple `![link](somelink.html)` and `![](image.png)`. The beauty of it is that you can use a plain text control to handle the input and if you want to make it nicer it's pretty easy to add a small toolbar for a few common operations like bold and italic that just work on selected text.

If you want to see an example (in an HTML form but it works essentially the same in a Fox form) look at the West Wind Message Board's message compose text box. This works great for common text input and it can work in any environment.

There's also a white paper from my SWFOX session a couple of years ago:

Marking up the world with Markdown

Another approach I've used for a number of apps is integrate an HTML editor. ACE Editor ace.c9.org provides a nice editor that can be hosted in a Web Browser control and it can display text in a number of different syntax formats including HTML, Markdown, JavaScript and even FoxPro. The Visual Studio code editor is also available as an embeddable JavaScript component and works in a similar fashion. Another related option is hosting an actual HTML WYSIWYG editor in a Web Browser control - there are a number of those around too although I personally don't like them - too many issues in giving users too much choice and ways to shoot themselves in the foot (and complaining 'why doesn't this (advanced) work?')...








>HI all,
>
>Is there a built in control that I could use in an edit box to display (read-only) a whole bunch of text (i.e. pages of text). Currently users generate a report which pulls text from a bunch of places and presents it in a report (it is a report on some companies) but they do not like the preview window of reports. But using a report allowed for bolding of sections and use of different fonts to distinguish what was being pulled from where).
>
>I did a quick demo to them of just dumping the data into a memo field and separating the info using strings of asterisks etc. but still not as nice as something formatted better.
>
>I was thinking of something that could display html because then I could use the basic html tags to format the data without getting too complicated.
>
>Any suggestions appreciated - they don't want me to spend a lot of time on it so don't really have time to incorporate a whole new product etc.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform