Debian Codegraph @

dijit/tests/editor/nls_utf8.html

raw symbols SCIP
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <title>Editor Test</title>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
6
7 <script type="text/javascript" src="../boilerplate.js"></script>
8
9 <script type="text/javascript">
10 require([
11 "doh/runner",
12 "dojo/parser",
13 "dijit/registry",
14 "dijit/Editor",
15 "dojo/domReady!"
16 ], function(doh, parser, registry){
17
18 doh.register("parse", function(){
19 parser.parse();
20 });
21
22 doh.register("test value", [
23 {
24 name: "test value",
25 timeout: 10000,
26 runTest: function(){
27 var d = new doh.Deferred();
28
29
30 setTimeout(d.getTestCallback(function(){
31 var value = registry.byId('editor').get('value');
32 doh.is("日本語", value );
33
34 registry.byId('editor').set('value', 'こんにちは');
35 value = registry.byId('editor').get('value');
36 doh.is("こんにちは", value );
37
38 registry.byId('editor').set('value', '日本語');
39 }), 2000);
40
41 return d;
42 }
43 }
44 ]);
45
46 doh.run();
47 });
48 </script>
49 </head>
50 <body class="claro" role="main">
51 <script type="dojo/require">
52 registry: "dijit/registry"
53 </script>
54 <form method="get">
55 <p>
56 Plain text: 日本語
57 </p>
58
59 <p>
60 Same text should show up in the Editor:
61 </p>
62 <div id="editor" data-dojo-type="dijit/Editor" data-dojo-props='"aria-label":"editor",name:"field"'>日本語</div>
63 <input type="submit" value="Save" />
64 <button type=button onclick="console.log(registry.byId('editor').get('value'))">getValue</button>
65 <button type=button onclick="registry.byId('editor').set('value', 'こんにちは')">set value to こんにちは</button>
66
67 </form>
68 </body>
69 </html>