Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions shared/tinymce/toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@
function onClick( callback ) {
return function() {
editor.undoManager.transact( function() {
var element = editor.selection.getSelectedBlocks()[ 0 ];
callback( editor, element );
callback( editor, window.element );
} );
}
}
Expand Down
4 changes: 2 additions & 2 deletions tinymce-single/tinymce/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

// Set focussed block. Global variable for now. Top-level node for now.

editor.on( 'nodechange', function() {
element = editor.selection.getSelectedBlocks()[ 0 ];
editor.on( 'nodechange', function( event ) {
element = window.element = event.parents[ event.parents.length - 1 ];
} );

// Global controls
Expand Down