Permalink
Browse files

MDL-39220 Javascript: Editor shrinks using collapse button

  • Loading branch information...
1 parent 3a8c438 commit 919834f2ebc3d7a33ada4e6e3e94d1864554942d Colin Chambers committed Apr 18, 2013
@@ -127,29 +127,6 @@ Y.extend(COLLAPSE, Y.Base, {
statusbar.show();
button.setContent(M.util.get_string('hideeditortoolbar', 'form'));
}
-
- // TinyMCE renders the toolbar and path bar as part of the textarea. So toggling these items
- // changes the required size of the rendered textarea. Frustrating but it's the way it's built.
- // So we get TinyMCE to resize itself for us. Clunky but it works.
-
- // Get the tinyMCE editor object for this text area.
- editorid = editortable.ancestor('div').one('textarea').get('id');
- editor = tinyMCE.getInstanceById(editorid);
-
- // Somehow, this editor did not exist.
- if (!editor) {
- return;
- }
-
- // Resize editor to reflect presence of toolbar and path bar..
- iframe = editor.getBody();
- if (iframe) {
- size = tinymce.DOM.getSize(iframe);
- // If objects exist resize editor.
- if (size) {
- editor.theme.resizeTo(size.w, size.h);
- }
- }
},
toggle_collapse_from_event : function(thisevent) {

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -127,29 +127,6 @@ Y.extend(COLLAPSE, Y.Base, {
statusbar.show();
button.setContent(M.util.get_string('hideeditortoolbar', 'form'));
}
-
- // TinyMCE renders the toolbar and path bar as part of the textarea. So toggling these items
- // changes the required size of the rendered textarea. Frustrating but it's the way it's built.
- // So we get TinyMCE to resize itself for us. Clunky but it works.
-
- // Get the tinyMCE editor object for this text area.
- editorid = editortable.ancestor('div').one('textarea').get('id');
- editor = tinyMCE.getInstanceById(editorid);
-
- // Somehow, this editor did not exist.
- if (!editor) {
- return;
- }
-
- // Resize editor to reflect presence of toolbar and path bar..
- iframe = editor.getBody();
- if (iframe) {
- size = tinymce.DOM.getSize(iframe);
- // If objects exist resize editor.
- if (size) {
- editor.theme.resizeTo(size.w, size.h);
- }
- }
},
toggle_collapse_from_event : function(thisevent) {
@@ -125,29 +125,6 @@ Y.extend(COLLAPSE, Y.Base, {
statusbar.show();
button.setContent(M.util.get_string('hideeditortoolbar', 'form'));
}
-
- // TinyMCE renders the toolbar and path bar as part of the textarea. So toggling these items
- // changes the required size of the rendered textarea. Frustrating but it's the way it's built.
- // So we get TinyMCE to resize itself for us. Clunky but it works.
-
- // Get the tinyMCE editor object for this text area.
- editorid = editortable.ancestor('div').one('textarea').get('id');
- editor = tinyMCE.getInstanceById(editorid);
-
- // Somehow, this editor did not exist.
- if (!editor) {
- return;
- }
-
- // Resize editor to reflect presence of toolbar and path bar..
- iframe = editor.getBody();
- if (iframe) {
- size = tinymce.DOM.getSize(iframe);
- // If objects exist resize editor.
- if (size) {
- editor.theme.resizeTo(size.w, size.h);
- }
- }
},
toggle_collapse_from_event : function(thisevent) {

0 comments on commit 919834f

Please sign in to comment.