Results 1 to 4 of 4

Thread: text editor with specific codes

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2005
    Posts
    265

    text editor with specific codes

    Hi. I want to make text editor like here, with specific codes like [coode] ...etc
    I want the basic Idea to do that?
    thank's

  2. #2
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: text editor with specific codes

    Here is a simple example showing how to do this using regex.

    http://www.vbforums.com/showthread.php?t=386738
    My usual boring signature: Something

  3. #3
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: text editor with specific codes

    what you posted is for making a forum tag system, and will not in any way accomplish syntax highlighting for any langauges.

    to make syntax highlighting for PHP, you can use the built in highlight_file() or highlight_string() functions. for other languages (xml, html), you can find examples in the comments for highlight_string(). for languages like basic, c-sharp, etc., I'm sure you could base your own functions on them -- or you might be able to find a few via googling.

  4. #4
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: text editor with specific codes

    The op was not clear then. What i got out of his post was that he wanted to include ways to utilize the tagging system.

    OP, if you are wanting to highlight bits of code, i suggest using GeSHi
    My usual boring signature: Something

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