<commit_before>#Dante Editor

####Just another Medium editor clone.

##Motivation:

I´ve tried all the medium clones out there, they are really great and all have it´s pros & cons, but none of them have all the features that medium wysywig provides, so I wonder, how difficult could be build my own Medium clone?

Until now I´ve been able to implement the following features:

## Features:

+ HTML sanitizer when paste text or initial load.
+ Image formatting/upload for paste events.
+ Add an unique name to elements on page.
+ Implementation of the famous tooltip on each paragraph when selected
+ Tab navigation.
+ Embeds:
  + Image Uploader with *preview* and caption option.
  + Embed data for pasted link through OEmbed services.
  + Embed media information for pasted links through OEmbed services.
+ CSS tries to use the same fonts used in Medium, if you have setup those fonts, or fallbacks to open fonts (by Google fonts) or system fonts.
  + serif: freight-text-pro fallbacks to Merriweather or Georgia,
  + sans:  jaf-bernino-sans fallbacks to Open Sans or Lucida Grande

## Demo:

[http://michelson.github.io/Dante/](http://michelson.github.io/Dante/)

## Usage:

### HTML:

```html
  <div id="editor">
    your content here
  </div>
```

### Javascript:

```html
  <script type="text/javascript">
    editor = new Dante.Editor(
      {
        el: "#editor",
        upload_url: "/images.json", //it expect an url string in response like /your/server/image.jpg or http://app.com/images/image.jpg
        store_url: "/save" //post to save

      }
    );
    editor.start()
  </script>
```

### Configuration options:

    el:          default: #editor
    debugMode:   default: false
    upload_url:  default: /uploads.json
    oembed_url:  default: http://api.embed.ly/1/oembed?url="
    extract_url: default: http://api.embed.ly/1/extract?url="

## Disclaimer:

This Library will work on early versions of Chrome/Safari/FF/IE.
I don't have any intentions to target all browsers versions, really... if you like this library and need backwards support for an specific version you can submit a patch to help with the development or just upgrade your shitty browser :D


## Development:

There is a development web app middleman/sinatra to work with the source files and make the proper tests.
To use application:

### Installation:

+ install ruby
+ execute `bundle install`

### Start app:

`bundle exec rackup config.ru` and visit http://localhost:9292<commit_msg>add dependences to readme<commit_after>#Dante Editor

####Just another Medium editor clone.

##Motivation:

I´ve tried all the medium clones out there, they are really great and all have it´s pros & cons, but none of them have all the features that medium wysywig provides, so I wonder, how difficult could be build my own Medium clone?

Until now I´ve been able to implement the following features:

## Features:

+ HTML sanitizer when paste text or initial load.
+ Image formatting/upload for paste events.
+ Add an unique name to elements on page.
+ Implementation of the famous tooltip on each paragraph when selected
+ Tab navigation.
+ Embeds:
  + Image Uploader with *preview* and caption option.
  + Embed data for pasted link through OEmbed services.
  + Embed media information for pasted links through OEmbed services.
+ CSS tries to use the same fonts used in Medium, if you have setup those fonts, or fallbacks to open fonts (by Google fonts) or system fonts.
  + serif: freight-text-pro fallbacks to Merriweather or Georgia,
  + sans:  jaf-bernino-sans fallbacks to Open Sans or Lucida Grande

## Demo:

[http://michelson.github.io/Dante/](http://michelson.github.io/Dante/)

## Usage:

### HTML:

```html
  <div id="editor">
    your content here
  </div>
```

### Javascript:

```html
  <script type="text/javascript">
    editor = new Dante.Editor(
      {
        el: "#editor",
        upload_url: "/images.json", //it expect an url string in response like /your/server/image.jpg or http://app.com/images/image.jpg
        store_url: "/save" //post to save

      }
    );
    editor.start()
  </script>
```

### Configuration options:

    el:          default: #editor
    debugMode:   default: false
    upload_url:  default: /uploads.json
    oembed_url:  default: http://api.embed.ly/1/oembed?url="
    extract_url: default: http://api.embed.ly/1/extract?url="

## Disclaimer:

This Library will work on early versions of Chrome/Safari/FF/IE.
I don't have any intentions to target all browsers versions, really... if you like this library and need backwards support for an specific version you can submit a patch to help with the development or just upgrade your shitty browser :D

## Dependencies:

+ Jquery
+ Sanitize.js
+ Underscore

drop underscore and jquery dependencies is on the roadmap.


## Development:

There is a development web app middleman/sinatra to work with the source files and make the proper tests.
To use application:

### Installation:

+ install ruby
+ execute `bundle install`

### Start app:

`bundle exec rackup config.ru` and visit http://localhost:9292
{'fraction_non_alphanumeric': 0.0943952802359882, 'fraction_numerical': 0.002359882005899705, 'mean_word_length': 3.5985533453887886, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6899968', 'n_tokens_mistral': 1518, 'n_tokens_neox': 1442, 'n_words': 629}