Project

General

Profile

RE: keyWentDown and keyPressed events do not propagate fr... ยป test.html

Laszlo Marak, 08/23/2015 06:18 PM

 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
    <script type="text/javascript" src="resources/tinymce/tinymce.min.js"></script>
5
    <script type="text/javascript">
6
        tinymce.init({
7
        selector: "#mytextarea",
8
        setup : function(ed) {
9
        ed.onKeyDown.add(myFunction);
10
        }
11
        });
12
        function myFunction(ed, e) {
13
        alert("You pressed a key inside the input field" + e.keyCode);
14
        }
15
    </script>
16
</head>
17
<body>
18
    <h1>TinyMCE Getting Started Guide</h1>
19
    <form method="post">
20
        <textarea id="mytextarea"></textarea>
21
    </form>
22
</body>
23
</html>
    (1-1/1)