Results 1 to 13 of 13

Thread: Does anyone know how to make a HTML editor in vb .net or even how i should start one?

  1. #1
    B2E
    Guest

    Exclamation Does anyone know how to make a HTML editor in vb .net or even how i should start one?

    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!

  2. #2
    Registered User jkw119's Avatar
    Join Date
    Oct 2001
    Location
    Pittsburgh
    Posts
    256
    do you want to automate html using vb.net language? because if so, you can do the following,
    VB Code:
    1. Dim MDocument As New System.IO.FileStream("Sample.html", IO.FileMode.Create, IO.FileAccess.Write)
    2. Dim w As New System.IO.StreamWriter(MDocument)
    3. w.BaseStream.Seek(0, IO.SeekOrigin.End)
    4. w.WriteLine("<HTML>")
    5. w.WriteLine("<HEAD>")
    6. w.WriteLine("<title>HTMLPage1</title>")
    7. w.WriteLine("<meta content=JavaScript name=vs_defaultClientScript>")
    8. w.WriteLine("<meta content=http://schemas.microsoft.com/intellisense/ie5 name=vs_targetSchema>")
    9. w.WriteLine("<meta content=Microsoft Visual Studio.NET 7.0 name=GENERATOR>")
    10. w.WriteLine("<meta content=VisualStudio.HTML name=ProgId>")
    11. w.WriteLine("<meta content=Microsoft Visual Studio.NET 7.0 name=Originator>")
    12. w.WriteLine("</HEAD>")
    13. w.WriteLine("<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>")
    14. w.WriteLine("<TR>")
    15. w.WriteLine("<TD COLSPAN=2>")
    16. w.WriteLine("<IMG SRC=c:/HTMLheader.jpg WIDTH=800 HEIGHT=64></TD>")
    17. w.WriteLine("</TR>")
    18. w.WriteLine("</BODY>")
    19. w.WriteLine("</HTML>")
    20. w.Flush()
    21. w.Close()
    then open it like this....
    VB Code:
    1. System.Diagnostics.Process.Start("sample.html")

  3. #3
    B2E
    Guest

    But!?

    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!!

  4. #4
    Fanatic Member siyan's Avatar
    Join Date
    Jul 2001
    Location
    GOOOAAAAALLLLL!!!!!
    Posts
    869
    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

    -C
    Unite, proletariat!

  5. #5
    B2E
    Guest

    How!

    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?

  6. #6
    hellswraith
    Guest
    What You See Is What You Get is what WYSIWYG stands for...

  7. #7
    Fanatic Member siyan's Avatar
    Join Date
    Jul 2001
    Location
    GOOOAAAAALLLLL!!!!!
    Posts
    869
    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
    Unite, proletariat!

  8. #8
    B2E
    Guest

    actually it helps a lot

    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!!!

  9. #9
    Fanatic Member siyan's Avatar
    Join Date
    Jul 2001
    Location
    GOOOAAAAALLLLL!!!!!
    Posts
    869
    I probably wont' be here in time to test it...leaving the country soon for a vacation

    and No prob

    Good luck!
    Unite, proletariat!

  10. #10
    B2E
    Guest

    thanks any way

    thanks anyway but when you get back email me at [email protected] and i will let you know were you can download it and test it out. thanks! a lot!

  11. #11
    Addicted Member
    Join Date
    Dec 2000
    Location
    Novosibirsk, Russia
    Posts
    170

    Another idea...

    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
    Stanislav Okhvat
    [email protected]
    VB, PHP

  12. #12
    B2E
    Guest

    Tell Me More!!

    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!!

  13. #13
    Addicted Member
    Join Date
    Dec 2000
    Location
    Novosibirsk, Russia
    Posts
    170
    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 [email protected].

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

    Best regards and good luck,
    Stanislav
    Stanislav Okhvat
    [email protected]
    VB, PHP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width