I've installed the CK Editor 6.x-1.1 module with CKEditor 3.3.1 and kept most default configuration items.
I created a form module with one textarea field and the CKEditor menu icons do not display at all.
I have done the following:
1. Set permissions.
2. Set to Full HTML.
3. Added the *.edit-dizm-test-field to the "Include" list. (that shouldn't be necessary, should it?)
I do get the standard CKEditor message below the textarea field:
CKEditor: the ID for excluding or including this element is dizm_test/form.edit-dizm-test-field.
Looking at the source code, the only CKEditor file that gets loaded is: /sites/all/modules/ckeditor/ckeditor.css?x"
No CKEditor javascript at all.
The CKEditor module is installed in /sites/all/modules/ckeditor and the appropriate files seem to be there. CKEditor appears in the modules list and I can configure it without issue.
The CKEditor app is installed in /sites/all/modules/ckeditor/ckeditor and the appropriate files seem to be there, including the javascript files.
The global settings for CKEditor show the Path to CKEditor and the Local path to CKEditor set as:
Current path: /sites/all/modules/ckeditor/ckeditor
My test form code is as follows:
function dizm_test_menu() {
$items['test/form'] = array(
'page callback' => 'dizm_test_form',
'access arguments' => array('access content'),
'description' => t('Test sandbox.'),
'type' => MENU_CALLBACK,
);
return $items;
}
function dizm_test_form(){
return drupal_get_form('dizm_test_this_form');
}
function dizm_test_this_form($form_state){
$form['dizm_test_field'] = array('#type' => 'textarea', '#title' => 'Test Field', '#cols'=>100, '#rows'=>10);
return $form;
}
Any ideas would be greatly appreciated, as I've been banging my head against the wall with this problem for two days. Thanks.
Comments
Look at page.tpl.php in your
Look at page.tpl.php in your theme directory. Make sure you have the following code somewhere in the page (it's best right at the very bottom before the closing <body> tag):
print $closure;No guarantees this is your problem, but it's a start, seeing as it appears that your javascript files aren't being loaded.
Contact me to contract me for D7 -> D10/11 migrations.
print $closure is in my theme
Thanks Jay, but no luck. The print $closure is part of my theme. I'm using a sub-theme of the Zen theme. Also, I switched the theme back to Garland and still no javascript. I am getting javascript for other loaded modules such as img_assist and colorbox:
You do seem to be right on target though, javascript for CKEditor is not getting loaded in the $scripts array for some reason. I just don't know the reason. BTW, I went down the path of loading WYSIWYG and tinymce. I had to load tinymce in a non-standard path per instructions: /sites/all/libraries. WYSIWIG configuration sees the tinymce editor and I am able to configure it as the target editor. Guess what? Same problem, no javascript for WYSIWYG or tinymce.
Is there anything else you can think of, that would keep javascript from being loaded?
Did you download the actual
Did you download the actual ckeditor files from the ckeditor site and install them in the sites/all/modules/ckeditor folder? And are they in the correct subfolder?
Contact me to contract me for D7 -> D10/11 migrations.
Yes, it appears they are installed correctly.
The CKEditor module is installed in /sites/all/modules/ckeditor and the appropriate files seem to be there. CKEditor appears in the modules list and I can configure it without issue.
The CKEditor app is installed in /sites/all/modules/ckeditor/ckeditor and the appropriate files seem to be there, including the javascript files.
This is verified in the CKEditor config mgt as follows:
I think my problem is at a lower level (who knows why?) as I installed WYSIWYG and tinymce. Their javascript doesn't get referenced either. The thing that really bugs me is the same thing happens with the Garland theme.
Does CKEditor work for any content type? or simply not with FAPI
Hi,
Are you saying that you used the Admin panel, created a test "page" (i.e. any built in content type) and CKEditor works. However, when you build a form with FAPI it doesn't?
I know how to turn off the wysiwig editors with FAPI. However, I can't figure out if you simply have a post installation issue or you are actually developing anything.
Resolution?
Did you get this working? I am having the same problem. CKeditor works for node types just fine, but on a form api form I do not see it for the textarea fields, I do see the if you want to include/exclude this elemenet is ..... and I do have an Input format fields set for the form element (and the default is Full HTML).
Try adding a filter element
Hi,
Try adding a filter element to your form definition:
'format' => filter_form($value = FILTER_FORMAT_DEFAULT, NULL, array('format'))
not working
I have tried to add the format but its still not coming.
Its coming on node/add/page and not coming on the node in which I have used form api.
Is there any solution? I have been heading from last 3 days still didn't find the exact solution.
Any help would be appreciated.
find the solution
Just add the id property to your form element.
e.g
$form['sample'] = array('#type'=>'textarea', '#id' => description)
its works for me.
the solution with id works
the solution with id works for me to. Thank you for the tip. How did you come to this? #id as I know is not part of Fomr API.
CKEditor in Drupal 7 (D7) forms
Hello !
On Drupal 7 (D7), replacing
by
makes CKEditor working ! :-)
Probably the answer.
Unfortunately, I had to regroup and go with Dot Net Nuke instead. But, I'm working another Drupal project currently and I hope this will work if I need to create my own forms again.