Colin McKinnon wrote:
The subject says it all really - I want to be able to edit some text (code actually) from a browser and post the data back to the server. I guess this is the kind of thing which Java should be good for but typing 'Java code editor applet' into Google turns up a LOT of noise (mostly tools for editing java applets - not java applets for editing text).

There are no end of WYSIWYG editors (actually most of them are buttons stuck in front of the editor buit-in to Microsoft's IE) but I really want to edit PHP and javascript.

I did find netedit which is little more than a textarea with buttons on (http://www.chipsoftinc.com/products/netEdit/). ViD looked promising (http://www.oursland.net/vid/) but I don't get the cursor in the right place in any of the browsers I've tried.

You can use php to read a file and drop it into a textarea for you to edit. You can then use POST to submit it to a php script which can write the textarea back into the file.


http://uk2.php.net/manual/en/function.fread.php
http://uk2.php.net/manual/en/function.fwrite.php

You can also use php to list the files in a directory
http://uk2.php.net/manual/en/function.opendir.php
http://uk2.php.net/manual/en/function.readdir.php

You'll probably want to add authentication to that as well.

TikiWiki CMS uses this to allow you to edit Smarty templates so it should work just as well with PHP.

There are stand alone scripts out there - unfortunetly I've deleted the ones that I'd been playing about with.

HTH,
eat

--
Pix | http://photos.eatnet.org.uk [updated 25th April]
ScR | http://groups.yahoo.com/group/scot-rail

_______________________________________________
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish

Reply via email to