jHtmlArea Enable on double click

129 Views Asked by At

I am using jHtmlArea as a text editor for cms. Which suits my client needs perfectly. I want a double click function on a div when clicked to activate the jHtmlArea.

If any one has come across similar type will help me to create.

1

There are 1 best solutions below

0
skarist On

When using jHtmlArea the library inserts a div containing an iframe just before the selected textarea element, and then hides the original element. So, you can do:

jQuery("#trigger_div").dblclick(function () {jQuery("iframe",jQuery("#mytextarea").prev()).focus();});

(note the iframe must have the same domain as the hosting page, otherwise you can't trigger javascript events on it or process it)