TinyMCE

From WolfTech
Jump to: navigation, search

TinyMCE Fix to disable RTE on PHP Code Input Mode

function _tinymce_page_match($edit) {
  $page_match = FALSE;

  // Kill TinyMCE if we're editing a textarea with PHP in it!
  // WARNING: PHP input formats are #3 in my filter_formats table - your value may differ!!
  if (arg(0) == 'node' && is_numeric(arg(1)) && arg(2) == 'edit') {
    $node = node_load(arg(1));
    if ($node->format == '3') {
      return FALSE;
    }
  }
  ...