views:

313

answers:

4
+1  Q: 

Online text editor

I am looking for an simple online text editor that will load an online file (CSS) and allow a user to make changes then save the file to their desktop. Syntax highlighting would be nice, but not necessary.

I found Edit Pad which would be ideal, except I need to be able to load the content into it. Most of the users I help need step-by-step instructions and would be making minimal changes to the css like colors and image urls. Having an editor like this would make it easier for me to help them (some have edited their css files and saved it as a rtf).

Edit: I have a site (php & jQuery) that I could host a program - something like CKEditor (but I don't see a "save file to desktop" option).

+1  A: 

I would just use Google for that,

http://docs.google.com

With Google Docs, you can collaboratively change the file. Just make sure you save it using "Download File As Text". No syntax highlighting, syntax check though.

You can simply load the content yourself and invite the other party as editor. They don't have to worry about loading it at all.

ZZ Coder
I was just messing around with that... I don't want the user to be able to save the changes to the online document though - because if it gets messed up, it'll be saved that way and I don't want to go back and renew it. Or can I turn on saving it to the online source?
fudgey
Then Google is not for you. It saves automatically every few seconds. You can almost see other party's typing. Why don't you just send the other party a copy to edit and original to view only?
ZZ Coder
o.O.. ok maybe I should add, not everyone may be clever enough to check the revision history as well... like me LOL ->
fudgey
@ZZ Coder: I didn't want to resort to that either as it would mean I'd have to be available all the time to send a copy to edit
fudgey
+1  A: 

You could give Bespin a try: https://bespin.mozilla.com/ It's still in beta, but not bad for how new it is.

PHLAK
Thanks for the reply, that looks very promising. I'm guessing if there isn't a save to desktop button that someone could make one for it :)... I'll check it out more throughly today
fudgey
A: 

CssMate can help you for creating and editing your css files

But more than that if you also wish to optimize your css files,there are great online tools for that such as

Css Optimizer
Css Validation Service

Myra
Thanks for the reply, but not really what I'm looking for at this time.
fudgey
+1  A: 

You can write a small PHP script that grabs a URL's contents and posts it to a pastebin and then redirects you there. This script posts to http://pastebin.com/

<?php
  /* Get the contents of the url in the query */
  $url = $_GET['url'];
  $ch = curl_init($url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  echo curl_error($ch);
  $content = curl_exec($ch);      
  curl_close($ch);

  /* Create a Pastebin from the contents */
  $action = 'http://pastebin.com/pastebin.php';
  $postdata = array(
    'format' => 'text',
    'paste' => 'Send',
    'code2' => urlencode($content)
  );
  foreach($postdata as $key=>$value) {
    $postdata_string .= $key.'='.$value.'&';
  }
  rtrim($postdata_string,'&');

  $ch = curl_init($action);
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata_string);
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_exec($ch);

  // *** Redirect to Pastebin ***
  header("Location: ".curl_getinfo($ch, CURLINFO_EFFECTIVE_URL));

  /*
    Make sure that any code below
    does not get executed when we redirect.
  */
  exit;
?>
brianpeiris
That is a fantastic idea!... but I can't edit the file in gist (unless I sign up and fork from the file). This was intended for end users who are not that familiar with CSS... or know just enough to modify a CSS file.Do you know of any other pastebin sites that will allow editing and saving that this script could work with?
fudgey
Ah, sorry I forgot your have to login to edit. I've changed the code to use http://pastebin.com/
brianpeiris
Thank you! I appreciate your help!
fudgey