Inserting content in fullscreen TinyMCE

-cam- - October 17, 2009 - 01:57
Project:Wysiwyg
Version:6.x-2.x-dev
Component:Editor - TinyMCE
Category:bug report
Priority:minor
Assigned:Unassigned
Status:needs review
Description

TinyMCE 3.2.7, clicking page break button won't insert page break (does nothing) in full screen mode, works as expected when not in full screen mode.

#1

TwoD - October 21, 2009 - 16:42
Title:Full Screen - Page Break» Inserting content in fullscreen TinyMCE
Version:6.x-2.0» 6.x-2.x-dev
Status:active» needs review

TinyMCE creates a completely different editor for fullscreen mode and does not relay changes made to the original editor to the new one. We explicitly state which instance we want the inserted content to go to, so we must check to see if there's an active fullscreen editor and if it was created based on the correct instance.
Here's a patch to 6.x-2.x-dev to fix that. It can be applied to 2.0 as well.

Thanks for finding and reporting this issue.

AttachmentSize
wysiwyg-606952-fullscreen.patch 1.4 KB

#2

Internetter - December 10, 2009 - 20:04

Please look at the functions openDialog() and closeDialog(). These should also get the "fullscreen" check. Perhaps it is possible to set this.field right, if tinymce is in fullscreen-mode.

Here are fragment, sorry not complete patch. ;-(

  openDialog: function(dialog, params) {
  var instanceId = tinyMCE.activeEditor.id == 'mce_fullscreen' && tinyMCE.activeEditor.getParam('fullscreen_editor_id') == this.field ? 'mce_fullscreen' : this.field;
    var editor = tinyMCE.get(instanceId);
    editor.windowManager.open({
      file: dialog.url + '/' + instanceId,
      width: dialog.width,
      height: dialog.height,
      inline: 1
    }, params);
  },

  closeDialog: function(dialog) {
  var instanceId = tinyMCE.activeEditor.id == 'mce_fullscreen' && tinyMCE.activeEditor.getParam('fullscreen_editor_id') == this.field ? 'mce_fullscreen' : this.field;
    var editor = tinyMCE.get(instanceId);
    editor.windowManager.close(dialog);
  },

bye Martin

 
 

Drupal is a registered trademark of Dries Buytaert.