Current location: Hot Scripts Forums » Programming Languages » PHP » highlight_file() -> texarea


highlight_file() -> texarea

Reply
  #1 (permalink)  
Old 07-22-03, 06:24 AM
dabluedude dabluedude is offline
New Member
 
Join Date: Jul 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
highlight_file() -> texarea

does anyone know how to convert the colors given with highlight_file("$file"); to a HTML textarea ?
If you dont know that, do you know how to get different text colors in a HTML textarea ?

thanks,
Thomas

Last edited by dabluedude; 07-22-03 at 06:29 AM.
Reply With Quote
  #2 (permalink)  
Old 07-22-03, 06:54 AM
stuart stuart is offline
New Member
 
Join Date: Jul 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Well you could put the returned string from highlight_file() in a textarea..... but this would put the file along with new HTML produced by PHP that colours the string. For example if your file had echo "hello";, the textarea could display <font color="black">echo</font>........ and so on. This can be done by using ob_start() etc. - check out thew manual at php,net for full details.

If however you want the text to actually be coloured withing the text area box then you need to use special components (DHTML) only avaiable to advanced browsers (IE5.5+). Its a pretty messy business.
__________________
-~-~-~-~-~-~-~-~-~-~-~-~-~-~
www.php-editors.com
-~-~-~-~-~-~-~-~-~-~-~-~-~-~
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 10:37 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.