david803
Založený: 10.05.2010
Príspevky: 6
Zaslal: 2010-05-10 16:20
Návrat hore
Odpovedať s citátom
|
My CKEditor version is 3.0.1
Step 1. line 1047 and line 1195 :
echo '<textarea class="',$css_class_name,'" name="',$this->cgi['prefix']['data'].$this->fds[$k],'"';
Change to:
echo '<textarea ';
if (isset($this->fdd[$k]['textarea']['id'])) {
echo 'id="',$this->fdd[$k]['textarea']['id'],'" ';
}
if (isset($this->fdd[$k]['textarea']['class'])) {
echo 'class="',$this->fdd[$k]['textarea']['class'],'" ';
} else {
echo 'class="',$css_class_name,'" ';
}
echo 'name="',$this->cgi['prefix']['data'].$this->fds[$k],'"';
Step 2. Add "ckeditor.js" path, like this:
<script type="text/javascript" src="editor/ckeditor/ckeditor.js"></script>
Step 3. use like this:
$opts['fdd']['myField'] = array(
'name' => 'Memo',
'select' => 'T',
'maxlen' => 65535,
'textarea' => array(
'id' => 'myField',
'class'=> 'ckeditor',
'rows' => 5,
'cols' => 50),
'sort' => true
);
OK! Good luck!
|
guppy
Založený: 17.03.2009
Príspevky: 9
Zaslal: 2011-02-20 16:30
Návrat hore
Odpovedať s citátom
|
Thank you, the CKEditor integration works fine, but if you need to upload/choose pictures or files with CKFinder the browse button doesn't show?
I have tried to link to it using:
<script type="text/javascript" src="/ckfinder/ckfinder.js"></script>
The samples with ckfinder integration works "outside" phpMyEdit, so the installation should be OK.
Any hints?
EDIT: I found the solution myself. Correct to add the link as I do above, but also needed to add the following line
CKFinder.setupCKEditor( null, '/ckfinder/' );
to ckeditor/config.js
| david803 Napísal: |
My CKEditor version is 3.0.1
Step 1. line 1047 and line 1195 :
echo '<textarea class="',$css_class_name,'" name="',$this->cgi['prefix']['data'].$this->fds[$k],'"';
Change to:
echo '<textarea ';
if (isset($this->fdd[$k]['textarea']['id'])) {
echo 'id="',$this->fdd[$k]['textarea']['id'],'" ';
}
if (isset($this->fdd[$k]['textarea']['class'])) {
echo 'class="',$this->fdd[$k]['textarea']['class'],'" ';
} else {
echo 'class="',$css_class_name,'" ';
}
echo 'name="',$this->cgi['prefix']['data'].$this->fds[$k],'"';
Step 2. Add "ckeditor.js" path, like this:
<script type="text/javascript" src="editor/ckeditor/ckeditor.js"></script>
Step 3. use like this:
$opts['fdd']['myField'] = array(
'name' => 'Memo',
'select' => 'T',
'maxlen' => 65535,
'textarea' => array(
'id' => 'myField',
'class'=> 'ckeditor',
'rows' => 5,
'cols' => 50),
'sort' => true
);
OK! Good luck! |
|
|
Odoslať novú tému
Odpovedať na tému
|
|