Skip to content
Snippets Groups Projects
Commit 73c9ce0e authored by Eric Rasmussen's avatar Eric Rasmussen
Browse files

[gh-306] Merging trunk into test -c1481 -c1482

git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x/testing@1489 20a16fea-79d4-4915-8869-1ea9d5ebf173
parent 3fcacdc4
No related branches found
No related tags found
No related merge requests found
......@@ -249,6 +249,7 @@ function unl_wysiwyg_plugin($editor) {
'skin' => 'unl',
'table_styles' => 'ZenTable Bright (yellow)=zentable bright;ZenTable Cool (blue)=zentable cool;ZenTable Energetic (orange)=zentable energetic;ZenTable Soothing (green)=zentable soothing;ZenTable Primary (red)=zentable primary;ZenTable Neutral (gray)=zentable neutral;', 'doctype' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
'valid_elements' => '*[*],script[charset|defer|id|src|type=text/javascript]',
'forced_root_block' => false,
),
)
// Wysiwyg wrapper plugin AJAX callback.
......@@ -261,6 +262,29 @@ function unl_wysiwyg_plugin($editor) {
}
}
/**
* Implements of hook_element_info_alter().
*/
function unl_element_info_alter(&$type) {
// Change text format processing on elements to our version.
if (isset($type['text_format'])) {
$type['text_format']['#process'][] = 'unl_filter_process_format';
}
}
/**
* Callback for processing the text_format element
*/
function unl_filter_process_format($element) {
// Only remove the plain_text and filtered_html options on the node edit form. They need to be available on comment forms, etc.
if ($element['#entity_type'] == 'node') {
unset($element['format']['format']['#options']['plain_text']);
unset($element['format']['format']['#options']['filtered_html']);
$element['format']['format']['#title'] = 'Editor: ';
}
return $element;
}
/**
* Implementation of hook_permission().
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment