[Project_owners] Inserting text around selected text in Midas

David Murray lid2000 at tpg.com.au
Thu Nov 18 01:16:47 EST 2004


Thanks! That works! Now all I have to do is get undo/redo to work and 
I'm set!

David.


Omar Khan wrote:

> Try this bookmarklet that I whipped up.
> It this what you mean?
> 
> <a href="javascript:
> var selection = window.getSelection();
> var rangeCount = selection.rangeCount;
> if(rangeCount >= 0)
> {
> 	var rangeAt = selection.getRangeAt(0);
> 	var rangeTwo = document.createRange();
> 	rangeTwo.setStart(rangeAt.endContainer,rangeAt.endOffset);
> 	rangeTwo.insertNode(document.createTextNode('?'));
> 	rangeAt.insertNode(document.createTextNode('!'));
> }
> void 0;
> ">Insert ! ?</a>
> 



More information about the Project_owners mailing list