Hello everyone,
I've noticed that when editing the contents of the splash page the WYSIWYG editor will not appear in the contant area when an input format containing a WYSIWYG is selected.
This is a big request from a client.

Thanks for any help.

Comments

gumol’s picture

Version: 6.x-2.6 » 6.x-2.x-dev
Category: bug » feature

How I did it:
1. Install http://drupal.org/project/wysiwyg_extra
2.

function MY_MODULE_form_alter(&$form, $form_state, $form_id) {
	//drupal_set_message($form_id);
	
    switch ($form_id) {
       case 'splash_admin_what' :
          wysiwyg_extra_build_wysiwyg($form['splash_what'], 'content');
          $form['splash_what']['content']['content']['#rows'] = 18;
        break;      
    }
}

The code also makes the textarea bigger (18 rows).

next, I have removed from lines 96-100 in splash.admin.inc this code:

  $form['splash_what']['filter'] = filter_form($splash_what['format']);
  $form['splash_what']['format'] = array(
  	'#type' => 'value',
  	'#value' => $splash_what['format'],
  );  

and from lines 107-109:

function splash_admin_what_submit($form, &$form_state) {
	$form_state['values']['splash_what']['format'] = $form_state['values']['format'];
}

Modify line 92:


    '#default_value' => $splash_what['content']['content'],

Not sure why $splash_what['content'] saves content in another array, maybe it is wysiwyg_extra issue.

In splash.module I have changed all instances of variables from:

$splash_what['content']
$splash_what['format']

into

$splash_what['content']['content']
$splash_what['content']['format']

It seems to work properly.

gumol’s picture

Status: Active » Needs review
ermannob’s picture

Status: Needs review » Needs work

Hi,
it works for me. Thank you!

Anyway I'm not sure it can be integrated into Splash the way it is now. WYSIWYG editor will add p tags by default, so Splash won't be able to read URLs inside that textarea, and setup other than "Display entered text..." will not work.

-ermannob

aiphes’s picture

any progress about this ?

bburg’s picture

For me, it seems that the format setting wasn't being saved, which is needed for rendering full html.

Using Splash 6.x-2.9 with WYSIWYG Extra 1.1

Instead of deleting lines 107 - 109, I replaced the single line in that hook with the following:

$form_state['values']['splash_what']['content']['format'] = $form_state['values']['content_format'];