0
votes

I am stucked with CKEditor. My HTML Source view is showing text in a small text area that with more than four lines show the text inside a scroll area like the image. What am i doing wrong?

enter image description here

Here is my loading CKEditor:

            <div class="col-xs-12 col-sm-12">  
              <textarea name="editor1" id="editor1" th:field="*{content}"></textarea>
              <script>
                $(document).ready(function(){
                  CKEDITOR.replace( 'editor1' );
                });
              </script>
            </div>

And here is my CKEditor configuration:

CKEDITOR.editorConfig = function( config ) {
config.toolbarGroups = [
    { name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
    { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
    { name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
    { name: 'editing', groups: [ 'find', 'selection', 'spellchecker', 'editing' ] },
    { name: 'forms', groups: [ 'forms' ] },
    { name: 'links', groups: [ 'links' ] },
    { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi', 'paragraph' ] },
    '/',
    { name: 'styles', groups: [ 'styles' ] },
    { name: 'colors', groups: [ 'colors' ] },
    { name: 'insert', groups: [ 'insert' ] },
    { name: 'tools', groups: [ 'tools' ] },
    { name: 'others', groups: [ 'others' ] },
];
config.removeButtons = 'Save,Print,NewPage,Templates,PasteFromWord,Replace,Find,SelectAll,Scayt,Form,TextField,Textarea,Select,Button,ImageButton,HiddenField,Radio,Checkbox,RemoveFormat,Indent,Outdent,CreateDiv,BidiLtr,BidiRtl,Unlink,Anchor,Flash,PageBreak,Iframe,BGColor,TextColor,Font,Preview';

};

AM i missing something?

Thanks in advance!

EDIT 1:

I have tried to change the configuration as said below, but still not working :(

To be more specific, the heigh of the editor is fine. The problem is the heigh of the HTML source, which shows an scroll :( New image added, 1 is the normal view and 2 the HTML source button view:

THANKS AGAIN! Error more clear

2
You can apply height to editor. something like stackoverflow.com/questions/9990157/… - Parixit
You need to set the textarea cols and rows attributes - see docs docs.ckeditor.com/#!/guide/… - user2417483
already set the rows and columns on the textarea1 and still having the issue :( I think it's not a heigh problem. I'll edit with a major image to explain better de situation - Tirias

2 Answers

1
votes

It wasnt an CKEditor ISSUE. It was totally my bad. Sorry for the incovenience.

Noob error, i had in the main styles css a line like this

textarea {
  height:100px  
}

Thanks everybody for the help!

0
votes

Ckeditor has different modes: Basic, standard and full modes; You should change

 { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },

to

 { name: 'standardstyles', groups: [ 'standardstyles', 'cleanup' ] },