sEditor Simple, tiny, no javascript dependencies editors


About

sEditor is a tiny (500 lines), no javascript dependencies library makes it easy to create simple wysiwyg editors .

View project on Github

Usage

// base
sEditor('.editor')


// upload image to server
sEditor('.editor', {file: {
  // fileInfo as File Object
  // callback(remote_image_url) for rich editor image callback
  uploader: function(fileInfo, callback) {
    var fReader = new FileReader();
    fReader.onload = function(e) {
      $.post('/uploader', {file: e.target.result}, success: function(data){
        callback(data.url);
      })
    };
    fReader.readAsDataURL(fileInfo);
  }
}})