Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Control to display html in editbox
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01674982
Message ID:
01675032
Vues:
82
Hi Rick,

Gave it a read - in this case, it would be easy to create the output as it is just strings stored in memo fields for the most part. Right now it is simply a string of text for the company name (which I want to bold) and then the "instructions" for that company (that does not need bolding). So I could see wrapping it instead in the markdown "commands", running it through the markdown parser to create html (which you show how to use in your paper). So then the final step would be to place some control on the form to ingest the html string. Have you also got a paper on using the built in html browser control in VFP? I would prefer to not have a 3rd party one (unless the VFP one just does not work) as the customer does not want a lot of time put into this.

Thanks,
Albert

>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform