doforumda Posted April 25, 2010 Share Posted April 25, 2010 hi how can i create a textarea that gets code inside "code" tags and then display it different than other text? Link to comment https://forums.phpfreaks.com/topic/199684-need-help-with-textarea/ Share on other sites More sharing options...
litebearer Posted April 25, 2010 Share Posted April 25, 2010 Do mean something like this.... http://www.kevinroth.com/rte/demo.htm Link to comment https://forums.phpfreaks.com/topic/199684-need-help-with-textarea/#findComment-1048039 Share on other sites More sharing options...
doforumda Posted April 25, 2010 Author Share Posted April 25, 2010 i mean when you type on phpfreaks to post . when you want to provide a source code for the problem then you write that code inside " " these code tags Link to comment https://forums.phpfreaks.com/topic/199684-need-help-with-textarea/#findComment-1048042 Share on other sites More sharing options...
cags Posted April 25, 2010 Share Posted April 25, 2010 The system used is called bbcode, if you search for it on google you will find thousands of examples of how BBCode words, as you'll see when you look at the source, the Code tags essentially just place the code segment inside a Div and style it differently. The blocks that use syntax highlighting use exactly the same system only the code is ran through a syntax highlighting function first. Again a quick search should give you a few ready made solutions that you can use on your site such as Geshi. Link to comment https://forums.phpfreaks.com/topic/199684-need-help-with-textarea/#findComment-1048057 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.