PDA

Click to See Complete Forum and Search --> : text editor with specific codes


Visual Basic.Net
Feb 28th, 2009, 12:25 PM
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

dclamp
Feb 28th, 2009, 01:02 PM
Here is a simple example showing how to do this using regex.

http://www.vbforums.com/showthread.php?t=386738

kows
Feb 28th, 2009, 01:53 PM
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() (http://ca.php.net/manual/en/function.highlight-file.php) or highlight_string() (http://ca.php.net/manual/en/function.highlight-string.php) 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.

dclamp
Feb 28th, 2009, 02:03 PM
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 (http://qbnz.com/highlighter/)