Download & Extend

How to add the wysiwyg on mission statement field?

Project:Wysiwyg
Version:6.x-2.0
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Using only FCKeditor it was simple to achieve, but with Wysiwyg I don't know how,
there is a way to do it simple?

thks in advance.

Comments

#1

Status:active» fixed

See #608348: Getting a wysiwyg editor onto a system page. Core does not set input format selectors on all places where an input format is used, so Wysiwyg module does not know how to attach itself there.

#2

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

#3

Just so that others can easily find the information (this issue was to top search hit), I thought I'd share how I got this done.

By following the basic formula outlined in the issue linked from #1 and adding the relevant information from modules/system/system.admin.inc, I got the following function.

<?php
function mymodule_form_alter(&$form, &$form_state, $form_id) {
  if (
$form_id == 'system_site_information_settings') {
    unset(
$form['site_mission']['#title']);
    unset(
$form['site_mission']['#type']);
    unset(
$form['site_mission']['#default_value']);
    unset(
$form['site_mission']['#description']);
   
$form['site_mission']['site_mission'] = array(
     
'#type' => 'textarea',
     
'#title' => t('Mission'),
     
'#default_value' => variable_get('site_mission', ''),
     
'#description' => t("Your site's mission or focus statement (often prominently displayed on the front page)."),
    );
   
$form['site_mission']['format'] = filter_form(2, NULL, array('message_format'));
  }
}
?>

Just create a small custom module to house the function and enable it, and you'll have WYSIWYG on your site's mission field.

#4

I've created a new module which implements this functionality: http://drupal.org/project/wysiwyg_extra

nobody click here