~canonical-sysadmins/wordpress/4.9.4

« back to all changes in this revision

Viewing changes to wp-includes/js/tinymce/plugins/wpembed/plugin.js

  • Committer: Barry Price
  • Date: 2017-06-09 02:09:58 UTC
  • mfrom: (1.1.26 upstream)
  • Revision ID: barry.price@canonical.com-20170609020958-838whhwt2196f2vk
Merge WP4.8 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
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 );