微小的MCE如何获得标签属性?

I'm using TinyMCE for text formatting. I have HTML code like:

<span class="ps_bonus_text_wide_t" style="font-family: Michroma;">
my text
</span>

When I select that text and class="ps_bonus_text_wide_t" i need to change it to

<div class="effect">
<span class="ps_bonus_text_wide_t" style="font-family: Michroma;">
my text
</span>
</div>

How can I verify class="ps_bonus_text_wide_t" ?

My plugin code is:

// Creates a new plugin class and a custom listbox
tinymce.create('tinymce.plugins.fonteffect', {
    createControl: function(n, cm) {
        switch (n) {
            case 'fonteffect':
                var mlb = cm.createListBox('fonteffect', {
                     title : 'Font effects',
                     onselect : function(v) {
                        // n.selection.setContent(v);                            
                         var ed=this.control_manager.editor;
                        ed.focus();
//to do something here

                     }
                });

                // Add some values to the list box
                mlb.add('anaglyph', 'anaglyph');
                mlb.add('brick-sign', 'brick-sign');
                mlb.add('canvas-print', 'canvas-print');
                mlb.add('crackle', 'crackle');
                mlb.add('decaying', 'decaying');
                mlb.add('destruction', 'destruction');                  
                // Return the new listbox instance
                return mlb;
        }

        return null;
    }
});

You will be able to check for the class ps_bonus_text_wide_t using this code snippet

var node = ed.selection.getNode();

if (node.nodeNAme == "SPAN" && node.className == "ps_bonus_text_wide_t"){
  //do whatever you like here
}