Hi all
I am working on a project which I hope may be of interest to VFP developers and which I intend to make available on Eds downloads section (if I can get it working properly). It is designed to:
Use the clipboard to copy code from an open code window
Fetch the contents of the clipboard as RTF
Convert the RTF to HTML and display it in a web browser control
It could be helpful in two ways:
1. To experiment with different colours and styles, change them and see the results immediately. You can change several areas (Keywords etc) and having made the changes (either one at a time or all at once) see their effect on the code in the web browser (instead of that stupid little preview that you get in Tools~Options~Editor) 2. The resulting HTML could be copied to the clipboard and pasted straight into, for example, a web page or blog.
At the moment the RTF to HTML conversion itself makes use of a third party control (TextDynamic). Not only is this control complete overkill for what is needed, but it is also eye-wateringly expensive (as in £ hundreds).
So I have put together (from various sources) a C#/.NET application to do the conversion and it builds successfully. However stepping through the code I get to a point where there seems to be a problem (not an error, just not doing what I tell it to do ). The relevant part of the code is based on HtmlToXamlDemo.HtmlFromXamlConverter.WriteFlowDocument(System.Xml.XmlTextRea der, System.Xml.XmlTextWriter) Example (csharpcodi.com) https://www.csharpcodi.com/csharp-examples/HtmlToXamlDemo.HtmlFromXamlConve rter.WriteFlowDocument(System.Xml.XmlTextReader,%20System.Xml.XmlTextWriter) /
If anybody would be prepared to work on this with me, or to help me move forward, would they please contact me off-list.
Many thanks
Paul Newton
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
Hi Paul,
I'd recommend taking this to VFPX if you're looking to create an open source tool where folks can participate.
--
rk
From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of paul.newton.hudl@gmail.com Sent: Saturday, February 19, 2022 10:06 AM To: profoxtech@leafe.com Subject: VFP code window contents to HTML - request for help/collaboration
Hi all
I am working on a project which I hope may be of interest to VFP developers and which I intend to make available on Ed's downloads section (if I can get it working properly). It is designed to:
Use the clipboard to copy code from an open code window
Fetch the contents of the clipboard as RTF
Convert the RTF to HTML and display it in a web browser control
It could be helpful in two ways:
1. To experiment with different colours and styles, change them and see the results immediately. You can change several areas (Keywords etc) and having made the changes (either one at a time or all at once) see their effect on the code in the web browser (instead of that stupid little preview that you get in Tools~Options~Editor) 2. The resulting HTML could be copied to the clipboard and pasted straight into, for example, a web page or blog.
At the moment the RTF to HTML conversion itself makes use of a third party control (TextDynamic). Not only is this control complete overkill for what is needed, but it is also eye-wateringly expensive (as in £ hundreds).
So I have put together (from various sources) a C#/.NET application to do the conversion and it builds successfully. However stepping through the code I get to a point where there seems to be a problem (not an error, just not doing what I tell it to do ...). The relevant part of the code is based on HtmlToXamlDemo.HtmlFromXamlConverter.WriteFlowDocument(System.Xml.XmlTextRea der, System.Xml.XmlTextWriter) Example (csharpcodi.com) <https://www.csharpcodi.com/csharp-examples/HtmlToXamlDemo.HtmlFromXamlConvehttps://protect-us.mimecast.com/s/k-1aCR6M0Ph5O5XhokZEi?domain=csharpcodi.com rter.WriteFlowDocument(System.Xml.XmlTextReader,%20System.Xml.XmlTextWriter) />
If anybody would be prepared to work on this with me, or to help me move forward, would they please contact me off-list.
Many thanks
Paul Newton
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
Thanks, Richard
I'd definitely consider that but I'd like to take it a bit further before I do that. I have changes of colour more or less sorted and am now looking at font styles ... this is on the VFP side rather than the C#/.NET side
Paul
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Richard Kaye Sent: 19 February 2022 17:12 To: profoxtech@leafe.com Subject: RE: VFP code window contents to HTML - request for help/collaboration
Hi Paul,
I'd recommend taking this to VFPX if you're looking to create an open source tool where folks can participate.
--
rk
From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of paul.newton.hudl@gmail.com Sent: Saturday, February 19, 2022 10:06 AM To: profoxtech@leafe.com Subject: VFP code window contents to HTML - request for help/collaboration
Hi all
I am working on a project which I hope may be of interest to VFP developers and which I intend to make available on Ed's downloads section (if I can get it working properly). It is designed to:
Use the clipboard to copy code from an open code window
Fetch the contents of the clipboard as RTF
Convert the RTF to HTML and display it in a web browser control
It could be helpful in two ways:
1. To experiment with different colours and styles, change them and see the results immediately. You can change several areas (Keywords etc) and having made the changes (either one at a time or all at once) see their effect on the code in the web browser (instead of that stupid little preview that you get in Tools~Options~Editor) 2. The resulting HTML could be copied to the clipboard and pasted straight into, for example, a web page or blog.
At the moment the RTF to HTML conversion itself makes use of a third party control (TextDynamic). Not only is this control complete overkill for what is needed, but it is also eye-wateringly expensive (as in £ hundreds).
So I have put together (from various sources) a C#/.NET application to do the conversion and it builds successfully. However stepping through the code I get to a point where there seems to be a problem (not an error, just not doing what I tell it to do ...). The relevant part of the code is based on HtmlToXamlDemo.HtmlFromXamlConverter.WriteFlowDocument(System.Xml.XmlTextRea der, System.Xml.XmlTextWriter) Example (csharpcodi.com) <https://www.csharpcodi.com/csharp-examples/HtmlToXamlDemo.HtmlFromXamlConve https://protect-us.mimecast.com/s/k-1aCR6M0Ph5O5XhokZEi?domain=csharpcodi.c om rter.WriteFlowDocument(System.Xml.XmlTextReader,%20System.Xml.XmlTextWriter) />
If anybody would be prepared to work on this with me, or to help me move forward, would they please contact me off-list.
Many thanks
Paul Newton
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
[excessive quoting removed by server]
Every project has to start somewhere. : - )
--
rk
From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of paul.newton.hudl@gmail.com Sent: Saturday, February 19, 2022 12:17 PM To: profoxtech@leafe.com Subject: RE: VFP code window contents to HTML - request for help/collaboration
Thanks, Richard
I'd definitely consider that but I'd like to take it a bit further before I do that. I have changes of colour more or less sorted and am now looking at font styles ... this is on the VFP side rather than the C#/.NET side
Paul
-----Original Message----- From: ProfoxTech <profoxtech-bounces@leafe.commailto:profoxtech-bounces@leafe.com> On Behalf Of Richard Kaye Sent: 19 February 2022 17:12 To: profoxtech@leafe.commailto:profoxtech@leafe.com Subject: RE: VFP code window contents to HTML - request for help/collaboration
Hi Paul,
I'd recommend taking this to VFPX if you're looking to create an open source tool where folks can participate.
--
rk
From: ProfoxTech <profoxtech-bounces@leafe.commailto:profoxtech-bounces@leafe.com> On Behalf Of paul.newton.hudl@gmail.commailto:paul.newton.hudl@gmail.com Sent: Saturday, February 19, 2022 10:06 AM To: profoxtech@leafe.commailto:profoxtech@leafe.com Subject: VFP code window contents to HTML - request for help/collaboration
Hi all
I am working on a project which I hope may be of interest to VFP developers and which I intend to make available on Ed's downloads section (if I can get it working properly). It is designed to:
Use the clipboard to copy code from an open code window
Fetch the contents of the clipboard as RTF
Convert the RTF to HTML and display it in a web browser control
It could be helpful in two ways:
1. To experiment with different colours and styles, change them and see the results immediately. You can change several areas (Keywords etc) and having made the changes (either one at a time or all at once) see their effect on the code in the web browser (instead of that stupid little preview that you get in Tools~Options~Editor) 2. The resulting HTML could be copied to the clipboard and pasted straight into, for example, a web page or blog.
At the moment the RTF to HTML conversion itself makes use of a third party control (TextDynamic). Not only is this control complete overkill for what is needed, but it is also eye-wateringly expensive (as in £ hundreds).
So I have put together (from various sources) a C#/.NET application to do the conversion and it builds successfully. However stepping through the code I get to a point where there seems to be a problem (not an error, just not doing what I tell it to do ...). The relevant part of the code is based on HtmlToXamlDemo.HtmlFromXamlConverter.WriteFlowDocument(System.Xml.XmlTextRea der, System.Xml.XmlTextWriter) Example (csharpcodi.com) <https://www.csharpcodi.com/csharp-examples/HtmlToXamlDemo.HtmlFromXamlConvehttps://protect-us.mimecast.com/s/qWWXC68mvBuyWZVcLsfs7?domain=csharpcodi.com <https://protect-us.mimecast.com/s/k-1aCR6M0Ph5O5XhokZEi?domain=csharpcodi.chttps://protect-us.mimecast.com/s/qWWXC68mvBuyWZVcLsfs7?domain=csharpcodi.com om> rter.WriteFlowDocument(System.Xml.XmlTextReader,%20System.Xml.XmlTextWriter) />
If anybody would be prepared to work on this with me, or to help me move forward, would they please contact me off-list.
Many thanks
Paul Newton
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
[excessive quoting removed by server]