Welcome Guest, Not a member yet? Register   Sign In
CkEditor on CI
#1

[eluser]il_dandi[/eluser]
Hi! I've downloaded CkEditor....
http://ckeditor.com/download

it's great but I dont' know hot to show this RTE in a view... I've tried to insert


[removed][removed]
[removed][removed]
<link href="<?=base_url()?>css/sample.css" rel="stylesheet" type="text/css" />


and

my text area

<textarea cols="80" id="editor1" name="editor1" rows="10"></textarea>


but I show a simple text form



I've show (in example found in zip file)
ckeditor/_samples/output_html.html

with sample.css and sample.js

I've used the same file but nothig...

can you help me?

Thanks
#2

[eluser]il_dandi[/eluser]
please help me!!
#3

[eluser]Unknown[/eluser]
Please help me to.
#4

[eluser]Twisted1919[/eluser]
I don't see what's your big problem, beside doing something without reading a bit of code .
the right way is simple and very straight forward :
Code:
//IN THE header or the view, it's important to be called before the textarea .
<that_tag_for_js src="url/to/ckeditor/ckeditor.js"></that_tag_for_js>
//Then, your textarea :
&lt;textarea name="content" id="content" class="input_textarea"&gt;&lt;/textarea>
<that_tag_for_js>
CKEDITOR.replace('content',{height:150,width:720,resize_minWidth:720,resize_maxWidth:720,enable_resize:true});
</that_tag_for_js>
//And voila, the editor .
#5

[eluser]il_dandi[/eluser]
It' doesn't works

I've create a ckeditor on my app folder an in my view I've:

<SSSS type="text/javascript" src="&lt;?=base_url()?&gt;ckeditor/ckeditor.js"></SSSS>
<SSSS src="&lt;?=base_url()?&gt;ckeditor/_samples/sample.js" type="text/javascript"></SSSS>
&lt;link href="&lt;?=base_url()?&gt;ckeditor/_samples/sample.css" rel="stylesheet" type="text/css" /&gt;



in HTML I've


&lt;textarea name="content" id="content" class="input_textarea"&gt;&lt;/textarea>
<SSSS type="text/javascript">
CKEDITOR.replace('content',{height:150,width:720,resize_minWidth:720,resize_maxWidth:720,enable_resize:true});
</SSSS>


Why it doesn't works?

Thanks
#6

[eluser]Twisted1919[/eluser]
Code:
<SSSS src=”&lt;?=base_url()?&gt;ckeditor/_samples/sample.js” type=“text/javascript”></SSSS>
&lt;link href=”&lt;?=base_url()?&gt;ckeditor/_samples/sample.css” rel=“stylesheet” type=“text/css” /&gt;

Did i told u to use the samples ? Nope i didn't, that's the reason it doesn't work .
Use my example and only my example nothing extra and it'll work .


BTW, if you look into the source , do you see the full url to your ckeditor.js ?
I have a hunch that your server doesn't support short open tags, and &lt;?= base_url() does nothing .
If is like so, do it in the right way (you should do it anyway) :
Code:
<SSSS type=“text/javascript” src=”&lt;?php echo base_url()?&gt;ckeditor/ckeditor.js”></SSSS>
And be sure that the url helper is loaded too.
#7

[eluser]il_dandi[/eluser]
Thanks for your replies!!

I had already tried with your solution but I show only a simple text area Sad

About short open tags, I use these in my page

<SSSS type="text/javascript" src="&lt;?=base_url()?&gt;js/jquery-ui-1.8.2.custom.min.js"></SSSS>

without problem!!

Sad(
#8

[eluser]il_dandi[/eluser]
Now it works!!!

I've copyed ckeditor folder in js folder!!

Thanks




Theme © iAndrew 2016 - Forum software by © MyBB