Francisco Labanca Francisco Labanca - 1 month ago 23
HTML Question

CKEDITOR resize not working

I'm currently using ckeditor on my website and I want it to have a specific heigth. I tried to use

editor.resize('100%','500',true)
but it's not working.

I want to disable the clickable resize function also, but the heigth is not modified whenever I disable the resize function or not.

My question would be how do I set a specific heigth for my CKEDITOR then?

Edit: html and script

<div id="textContent">
<h3>Descripción:</h3>
<textarea id="inputPara" rows="33" cols="84" autocomplete="off" placeholder="Respuesta, explicación..."></textarea>
</div>
<script type="text/javascript">
$(function()
{
var editor = CKEDITOR.replace('inputPara');
editor.resize('100%', '500px', true);

});



Answer
try this example

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="robots" content="noindex, nofollow">
    <title>Setting editor size</title>
    <script src="http://cdn.ckeditor.com/4.5.11/standard-all/ckeditor.js"></script>
</head>

<body>

    <textarea cols="80" id="editor1" name="editor1" rows="10" >&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;
    </textarea>

    <script>
        CKEDITOR.replace( 'editor1', {
            width: '70%',
            height: 500
        } );
    </script>
</body>

</html>
Comments