Posted by pyone on March 9, 2011 at 4:56am
WYSIWYG is working fine in other pages but it is not displayed in panel popup pane.
How can I make it display?
I use
Panel 6.x-3.9, TinyMCE editor
WYSIWYG 6.x-2.3
Drupal 6.
WYSIWYG is working fine in other pages but it is not displayed in panel popup pane.
How can I make it display?
I use
Panel 6.x-3.9, TinyMCE editor
WYSIWYG 6.x-2.3
Drupal 6.
Comments
not sure if it can be done
Hi, I had the same issue rencently also with TinyMCE; after struggling some time, I came to the conclusion that panels are being "thought" more to SHOW nodes than to EDIT them, right?. In my projects I use panels for the front-end and not to arrange the administration UI or editing nodes.
Anyone got what pyone asks for?
RafaBlanes
contacto@ellibronegrodelprogramador.com
Agile Drupal Development and more...
pyone may be referring to
pyone may be referring to custom HTML pane component
I agree it is better to create a separate node with the HTML then place that node in the pane
FWIW most developers consider CKEditor superior to TinyMCE, which is the default wysiwyg for Joomla!
¿ are you netsperienced ?
♥ follow me @decibelplaces ∞
Solved
Hi,
I found the solution at last. To display WYSIWYG editor in panel pane popup, it must be loaded in "panels editing page".
So, I added a hidden textarea which loaded WYSIWYG to that page in hook_form_alter of my custom module and it is working now.
if($form_id == 'panels_edit_display_form'){
$form['tinymce_hidden'] = array(
'#type' => 'fieldset',
'#attributes' => array('style' => 'display: none'),
);
$form['tinymce_hidden']['tinymce_prerender'] = array(
'#type' => 'textarea',
);
$form['tinymce_hidden']['format'] = filter_form();
}
Thanks.
Code
<?phpif($form_id == 'panels_edit_display_form'){
$form['tinymce_hidden'] = array(
'#type' => 'fieldset',
'#attributes' => array('style' => 'display: none'),
);
$form['tinymce_hidden']['tinymce_prerender'] = array(
'#type' => 'textarea',
);
$form['tinymce_hidden']['format'] = filter_form();
}
?>
Mini panels
In the case of mini panels, for my site, I had to also check form form "ctools_export_ui_edit_item_wizard_form"
Awesome! Pyrone's fix worked
Awesome!
Pyrone's fix worked perfectly for me. Thanks.
Good to know!
Seems to be a little bit tricky, but if it works...
Just a question, what about if you have in your site more than one panel page with form id to "panels_edit_display_form"?
RafaBlanes
contacto@ellibronegrodelprogramador.com
Agile Drupal Development and more...
More than one panel
Hi,
Yes, there are more than one panel pages in my site. But I want WYSIWYG editor in every panel pane popup. So, this solution is OK for me.
Where do I add this PHP snippet?
Hi,
Sorry to ask such a noob question. But in what file does this code go?
<?phpif($form_id == 'panels_edit_display_form'){
$form['tinymce_hidden'] = array(
'#type' => 'fieldset',
'#attributes' => array('style' => 'display: none'),
);
$form['tinymce_hidden']['tinymce_prerender'] = array(
'#type' => 'textarea',
);
$form['tinymce_hidden']['format'] = filter_form();
}
?>
Thanks in advance,
Dan
It should be in the function
It should be in the function yourmodule_form_alter(...) of your custom module.
With Regards,
Sithu