PDA

Click to See Complete Forum and Search --> : Does anyone know how to make a HTML editor in vb .net or even how i should start one?


B2E
Jun 27th, 2002, 11:37 AM
Does anyone in here know how to make a good html editor i would prefer it be in vb .net language but i could rea arrange it if it were in vb6 or something like that. i really need an html editor for a program i am writing so any help you could give me at all would be great!

Thanks!

jkw119
Jun 27th, 2002, 12:26 PM
do you want to automate html using vb.net language? because if so, you can do the following,

Dim MDocument As New System.IO.FileStream("Sample.html", IO.FileMode.Create, IO.FileAccess.Write)
Dim w As New System.IO.StreamWriter(MDocument)
w.BaseStream.Seek(0, IO.SeekOrigin.End)
w.WriteLine("<HTML>")
w.WriteLine("<HEAD>")
w.WriteLine("<title>HTMLPage1</title>")
w.WriteLine("<meta content=JavaScript name=vs_defaultClientScript>")
w.WriteLine("<meta content=http://schemas.microsoft.com/intellisense/ie5 name=vs_targetSchema>")
w.WriteLine("<meta content=Microsoft Visual Studio.NET 7.0 name=GENERATOR>")
w.WriteLine("<meta content=VisualStudio.HTML name=ProgId>")
w.WriteLine("<meta content=Microsoft Visual Studio.NET 7.0 name=Originator>")
w.WriteLine("</HEAD>")
w.WriteLine("<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>")
w.WriteLine("<TR>")
w.WriteLine("<TD COLSPAN=2>")
w.WriteLine("<IMG SRC=c:/HTMLheader.jpg WIDTH=800 HEIGHT=64></TD>")
w.WriteLine("</TR>")
w.WriteLine("</BODY>")
w.WriteLine("</HTML>")
w.Flush()
w.Close()

then open it like this....

System.Diagnostics.Process.Start("sample.html")

B2E
Jun 29th, 2002, 10:57 AM
How will that let me open it and edit it as needed? What i need it to do is i want it to be able to make sell pages like you use on eBay really easy so the user could make html pages with no knowledge of HTML. So i will need buttons that let you add images enlarge font sizes make it different font styles and stuff like that. Any Ideas will be great!!

siyan
Jun 30th, 2002, 03:14 PM
making a WYSIWYG editor is going to be a good deal harder than makign a code editor, FYI

unless there is some lazy method in the .net rich text box to export html :eek:

-C

B2E
Jul 2nd, 2002, 10:32 AM
ok i probably onow what it is but just to make sure what exactly is a WYSIWYG editor(what do the letters stand for)

and what i am trying to do is make a html editor were the user does not have to know html at all and can view the out put of the html as it is being edited

It is going to be used so someone can make a html sell page for eBay this will be a form with buttong that will insert text(with certian font stuff) insert images from an image host ie. from the internet) insert the body of the ad and stuff like that but i do not want the user to have to worry about what the html is i want them to make the add and then copy the html and paste it later

do you have any idea were i should start in vb.net?

hellswraith
Jul 2nd, 2002, 12:16 PM
What You See Is What You Get is what WYSIWYG stands for...

siyan
Jul 2nd, 2002, 07:02 PM
Examples of WYSIWYG editors are Frontpage, Dreamweaver, etc.

Ex: microsoft word is WYSIWYG...you type stuff, it *can* spew out (bad) HTML

Code editors are like Homesite, ultraedit...notepad if you want to count that.

as fro making a wysiwyg editor that is similar in nature to frontpage/dreamwevaer would be quite challenging..i have no idea where to start.

But if my assumption is correct, and this e-bay sell page is a simple thing that follows a set template...its not hard. Just throw on some textboxes and stuff...one for the main body of hte ad, a few textboxes for paths/URLs to pictures...and then a 'generate html' button that goes through everything the user has entered to spew out a html page.

you could expand it to give the user some freedom over page layout...just give them a listbox that shows what order their page elemetns come in. then they can add new elements like a table, image, etc...with some properties...and those show up in the list box
when they click on an item int eh list box, a form comes up to edit that element or whatever


thats about as far as you can go without making something like frontpage...

of course, if you need some sort of automation with E-bay it all depends on how restrictive thier system is. i have no clue

hope that helps

B2E
Jul 7th, 2002, 03:30 PM
actually you helped me out a lot i think i will use your idea with the textboxes and what not....but as far as ebay goes all the person will have to do is click generate html and then paste it to the page on ebay. thanks a lot for your help! And if you do not mind could you test this Auctioneer program out for me when i get it done......?

Thanks a lot!!!

siyan
Jul 7th, 2002, 03:34 PM
I probably wont' be here in time to test it...leaving the country soon for a vacation

and No prob :)

Good luck!

B2E
Jul 8th, 2002, 09:49 AM
thanks anyway but when you get back email me at me@buy2easy.com and i will let you know were you can download it and test it out. thanks! a lot!

stanis
Jul 8th, 2002, 10:20 PM
B2E, I think your best bet is to use DHTML Edit control from Microsoft which is most certainly in your components toolbox. This control is very extensible, if you need examples in VbScript you can email me.

The best feature of the control is that you can paste text from any RTF-like editor into DHTML Edit, save as pure text or HTML, switch between HTML view and WYSIWYG view, etc

Best regards,
Stanislav

B2E
Jul 10th, 2002, 03:58 PM
the DHTMLedit thing is actually what i am using but i do not know how to add things like images into a particular place in the WYSIWYG screen like for instance if i have a HTML template and in the spots that i want things to go in place of symbols like:
* - would be for an image
# - would be for the description
& - would be for the title of the auction

and i have text boxes to the side were you fill in the info and press the "insert into code" button and it would place each thing in a certian spot.

I think i can doo it with a textbox that holds the HTML of the document but i am having trouble in vb.net trying to search throught the text box for the above symbols so that i can paste over them

If you could give me some code as to how i can do that in vb.net that would be great! THANKS!!

stanis
Jul 10th, 2002, 09:26 PM
Hi, B2E!

Yes, I can send you the code (which is commented in Russian, but the code is there anyway). It is in Javascript, but it's not that different from VB.NET - you can see DHTML Edit API. If you only have a few named placeholders that need to be filled with an image, description, etc, I guess DHTML Edit has some methods for searching a particular range of characters and replacing it with a user specified string. I have not really used DHTML Edit that much, so I don't know. One thing I know is that it does have a wide range of command ids that do different things (similar to SendMessage in Windows API - you can use it extensively to configure many aspects of Windows).

I could not find your email address in your profile (I need to send the attachment), and I cannot attach it to the message because it says it's too big (220 kb), so please send me a message at stanis@sibfair.nsk.su.

The examples provided do not specifically solve your problem, but they are a good place to start from.

Best regards and good luck,
Stanislav