Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple HTML editor using webBrowser control
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01658825
Message ID:
01658872
Views:
75
>You can find out more about using the Web Browser Control with Visual FoxPro here:
>
>* Building Rich Desktop Applications with the Web Browser Control in Visual Foxpro
>
>Note there are a few gotchas like making sure you force the control into IE 11 mode (it runs IE 7 by default). Other than that you can just run an HTML page with an Web editor embedded and then use JavaScript to pull the data out.
>
>Now personally I would not use a WYSIWYG editor because while they work for very simple scenarios they produce horrendous HTML and are almost always a pain to use for the end user as these editors have unintended 'behaviors' due to the limited edit interface of browsers. Linefeeds/breaks are always a problem and editing and updating can be painful. There are a number of decent controls out there though that take a decent stab at that. Find a sample and create a simple Web page that you can then load in the Web Browser control and you can use a few simple JavaScript functions to (or just the HTML DOM directly if the control makes the editied text available easily) set and access the HTML input/output.
>
>
>For me - for scenarios where I need HTML inputs I tend to use Markdown which tends to be easier to work with and manage/edit in the long run.
>

Thank you, Rick! Your website is a great resource that I check often.
Yes, I set the feature control to IE11 for VFP in the registry.
This project is meant less for publishing, and more for writing notes, so Markdown would be great. However, it is for an end-user application, so it has to be WYSIWYG, with editing in either RTF or HTML. The problem is that I could not find a decent RTF to/from HTML converter, so I have to stick with HTML. The volume and complexity of the html produced is a concern. I wonder if I could try converting the html to markdown for saving/storing, and re/convert to html upon retrieval, and how reliable that would be.
I'll check out the Javascript options, too.
*
Previous
Reply
Map
View

Click here to load this message in the networking platform