0

I needed to select and copy to clipboard a htmleditor field text, simulating the ctrl+a and ctrl+c (fired by a button).

I made some attempts, including Ext.util.KeyMap, but without success.

Any suggestions how to achieve this?

Fiddle:https://fiddle.sencha.com/#fiddle/qb3

Tarabass
  • 3,132
  • 2
  • 17
  • 35
jose
  • 1,490
  • 3
  • 30
  • 65

1 Answers1

1

Ext.util.KeyMap is not what your looking for, it is the reverse. It lets you define keystrokes that will fire some event.

I would use plain JavaScript for what you are trying to do. But this is not straight forward. Look at this question for guidance : Copy / Put text on the clipboard with FireFox, Safari and Chrome

Community
  • 1
  • 1
Lorenz Meyer
  • 19,166
  • 22
  • 75
  • 121
  • Thank Lorenz. I will read the post you indicated and see if I can find a solution. If I find the solution I edit the fiddle in my post and add a comment here. – jose Jul 12 '15 at 11:08
  • Hi Lorenz. I read the post and could not run any of the cases in my project (some inexperience mine). The solution need not be cross browser, just work on Chrome. According to your experience what would be the best solution for me? Thank you for your patience! – jose Jul 13 '15 at 11:25