I\'m using the tinymce-rails gem which uses TinyMCE 4 and I\'m loading the link plugin and all this is initiated after/in a colorbox popup.
link
TinyMCE editor i
TinyMCE5 and MagnificPopup compatibility:
$.magnificPopup.instance._onFocusIn = function( e ) { try { if( $( e.target ).attr( 'class' ).indexOf( 'tox-' ) >= 0 ) { return true; } } catch( e ) {} $.magnificPopup.proto._onFocusIn.call( this, e ); }