WYSIWYG

kulfi - August 16, 2008 - 03:36

Looking for a good WYSWYG editor. So far, I have evaluated TinyMCE - doesn't work with http://drupal.org/project/webforms, and FCKEditor - gives weird copy/paste mesages. The other editors, don't seem to offer copy + paste ability.

Anyone able to recommend a WYSWYG editor that offers copy + paste, and works well with other modules?

That fckeditor problem you

catorghans - August 16, 2008 - 14:30

That fckeditor problem you mention is a firefox security setting, will almost certainly not be solved by fckeditor.

I only have used fckeditor and I am quite pleased with it.

http://drupal.org/project/editor looks promising as well, because it is build with drupal in mind, but is only in alpha. Have not used it yet

The copy + paste inability

kulfi - August 17, 2008 - 04:03

The copy + paste inability is a FCKEditor speciality and not experienced with TinyMCE on FF. I may have found workarounds for the webforms incompatibility. So TinyMCE is the way to go

what are your workarounds?

mroswell - August 17, 2008 - 04:08

I'm curious: what workarounds did you find?

I'm a fan of BUEditor. Not exactly wysiwig, but close enough for me. A nice preview button, and easily configurable icons.

See comments for various snippet sources

kulfi - August 21, 2008 - 03:47

In template.php

// http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/tinymce/INS... phptemplate_tinymce_theme($init, $textarea_name, $theme_name, $is_running) {

  // http://drupal.org/node/72940#comment-670728
  // enter the node types that will use TinyMCE
  $not_allowed = array('webform');

  //check for node-edit
  if (arg(0) == 'node' && is_numeric(arg(1))) {
    $node = node_load(array('nid' => arg(1)));
    if (in_array($node->type,$not_allowed)) {
      unset($init);
      return $init;
    }
  }
 
  //check for node-add
  if(arg(0) == 'node' && arg(1) == 'add') {
    if(in_array(arg(2),$not_allowed)) {
      unset($init);
      return $init;
    }
  }

  switch ($textarea_name) {
    // Disable tinymce for these textareas
    case 'webform':
      unset($init);
    case 'log': // book and page log
    case 'img_assist_pages':
    case 'caption': // signature
    case 'pages':
    case 'access_pages': //TinyMCE profile settings.
    case 'user_mail_welcome_body': // user config settings
    case 'user_mail_approval_body': // user config settings
    case 'user_mail_pass_body': // user config settings
    case 'synonyms': // taxonomy terms
    case 'description': // taxonomy terms
      unset($init);
      break;
    case 'signature':
    case 'site_mission':
    case 'site_footer':
    case 'site_offline_message':
    case 'page_help':
    case 'user_registration_help':
    case 'user_picture_guidelines':
      $init['theme'] = 'simple';
      foreach ($init as $k => $v) {
        if (strstr($k, 'theme_advanced_')) unset($init[$k]);
      }
      break;
  }

  /* Example, add some extra features when using the advanced theme.
 
  // If $init is available, we can extend it
  if (isset($init)) {
    switch ($theme_name) {
     case 'advanced':
       $init['extended_valid_elements'] = array('a[href|target|name|title|onclick]');
       break;
    }
  }
 
  */

  // Always return $init
  return $init;
}

 
 

Drupal is a registered trademark of Dries Buytaert.