Vivek R. Vivek R. - 1 year ago 78
PHP Question

Resize CKEditor served from CDN

I have added CKEditor to my PHP project via CDN ( to replace current textareas.

I have it linked in the head of applicable files:

<script src="//"></script>

In my main.js file I have replaced the textareas:


//trial code
CKEDITOR.config.width = 600;

I have searched and tried reading the documentation but cannot figure out how to adjust the height/width of each textarea. This is the current appearance on my files:


Any insight on how to fix this would be greatly appreciated.

Answer Source

To change the size of it, you just have to change the HTML code of it. Example:

<textarea name="editor"></textarea>

At this code you have the text area, and to resize it, use CSS like this:

<textarea name="editor" style="width:400px; height:500px;"></textarea>


<textarea name="editor1" width="400" height="500"></textarea>

But, if you want to size it with javascript use this codes:

CKEDITOR.replace('editor', {
  width: '400',
  height: 500

Sincerely, Lucas S. Müller.