summaryrefslogtreecommitdiff
path: root/program/js/tinymce/plugins/autoresize/plugin.min.js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-01-20 18:46:28 +0100
committerAleksander Machniak <alec@alec.pl>2014-01-20 18:46:28 +0100
commit6fa5b437a48485927e5d90abe061ee723f3b45c2 (patch)
tree118a32ddde4af92c7def9838b10beddb9f0fe241 /program/js/tinymce/plugins/autoresize/plugin.min.js
parentfac59dc441d25f7204fb6013bf88db90c01ae34b (diff)
Update to TinyMCE 4.x
Diffstat (limited to 'program/js/tinymce/plugins/autoresize/plugin.min.js')
-rw-r--r--program/js/tinymce/plugins/autoresize/plugin.min.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/program/js/tinymce/plugins/autoresize/plugin.min.js b/program/js/tinymce/plugins/autoresize/plugin.min.js
new file mode 100644
index 000000000..9a46de837
--- /dev/null
+++ b/program/js/tinymce/plugins/autoresize/plugin.min.js
@@ -0,0 +1 @@
+tinymce.PluginManager.add("autoresize",function(e){function t(i){var a,s,r=e.getDoc(),g=r.body,u=r.documentElement,m=tinymce.DOM,l=n.autoresize_min_height;"setcontent"==i.type&&i.initial||e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen()||(s=tinymce.Env.ie?g.scrollHeight:tinymce.Env.webkit&&0===g.clientHeight?0:g.offsetHeight,s>n.autoresize_min_height&&(l=s),n.autoresize_max_height&&s>n.autoresize_max_height?(l=n.autoresize_max_height,g.style.overflowY="auto",u.style.overflowY="auto"):(g.style.overflowY="hidden",u.style.overflowY="hidden",g.scrollTop=0),l!==o&&(a=l-o,m.setStyle(m.get(e.id+"_ifr"),"height",l+"px"),o=l,tinymce.isWebKit&&0>a&&t(i)))}function i(e,n,o){setTimeout(function(){t({}),e--?i(e,n,o):o&&o()},n)}var n=e.settings,o=0;e.settings.inline||(n.autoresize_min_height=parseInt(e.getParam("autoresize_min_height",e.getElement().offsetHeight),10),n.autoresize_max_height=parseInt(e.getParam("autoresize_max_height",0),10),e.on("init",function(){e.dom.setStyle(e.getBody(),"paddingBottom",e.getParam("autoresize_bottom_margin",50)+"px")}),e.on("change setcontent paste keyup",t),e.getParam("autoresize_on_init",!0)&&e.on("init",function(){i(20,100,function(){i(5,1e3)})}),e.addCommand("mceAutoResize",t))}); \ No newline at end of file