Posted by funature on January 15, 2011 at 10:57pm
how can i theme text format wrapper, like put the filter wrapper before textarea? actually i want make the wysiwyg editor like the drupalgardens.com does.
| Attachment | Size |
|---|---|
| theme_text_format_wrapper.png | 36.18 KB |
| drupalgardens.png | 43.72 KB |
| drupalgardens2.png | 36.3 KB |
Comments
I'm actually responsible for
I'm actually responsible for the theming of the WYSIWYG for http://www.drupalgardens.com
There are several things that we did to reorganize the text format.
I realize this is a very top level description of the steps, but it should give you an idea of where to start. Of course the easiest way to have this theming is to use Drupal Gardens. ;)
thank you for your reply.
thank you for your reply. although i don't get it yet, because i'm still a newbie, i'll try to understand. of course it would be better if you could explain something more or share some code. i appreciate it.
regards
is that possible to use the
is that possible to use the theme_text_format_wrapper function? how can i know the items of #children?
/**
* Returns HTML for a text format-enabled form element.
*
* @param $variables
* An associative array containing:
* - element: A render element containing #children and #description.
*
* @ingroup themeable
*/
function theme_text_format_wrapper($variables) {
$element = $variables['element'];
$output = '<div class="text-format-wrapper">';
$output .= $element['#children'];
if (!empty($element['#description'])) {
$output .= '<div class="description">' . $element['#description'] . '</div>';
}
$output .= "</div>\n";
return $output;
}