Saturday, 31 August 2013

how do i resize tinymce after changin font-size?

how do i resize tinymce after changin font-size?

Issue : when i have changed the font-size like 38pt, the text goes out of
the editor.
I am using tinymce 4.0.
This is my script to load tinymce
<script type="text/javascript">
tinymce.init({
selector: "div#textareasDiv",
theme: "modern",
inline: true,
plugins: [ "textcolor,table"],
toolbar1: " bold italic underline | alignleft aligncenter
alignright alignjustify | forecolor backcolor | fontselect |
fontsizeselect",
image_advtab: true,
menubar: false,
fixed_toolbar_container: "#toolbarCon"
});
</script>
and
<div id="textareasDiv"></div>
<div id="toolbarCon"></div>
and
<style>
#textareasDiv { padding:2px
5px;width:170px;height:80px;background:transparent;word-wrap: break-word;
}
</style>
And I am trying to get its outerHeight so that i can make change on it :
setup : function(ed)
{
ed.on('change', function(e)
{
alert($(this.getContainer()).outerHeight());
});
}
But it gives me nothing.
How can i resize tinymce editor after changing font-size?

No comments:

Post a Comment