473,385 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

convert html string into a html document

Hi,

Ive posted on this previously but had no response. Basically i need to
build some html using a rich text editor. Then i want to actually
create an html document from this and save it to my server. Does
anyone have any examples on how to do this ??

I dont really understand how to get from HTML string to HTML document.
I can probably work out how to save this. do i create an html object ??

Any help appreciated

Colin Graham

Sep 19 '06 #1
4 4426
csgraham74 wrote:
Ive posted on this previously but had no response. Basically i need to
build some html using a rich text editor. Then i want to actually
create an html document from this and save it to my server. Does
anyone have any examples on how to do this ??
I'm not entirely clear what you're trying to do here...

Are you trying to use the rich text box to enter fully formatted data (e.g.,
different font sizes, bold text, etc.etc) in a "WYSIWYG" style, and then
convert this to HTML (so that all the appropriate tags get inserted to make
the HTML when viewed in the browser look like the original rich text)? If
so, I suspect the reason you didn't get an answer is because this is
potentially a lot of work.

I've written code in the past to convert raw .rtf content to HTML, and it
very quickly gets very complex, much more than anyone would be able to help
with via the newsgroup. There may be 3rd party components that you could
use, but I don't have any knowledge of them.

If you are using the rich text box to get the user to enter the raw HTML (so
they would enter, "<p>Here is some <strong>text</strong>.</p>", then
converting this to an HTML file is simply a matter of reading the content
out using the rich text box's .Text property, and then saving it to a .htm
file on disk. An HTML file is simply a text file with HTML-formatted text
within it, and usually a .htm or .html file extension.

Or am I still missing what you're trying to achieve?

--

(O)enone
Sep 19 '06 #2
I'm not sure either what csgraham74 is trying to do. If he's
trying to do a "wysiwyg" editor, then
http://www2.bitstream.net/~bradyh/do...tf2htmlrm.html
might be helpful. That's VB6 code but should be easily ported
to VB.NET.

- Timo
"Oenone" <oe****@nowhere.comwrote in message
news:eH**************@TK2MSFTNGP03.phx.gbl...
csgraham74 wrote:
>Ive posted on this previously but had no response. Basically i need to
build some html using a rich text editor. Then i want to actually
create an html document from this and save it to my server. Does
anyone have any examples on how to do this ??

I'm not entirely clear what you're trying to do here...

Are you trying to use the rich text box to enter fully formatted data
(e.g., different font sizes, bold text, etc.etc) in a "WYSIWYG" style, and
then convert this to HTML (so that all the appropriate tags get inserted
to make the HTML when viewed in the browser look like the original rich
text)? If so, I suspect the reason you didn't get an answer is because
this is potentially a lot of work.

I've written code in the past to convert raw .rtf content to HTML, and it
very quickly gets very complex, much more than anyone would be able to
help with via the newsgroup. There may be 3rd party components that you
could use, but I don't have any knowledge of them.

If you are using the rich text box to get the user to enter the raw HTML
(so they would enter, "<p>Here is some <strong>text</strong>.</p>", then
converting this to an HTML file is simply a matter of reading the content
out using the rich text box's .Text property, and then saving it to a .htm
file on disk. An HTML file is simply a text file with HTML-formatted text
within it, and usually a .htm or .html file extension.

Or am I still missing what you're trying to achieve?

--

(O)enone

Sep 20 '06 #3
Thanks guys,

yeah it is a bit of weird one - i am using a rich text editor and i
have built the html in memory as a string. The step that i need a
solution for is the save to a document which has an .htm extension.

I dont know how do do this - any ideas ???

CG
Timo wrote:
I'm not sure either what csgraham74 is trying to do. If he's
trying to do a "wysiwyg" editor, then
http://www2.bitstream.net/~bradyh/do...tf2htmlrm.html
might be helpful. That's VB6 code but should be easily ported
to VB.NET.

- Timo
"Oenone" <oe****@nowhere.comwrote in message
news:eH**************@TK2MSFTNGP03.phx.gbl...
csgraham74 wrote:
Ive posted on this previously but had no response. Basically i need to
build some html using a rich text editor. Then i want to actually
create an html document from this and save it to my server. Does
anyone have any examples on how to do this ??
I'm not entirely clear what you're trying to do here...

Are you trying to use the rich text box to enter fully formatted data
(e.g., different font sizes, bold text, etc.etc) in a "WYSIWYG" style, and
then convert this to HTML (so that all the appropriate tags get inserted
to make the HTML when viewed in the browser look like the original rich
text)? If so, I suspect the reason you didn't get an answer is because
this is potentially a lot of work.

I've written code in the past to convert raw .rtf content to HTML, and it
very quickly gets very complex, much more than anyone would be able to
help with via the newsgroup. There may be 3rd party components that you
could use, but I don't have any knowledge of them.

If you are using the rich text box to get the user to enter the raw HTML
(so they would enter, "<p>Here is some <strong>text</strong>.</p>", then
converting this to an HTML file is simply a matter of reading the content
out using the rich text box's .Text property, and then saving it to a .htm
file on disk. An HTML file is simply a text file with HTML-formatted text
within it, and usually a .htm or .html file extension.

Or am I still missing what you're trying to achieve?

--

(O)enone
Sep 20 '06 #4
HTML files are simple text files with htm (or html) extension.
See http://msdn2.microsoft.com/en-us/library/hxwfzt61.aspx
How to: Write Text to Files with a StreamWriter in Visual Basic

- Timo
"csgraham74" <cs********@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Thanks guys,

yeah it is a bit of weird one - i am using a rich text editor and i
have built the html in memory as a string. The step that i need a
solution for is the save to a document which has an .htm extension.

I dont know how do do this - any ideas ???

CG
Timo wrote:
>I'm not sure either what csgraham74 is trying to do. If he's
trying to do a "wysiwyg" editor, then
http://www2.bitstream.net/~bradyh/do...tf2htmlrm.html
might be helpful. That's VB6 code but should be easily ported
to VB.NET.

- Timo
"Oenone" <oe****@nowhere.comwrote in message
news:eH**************@TK2MSFTNGP03.phx.gbl...
csgraham74 wrote:
Ive posted on this previously but had no response. Basically i need to
build some html using a rich text editor. Then i want to actually
create an html document from this and save it to my server. Does
anyone have any examples on how to do this ??

I'm not entirely clear what you're trying to do here...

Are you trying to use the rich text box to enter fully formatted data
(e.g., different font sizes, bold text, etc.etc) in a "WYSIWYG" style,
and
then convert this to HTML (so that all the appropriate tags get
inserted
to make the HTML when viewed in the browser look like the original rich
text)? If so, I suspect the reason you didn't get an answer is because
this is potentially a lot of work.

I've written code in the past to convert raw .rtf content to HTML, and
it
very quickly gets very complex, much more than anyone would be able to
help with via the newsgroup. There may be 3rd party components that you
could use, but I don't have any knowledge of them.

If you are using the rich text box to get the user to enter the raw
HTML
(so they would enter, "<p>Here is some <strong>text</strong>.</p>",
then
converting this to an HTML file is simply a matter of reading the
content
out using the rich text box's .Text property, and then saving it to a
.htm
file on disk. An HTML file is simply a text file with HTML-formatted
text
within it, and usually a .htm or .html file extension.

Or am I still missing what you're trying to achieve?

--

(O)enone

Sep 22 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Andrew V. Romero | last post by:
At work we have an excel file that contains the list of medications and their corresponding strengths. I would like to save the excel file as a text list and paste this list into a javascript...
1
by: Jason | last post by:
Could anyone please give me a hand converting this script, written for IE to work with netscape? _________________________________ ______________________________________ <!-- var...
2
by: Henrik Skak Pedersen | last post by:
Hi, I am trying to convert a very basic WML document to HTML using the word2HTML.xsl stylesheet. But I get an exception when I am trying to convert it: The code looks like this: ...
14
by: David C. Taylor | last post by:
I saw an article that described how to convert the query string into an Url without a query string and return the page. For example, this request: ...
4
by: elsigh | last post by:
I'm wondering if anyone has any ideas about a way to quickly convert an HTML DOM Node into an XML Document. The goal is that I want to perform XSLT on the Node, which is coded correctly as XHTML....
2
by: csgraham74 | last post by:
Hi, I have a requirement in work that i give a person the ability to create a html document using a richt text editor. What i then want to do is save the HTML doct to my server & insert...
1
by: eggie5 | last post by:
I want to use element.appendChild(child) on a string of HTML I have: html= '<div> <strong>Text</strong> </div>' However, since it's not an element (ie created with document.createElement)...
1
by: since | last post by:
I figured I would post my solution to the following. Resizable column tables. Search and replace values in a table. (IE only) Scrollable tables. Sortable tables. It is based on a lot...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.