I would like to change the width and height of the wysiwyg editor with jQuery but I can't figure out how. I've tried changing the css width of the textarea and I've even tried destroying the ckeditor instance and restarting it after changing the css width but that doesn't work either. Is there a function I can use? There isn't much code but I know how some people like to be able to look at the code you're using so here it is:
in .js file:
in .php file:
in .js file:
function resizeWysiwyg(width) { $(".wysiwyg").css("width", width); }
in .php file:
<select name="box-type"> <option value="1" onclick="resizeWysiwyg('400px')">Box 1</option> <option value="2" onclick="resizeWysiwyg('500px')">Box 2</option> <option value="3" onclick="resizeWysiwyg('700px')">Box 3</option> </select><br /> <textarea class="wysiwyg" id="ckeditor"></textarea>
Re: Altering editor style with jQuery (in particular: width)