Skip to content

itteco/redactor-oembed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Iframely plugin for Redactor

This plugin adds oEmbed support for Imperavi's Redactor via Iframely API. It providers responsive rich media and image embeds via Iframely API endpoint, that supports over 1800 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

Demo

Check out the simple plugin's demo on https://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

<!-- Setup iframely redactor plugin. -->
<script src="redactor_iframely_plugin.js"></script>

<!-- Call Redactor -->
<script type="text/javascript">
    $(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}'
        });
    });
</script>

Get your Iframely API key at iframely.com. You can also configure any other API parameters in your oembedEndpoint.

To fix Redactor styles issues when you stroke backspace, configure oembedEndpoint with &omit_css=1 and add requires Iframely styles to your page yourself:

License & Contributing

This plugin is licensed under MIT. Imperavi's Redactor has own license.

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

Releases

No releases published

Packages

No packages published