public
Last active

  • Download Gist
wysihtml5_resizes.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
// Editor specific listener
editor.on("aftercommand:composer", resize); // Set bold, italic, etc
editor.on("change_view", resize); // Change wysi/source view
 
// Typing listeners
editor.on("newword:composer", resize); // Only way to observe on firefox
editor.on("undo:composer", resize);
editor.on("paste", resize);
iframeBody.addEventListener('keyup', resize, false);
iframeBody.addEventListener("keydown", resize, false);
iframeBody.addEventListener("keypress", resize, false);
// Focus/Blur listeners
editor.on("focus", resize);
editor.on("blur", resize);
iframeBody.addEventListener('blur', resize, false);
iframeBody.addEventListener('focus', resize, false);
 
// Set the first size
editor.on("load", resize);
resize();

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.