ckeditor and cakephp - I can't make the text area bigger - what am I doing wrong
sorry for being such a plonker but I'm a bit new and this is doing my 'ed in.
I'm using cakephp and I've got a form which uses ckeditor as the textarea. I include the javascript fil开发者_开发问答e and jquery and then simply put:
echo $this->Form->input('Campaign.story',array('rows'=>'5', 'cols'=>'15','class'=>'ckeditor'));
in a view file to call the editor. This causes the ckeditor to appear ok but I can't get it to the size I want it. No matter what I change the above to I can't get it to be the proper size. As soon as I remove the class it sizes properly.
The above makes this:
<div class="input textarea">
<label for="CampaignStory">Story</label>
<textarea name="data[Campaign][story]" rows="5" cols="15" class="ckeditor" id="CampaignStory" ></textarea>
</div>
I've tried using css to make it wider like this:
#CampaignStory{width:400px;}
but that doesn't work either.
Set
config.width = '1000px'; // or whatever
in /ckeditor/config.js
The editor area replaces the textarea. Changing cols / rows of the underlying textarea won't change ckEditors interface.
will
You can not specify width and hieght in your input and expect work fine with CKEDITOR.Beacause it wont adjust height and width of CKEDitor
To specify height and width of of a CKEDiTOR
field use this code in your css
.cke_contents{
height: 400px !important;
width: 550px !important;
}
Go to CKEditor configuration file in your application, and look for width property and change the default value of your choice.
精彩评论