[Project_owners] Inserting text around selected text in Midas

Omar Khan mromarkhan at gmail.com
Sat Nov 13 16:22:21 EST 2004


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>

-- 
Peace be unto you.


More information about the Project_owners mailing list