} );
editor.once( 'preinit', function() {
- toolbar = editor.wp._createToolbar( [
- 'wp_view_edit',
- 'wp_view_remove'
- ] );
+ if ( editor.wp && editor.wp._createToolbar ) {
+ toolbar = editor.wp._createToolbar( [
+ 'wp_view_edit',
+ 'wp_view_remove'
+ ] );
+ }
} );
editor.on( 'wptoolbar', function( event ) {