WordPress/wp-includes/js/tinymce/plugins/wpembed/plugin.js
Sergey Biryukov ae58f104cb Embeds: Rename TinyMCE wpoembed plugin to wpembed.
Props swissspidy.
Fixes #34272.
Built from https://develop.svn.wordpress.org/trunk@35397


git-svn-id: http://core.svn.wordpress.org/trunk@35361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-26 14:50:26 +00:00

18 lines
444 B
JavaScript

(function ( tinymce ) {
'use strict';
tinymce.PluginManager.add( 'wpembed', function ( editor, url ) {
editor.on( 'init', function () {
var scriptId = editor.dom.uniqueId();
var scriptElm = editor.dom.create( 'script', {
id: scriptId,
type: 'text/javascript',
src: url + '/../../../wp-embed.js'
} );
editor.getDoc().getElementsByTagName( 'head' )[ 0 ].appendChild( scriptElm );
} );
} );
})( window.tinymce );