TinyMCE

From WolfTech
Revision as of 14:23, 27 January 2009 by Rjhodson (talk | contribs) (New page: ==TinyMCE Fix to disable RTE on PHP Code Input Mode== <pre>function _tinymce_page_match($edit) { $page_match = FALSE; // Kill TinyMCE if we're editing a textarea with PHP in it! // ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to 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;
    }
  }
  ...