Changeset 453


Ignore:
Timestamp:
09/17/07 18:45:49 (5 years ago)
Author:
v.mische
Message:

implemented deleteIfExpanded() for Internet Explorer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.5/wymeditor/jquery.wymeditor.explorer.js

    r416 r453  
    449449        else if (node.nodeType == WYM_NODE.TEXT) 
    450450            return node.data.length; 
     451    }, 
     452 
     453    /* 
     454    Property: deleteIfExpanded 
     455        Delete contents of a selection 
     456 
     457    Example: 
     458        (start code) 
     459        var sel = wym.selection.getSelection(); 
     460        sel.deleteIfExpanded(); 
     461        (end code) 
     462 
     463    Returns: 
     464        (boolean) True if it was expanded and thus deleted 
     465    */ 
     466    deleteIfExpanded: function() { 
     467        if(!this.isCollapsed) { 
     468            this.original.clear(); 
     469            return true; 
     470        } 
     471        return false; 
    451472    } 
    452473}; 
Note: See TracChangeset for help on using the changeset viewer.