Results 1 to 6 of 6

Thread: Text editor Problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2010
    Posts
    3

    Text editor Problem

    When i finished (or i thought i finished) coding my Text editor today i ran into a problem after i saved a file i typed

    <html>
    <head>
    <title>HI</title>
    </head>
    <body>
    TEST
    </body>
    </html>

    But what came out after i saved and opened in a web browser was

    {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}} \viewkind4\uc1\pard\f0\fs17 \par \par \par \par \par TEST\par \line \par }

    is there a way to fix this???

  2. #2
    Hyperactive Member
    Join Date
    Dec 2009
    Location
    sydney
    Posts
    265

    Re: Text editor Problem

    this is a vb forum

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2010
    Posts
    3

    Re: Text editor Problem

    Quote Originally Posted by wiss.dev View Post
    this is a vb forum
    i know that i made it in VB

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Text editor Problem

    You are presumably using a RichTextBox. As the name suggests, a RichTextBox works with Rich Text Format (RTF) data. RTF is similar to HTML in that it is simply text but it contains both data and meta-data, i.e. markup code that describes how the data should be displayed. If you don't want to save the RTF markup contained in the RichTextBox then you need to specify plain text as the format when saving the file.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    New Member
    Join Date
    Aug 2010
    Posts
    3

    Re: Text editor Problem

    Quote Originally Posted by jmcilhinney View Post
    You are presumably using a RichTextBox. As the name suggests, a RichTextBox works with Rich Text Format (RTF) data. RTF is similar to HTML in that it is simply text but it contains both data and meta-data, i.e. markup code that describes how the data should be displayed. If you don't want to save the RTF markup contained in the RichTextBox then you need to specify plain text as the format when saving the file.
    i wanted to make file extensions such as .html and .php is there any way i could do that? i tried to use a multi lined text box but the save dialog isn't compatible

  6. #6
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780

    Re: Text editor Problem

    The save dialog has options to change the extension type, the online help-file shows you exactly what jmc suggested. You can add multiple entries to the extention, again theres a good sample in the online help.

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