README.md in embeditor-rails-0.0.1 vs README.md in embeditor-rails-0.1.0
- old
+ new
@@ -39,20 +39,30 @@
embeditor = new Embeditor.Base()
embeditor.swap()
</script>
```
-Embeditor works by replacing `A` tags (eg. `<a href="...">Embed</a>`) with the
-appropriate embed. There are several adapters included with this engine:
+Embeditor works by replacing `A` tags with a specific class with the
+appropriate embed. The default class is `embed-placeholder`, but that can be
+configured.
-* **Embedly** - Covers several services, such as SoundCloud, Spotify,
- Facebook, Scribd, among others. Unfortunately, Embedly doesn't work perfectly
- all the time.
+There are several adapters included with this engine:
+
+* **Embedly** - Covers several services, such as SoundCloud, Spotify, Scribd, Google
+ Maps, and others. See
+ [the list of Embedly's providers](http://embed.ly/embed/features/providers).
+ Embedly doesn't always work perfectly, so Embeditor provides manual adapters
+ for some of the providers that Embedly claims to support.
* **Cover It Live**
-* **Document Cloud**
+* **Polldaddy**
* **KPCC's Fire Tracker**
-* **Rebel Mouse**
+* **Instagram**
+* **Facebook**
+* **Twitter**
+* **Storify**
+* **Document Cloud** - Not yet supported.
+* **Rebel Mouse** - Not yet supported.
None of these are included automatically. To install just the ones you need,
add them to your `application.js` :
```javascript
@@ -78,10 +88,24 @@
//= require embeditor/templates
```
### Configuration
+#### Embeditor
+
+You can configure:
+
+* `defaultAdapter` - The adapter that will be used if no adapter is found for
+ the provided service.
+* `defaultService` - The service that will be used if no service is provided
+ on the placeholder link.
+* `wrapperClass` - The class of the div that will get wrapped around the embed.
+* `placeholderClass` - The class of the `<A>` tags that Embeditor will look for.
+
+
+#### Embeds
+
Embeditor offers a system of configuration precedence.
The order of precedence is:
1. `data-attributes` on the placeholder link itself.
2. Adapter-specific configuration in the `Embeditor.Base` object.
@@ -179,10 +203,33 @@
}
})
```
+### oEmbed vs. non-oEmbed
+
+This library isn't necessarily tied to oEmbed, however it does have support for
+it. Even for services which support oEmbed, there are static templates which
+are able to render the embed properly just based off of the provided URL.
+This eliminates any oEmbed headaches (Access-Control-Allowed-Origin, for
+example), and also reduces the time it takes for an embed to load.
+
+
+
## Extending
You can/should add your own adapters! It's easy, I promise. If you add one
which you think could be useful to a lot of people, please submit a PR and
share the wealth!
+
+You can extend your adapter from:
+
+* `Embeditor.Adapter`, which is the base adapter.
+* `Embeditor.Adapters.Oembed`, for oEmbed endpoints.
+* `Embeditor.Adapters.StaticTemplate`, for embeds where the embed code is
+ stored in the `/templates` directory and rendered with JST.
+
+
+## Contributing
+
+If you have an adapter that you think would be useful for many, please open
+up a pull request.