skeleton/public/javascripts/lib/cleditor/jquery.cleditor.js
function popupClick(e) {

    var editor = this,
        popup = e.data.popup,
        target = e.target;

    // Check for message and prompt popups
    if (popup === popups.msg || $(popup).hasClass(PROMPT_CLASS))
      return;

    // Get the button info
    var buttonDiv = $.data(popup, BUTTON),
        buttonName = $.data(buttonDiv, BUTTON_NAME),
        button = buttons[buttonName],
        command = button.command,
        value,
        useCSS = editor.options.useCSS;

    // Get the command value
    if (buttonName == "font")
      // Opera returns the fontfamily wrapped in quotes
      value = target.style.fontFamily.replace(/"/g, "");
    else if (buttonName == "size") {
      if (target.tagName == "DIV")
        target = target.children[0];
      value = target.innerHTML;
    }
    else if (buttonName == "style")
      value = "<" + target.tagName + ">";
    else if (buttonName == "color")
      value = hex(target.style.backgroundColor);
    else if (buttonName == "highlight") {
      value = hex(target.style.backgroundColor);
      if (ie) command = 'backcolor';
      else useCSS = true;
    }

    // Fire the popupClick event
    var data = {
      editor: editor,
      button: buttonDiv,
      buttonName: buttonName,
      popup: popup,
      popupName: button.popupName,
      command: command,
      value: value,
      useCSS: useCSS
    };

    if (button.popupClick && button.popupClick(e, data) === false)
      return;

    // Execute the command
    if (data.command && !execCommand(editor, data.command, data.value, data.useCSS, buttonDiv))
      return false;

    // Hide the popup and focus the editor
    hidePopups();
    focus(editor);

  }
function popupClick(e) {

    var editor = this,
        popup = e.data.popup,
        target = e.target;

    // Check for message and prompt popups
    if (popup === popups.msg || $(popup).hasClass(PROMPT_CLASS))
      return;

    // Get the button info
    var buttonDiv = $.data(popup, BUTTON),
        buttonName = $.data(buttonDiv, BUTTON_NAME),
        button = buttons[buttonName],
        command = button.command,
        value,
        useCSS = editor.options.useCSS;

    // Get the command value
    if (buttonName == "font")
      // Opera returns the fontfamily wrapped in quotes
      value = target.style.fontFamily.replace(/"/g, "");
    else if (buttonName == "size") {
      if (target.tagName == "DIV")
        target = target.children[0];
      value = target.innerHTML;
    }
    else if (buttonName == "style")
      value = "<" + target.tagName + ">";
    else if (buttonName == "color")
      value = hex(target.style.backgroundColor);
    else if (buttonName == "highlight") {
      value = hex(target.style.backgroundColor);
      if (ie) command = 'backcolor';
      else useCSS = true;
    }

    // Fire the popupClick event
    var data = {
      editor: editor,
      button: buttonDiv,
      buttonName: buttonName,
      popup: popup,
      popupName: button.popupName,
      command: command,
      value: value,
      useCSS: useCSS
    };

    if (button.popupClick && button.popupClick(e, data) === false)
      return;

    // Execute the command
    if (data.command && !execCommand(editor, data.command, data.value, data.useCSS, buttonDiv))
      return false;

    // Hide the popup and focus the editor
    hidePopups();
    focus(editor);

  }
function popupClick ( e ) { var editor = this , popup = e . data . popup , target = e . target ; // Check for message and prompt popups
 if ( popup === popups . msg || $ ( popup ) . hasClass ( PROMPT_CLASS ) ) return ; // Get the button info
 var buttonDiv = $ . data ( popup , BUTTON ) , buttonName = $ . data ( buttonDiv , BUTTON_NAME ) , button = buttons [ buttonName ] , command = button . command , value , useCSS = editor . options . useCSS ; // Get the command value
 if ( buttonName == "font" ) // Opera returns the fontfamily wrapped in quotes
 value = target . style . fontFamily . replace ( / " / g , "" ) ; else if ( buttonName == "size" ) { if ( target . tagName == "DIV" ) target = target . children [ 0 ] ; value = target . innerHTML ; } else if ( buttonName == "style" ) value = "<" + target . tagName + ">" ; else if ( buttonName == "color" ) value = hex ( target . style . backgroundColor ) ; else if ( buttonName == "highlight" ) { value = hex ( target . style . backgroundColor ) ; if ( ie ) command = 'backcolor' ; else useCSS = true ; } // Fire the popupClick event
 var data = { editor : editor , button : buttonDiv , buttonName : buttonName , popup : popup , popupName : button . popupName , command : command , value : value , useCSS : useCSS } ; if ( button . popupClick && button . popupClick ( e , data ) === false ) return ; // Execute the command
 if ( data . command && ! execCommand ( editor , data . command , data . value , data . useCSS , buttonDiv ) ) return false ; // Hide the popup and focus the editor
 hidePopups ( ) ; focus ( editor ) ; }
popupClick - click event handler for popup items
popupClick - click event handler for popup items