Having trouble creating a WYSIWYG field using the Form Builder
I have the following field defined, but the editor never shows up
$fields['Profile'] = array(
'type' => 'wysiwyg',
'editor' => 'markitup',
'display_label' => FALSE,
'required' => FALSE
);
$this->form_builder->set_fields($fields);
$vars['business_form'] = $this->form_builder->render_divs();
No javascript errors or other errors on the page...what am I doing wrong?
Comments
$this->form_builder->load_custom_fields(APPPATH.'config/custom_fields.php');
You may also need to define some other javascript configuration variables that FUEL uses too for paths. You may also need to create a global variable called "jqx_config" that has properties like so:
jqx_config.assetsImgPath = "<?=img_path('')?>"; jqx_config.editor = 'ckeditor';
Or you can include the fuel/modules/fuel/views/_blocks/fuel_header_jqx.php file.
I didn't need the jqx_config, but not I need to modify which options are available on the editor. Where would I set this?
1. The fuel/application/config/MY_fuel.php file has a "ck_editor_settings" configuration parameter you can change
2. There is a "editor_config" you ca set as a parameter:
http://docs.getfuelcms.com/general/forms#wysiwyg
3. You can set a javascript global variable object on your page of "jqx_config.ckeditorConfig" which will get looked at before rendering.
Can you provide a simple example of a controller that users the form_builder to build a form that includes a WYSIWYG field (ckeditor).
I'm getting all kinds of javascript errors, but CKEditor shows up but it looks a little funny.
Very frustrating
TypeError: 'undefined' is not a function (evaluating 'fuel.getModule()') from custom_fields.js line 76