Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Text plugin can end up the wrong height if using TinyMCE #691

kezabelle opened this Issue Feb 7, 2011 · 1 comment


None yet
2 participants

kezabelle commented Feb 7, 2011

By default, in a scenario where content isn't cached (for instance, when agressive proxies are in use), providing certain configuration settings can lead the plugin editor to be the incorrect size when displaying TinyMCE in the admin.

As far as I can tell, the crux of the matter is as follows:
The default setting for tinymce renders a reasonably small window, based on the dimensions of the textarea widget. TinyMCE, through a configuration dictionary that djangot-tinymce provides, allows the specific height and width to be set.
When editing a plugin, the iframe is loaded, and fires the appropriate runOnLoad which updates the parent height. In certain circumstances (mostly in IE, with a cold cache), this event fires before TinyMCE.init() runs, which means the parent is resized, and then TinyMCE resizes itself , leaving the plugin displaying with a scrollbar which makes editing a chore.

The solution we've had to apply, which seems to work, though seems brittle and prone to me, is to duplicate (or re-call) runOnLoad once everything is set up. For our purposes, we just copied the code into a new function which can be called by specifying 'oninit': 'IeFixTinyMCE' in the TinyMCE configuration dictionary (Happily, if a string is passed in, TinyMCE will attempt to resolve it to a function). This is the least invasive way I could see of doing it in the short time I got to spend trying to fix it.

Using django-tinymce==1.5.1.dev101, Django 1.2.4, and a bunch of recent versions of django-CMS from git.


beniwohli commented May 28, 2013

This is not really relevant anymore with django CMS 3.0, since a) we don't ship tinymce anymore, and b) the way that plugins are presented in frontend editing changed completely.

@beniwohli beniwohli closed this May 28, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment