We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents af50087 + 910c1b7 commit faae59aCopy full SHA for faae59a
shared/tinymce/toolbar.js
@@ -75,7 +75,8 @@
75
function onClick( callback ) {
76
return function() {
77
editor.undoManager.transact( function() {
78
- callback( editor, window.element );
+ var element = editor.selection.getSelectedBlocks()[ 0 ];
79
+ callback( editor, 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( event ) {
8
- element = window.element = event.parents[ event.parents.length - 1 ];
+ editor.on( 'nodechange', function() {
+ element = editor.selection.getSelectedBlocks()[ 0 ];
9
10
11
// Global controls
0 commit comments