This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Strut2 JQuery TinyMCE

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all. I am using jquery to display TinyMCE in my Struts2 application. It works well. Now that I am trying to add some javascript to my implementation of a textarea which renders TinyMCE, I find that the 'onclick', 'onselect', 'onkeyup' does not work properly.

To be more specific: I am using an HTML 'select' element to display a set of options to the user. They can select one of these options, click another HTML element 'button' and copy what they selected from the HTML 'select' element into the TinyMCE-enabled 'textarea'. However, the user must set the cursor position in the 'textarea' before they can copy from the 'select' element. I am using javascript to capture the cursor position in the textarea to enable the user to copy from the select element. Here is the javascript:


When I implement this as plain HTML, it works fine. However, when I use this in conjunction with the jquery implementation of TinyMCE in Struts2, the call to 'onclick=storeCaret(this)', 'onselect=storeCaret(this)', 'onkeyup=storeCaret(this)' does not work.

Here is my Struts 2 JSP implementation:



Could someone please advise regarding this issue: why the call to 'storeCaret()' is not being made?

Thanks in advance.
 
I wish to win the lottery. I wish for a lovely piece of pie. And I wish for a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic