On Mon, 23 Jun 2008 14:15:45 +0530, Raj Shaz wrote:

> Hi group
>
> I wanted to insert text / image into current (cursor) position of DOM
> object ....any clues?
>
>
> Regards
> Raj


You could have a menuitem in the context-menu[1] and `oncommand' you call an
insertion function.

Calling the insert function:

insert(document.popupNode);

The insertion function:

function insert(node)
{
// prepare the textOrImage DOM-node

node.parentNode.insertBefore(textOrImage, node); // parentNode[2], insertBefore[3]
}

.... something like that?



[1] Modifying the Context Menu - http://developer.mozilla.org/en/docs...e_Context_Menu
[2] DOM:element.parentNode - http://developer.mozilla.org/en/docs...ent.parentNode
[3] DOM:element.insertBefore - http://developer.mozilla.org/en/docs...t.insertBefore

--
Be excellent to each other. Party on, dudes. [Bill and Ted, 1989]