Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
42
rated 0 times [  45] [ 3]  / answers: 1 / hits: 19621  / 9 Years ago, tue, june 2, 2015, 12:00:00

I get 3 ckeditor textareas in one page. The problem is that I want one of the textarea to be the same size than twice the others. I can't find how to resize ONLY ONE textarea.



<script type=text/javascript>
CKEDITOR.config.height='600px';
</script>


Works fine but it changes all the textareas.
I also tried



<script type=text/javascript>            
CKEDITOR.replace('Resolution',{
height : '400px',
});
</script>


But this doesn't work... I tried to change my config.js file but still nothing.
If i put in my config.js



CKEDITOR.editorConfig = function( config ) {

config.width = '1000px';
config.height = '700px';
};


It doesn't work.



To summarize: How can i resize a textarea using its ID ??


More From » ckeditor

 Answers
33

This should work for the a <textarea id=Resolution>:



    <script>
CKEDITOR.replace( 'Resolution', {
height: 400
} );
</script>


Remember to clear your browser cache after changing the configuration!



Note that config.height accepts an integer to denote a value in pixels or a CSS value with a unit.



See also the Setting Editor Size sample in CKEditor SDK and the relevant documentation.


[#66370] Sunday, May 31, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
dasias

Total Points: 344
Total Questions: 100
Total Answers: 100

Location: Hong Kong
Member since Tue, Oct 19, 2021
3 Years ago
;