We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents faae59a + c4c1950 commit a2e6695Copy full SHA for a2e6695
shared/tinymce/toolbar.js
@@ -75,8 +75,7 @@
75
function onClick( callback ) {
76
return function() {
77
editor.undoManager.transact( function() {
78
- var element = editor.selection.getSelectedBlocks()[ 0 ];
79
- callback( editor, element );
+ callback( editor, window.element );
80
} );
81
}
82
tinymce-single/tinymce/block.js
@@ -4,8 +4,8 @@
4
5
// Set focussed block. Global variable for now. Top-level node for now.
6
7
- editor.on( 'nodechange', function() {
8
- element = editor.selection.getSelectedBlocks()[ 0 ];
+ editor.on( 'nodechange', function( event ) {
+ element = window.element = event.parents[ event.parents.length - 1 ];
9
10
11
// Global controls
0 commit comments