An open API service indexing awesome lists of open source software.

https://github.com/itteco/redactor-oembed

Plugin to extend Imperavi's Redactor with oEmbed
https://github.com/itteco/redactor-oembed

Last synced: 11 months ago
JSON representation

Plugin to extend Imperavi's Redactor with oEmbed

Awesome Lists containing this project

README

          

# Iframely plugin for Redactor

This plugin adds oEmbed support for [Imperavi's Redactor](http://imperavi.com/redactor) via Iframely API. It providers responsive rich media and image embeds via [Iframely API](http://iframely.com) endpoint, that supports [over 1800](https://iframely.com/domains) publishers and summary cards for the rest of the web.

You will get YouTube, Twitter, Facebook, Tumblr, Vimeo, SoundCloud, Flickr, Google Maps, GfyCat, Giphy, Imgur, Vimeo - all the usual suspects plus thousands more.

You will need to define oEmbed API endpoint in your settings, see below. For Iframely version, get your API key at [iframely.com](https://iframely.com)

## Demo

Check out the simple plugin's demo on [http://itteco.github.io/redactor-oembed/](http://itteco.github.io/redactor-oembed/).

Get embeds through the dialog via 'Embed' button in Redactor's toolbar. The plugin also tries to recognize http links on a separate in editor as author types it.

## Configure the plugin with API endpoint




$(document).ready(function() {
$('#redactor').redactor({
// Add 'iframely' to plugins.
plugins: ['iframely'],

// Setup your iframely endpoint path. The sample is given for cloud version.
oembedEndpoint: '//iframe.ly/api/oembed?api_key={YOUR API KEY HERE}'
});
});

Get your Iframely API key at [iframely.com](https://iframely.com). You can also configure any other [API parameters](https://iframely.com/docs/parameters) in your oembedEndpoint.

To fix Redactor styles issues when you stroke backspace, configure `oembedEndpoint` with `&omit_css=1` and [add requires Iframely styles](https://iframely.com/docs/omit-css) to your page yourself:

## License & Contributing

This plugin is licensed under MIT. [Imperavi's Redactor](http://imperavi.com/redactor) has own license.

Feel free to submit an issue or fork and submit pull-requests with enhancements or fixes.