split(el, endOffset);
res = split(el, endOffset, 0); par = (BranchElement) el.getParentElement(); if (res[1] != null) { int index = par.getElementIndex(offset); Element[] removed; Element[] added; if (res[1] == null) { removed = new Element[0]; added = new Element[]{ res[1] }; } else { removed = new Element[]{ el }; added = new Element[]{ res[0], res[1] }; } par.replace(index, removed.length, added); addEdit(par, index, removed, added); }
    protected void changeUpdate()    {      // Split up the element at the start offset if necessary.      Element el = getCharacterElement(offset);      split(el, offset);      int endOffset = offset + length;      el = getCharacterElement(endOffset);      split(el, endOffset);    }