diff --git a/css/linkit.css b/css/linkit.css index 08a8f52a50b47cb01bc0ff21a3eaf0d2a7bd79e3..482c76900e7380dc244d7ebd9ea8c1ccad057791 100644 --- a/css/linkit.css +++ b/css/linkit.css @@ -224,5 +224,5 @@ } .ui-dialog.ui-front.linkit-wrapper { - z-index: 2000; + z-index: 210000; } diff --git a/editors/tinymce/editor_plugin.js b/editors/tinymce/editor_plugin.js index 04a875a8797a081ebf16ba3119c2ac5d2549a3c2..098893d7d9bc45f7c836942b3b27e94d960e558c 100644 --- a/editors/tinymce/editor_plugin.js +++ b/editors/tinymce/editor_plugin.js @@ -18,11 +18,20 @@ // Set the editor object. Drupal.settings.linkit.currentInstance.editor = editor; + // Get the instance id. Full screen mode is a completly separate + // instance of TinyMCE added to the page subsequently by the TinyMCE + // external library. As such this bypasses a lot of built in Drupal + // functionality from modules like WYSIWYG and distributions like + // Panopoly. + // @see https://www.drupal.org/node/1125582 + var instanceId = editor.id == 'mce_fullscreen' ? editor.getParam('fullscreen_editor_id') : editor.id; + // Find the current input format of the field we're looking at. Note that we get it in the form // "format" so we use .substring() to remove the "format". - if (Drupal.wysiwyg && Drupal.wysiwyg.instances[editor.id].format) { - var format = Drupal.wysiwyg.instances[editor.id].format.substring(6); - } else { + if (Drupal.wysiwyg && Drupal.wysiwyg.instances[instanceId] && Drupal.wysiwyg.instances[instanceId].format) { + var format = Drupal.wysiwyg.instances[instanceId].format.substring(6); + } + else { alert(Drupal.t('Could not find the Linkit profile.')); return; }