]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-includes/js/tinymce/plugins/wpembed/plugin.js
WordPress 4.7.2-scripts
[autoinstalls/wordpress.git] / wp-includes / js / tinymce / plugins / wpembed / plugin.js
1 (function ( tinymce ) {
2         'use strict';
3
4         tinymce.PluginManager.add( 'wpembed', function ( editor, url ) {
5                 editor.on( 'init', function () {
6                         var scriptId = editor.dom.uniqueId();
7
8                         var scriptElm = editor.dom.create( 'script', {
9                                 id: scriptId,
10                                 type: 'text/javascript',
11                                 src: url + '/../../../wp-embed.js'
12                         } );
13
14                         editor.getDoc().getElementsByTagName( 'head' )[ 0 ].appendChild( scriptElm );
15                 } );
16         } );
17 })( window.tinymce );