dijit
Version:
Dijit provides a complete collection of user interface controls based on Dojo, giving you the power to create web applications that are highly optimized for usability, performance, internationalization, accessibility, but above all deliver an incredible u
71 lines (57 loc) • 1.64 kB
HTML
<html lang="jp">
<head>
<title>Editor Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift-JIS"/>
<script type="text/javascript" src="../boilerplate.js"></script>
<script type="text/javascript">
require([
"doh/runner",
"dojo/parser",
"dijit/registry",
"dijit/Editor",
"dojo/domReady!"
], function(doh, parser, registry){
doh.register("parse", function(){
parser.parse();
});
doh.register("test value", [
{
name: "test value",
timeout: 10000,
runTest: function(){
var d = new doh.Deferred();
setTimeout(d.getTestCallback(function(){
var value = registry.byId('editor').get('value');
doh.is("���{��", value );
registry.byId('editor').set('value', '����ɂ���');
value = registry.byId('editor').get('value');
doh.is("����ɂ���", value );
registry.byId('editor').set('value', '���{��');
}), 2000);
return d;
}
}
]);
doh.run();
});
</script>
</head>
<body class="claro" role="main">
<script type="dojo/require">
registry: "dijit/registry"
</script>
<form method="get">
<p>
Plain text: ���{��
</p>
<p>
Same text should show up in the Editor:
</p>
<div id="editor" data-dojo-type="dijit/Editor" data-dojo-props='"aria-label":"editor", name:"field"'>���{��</div>
<input type="submit" value="Save" />
<button type=button onclick="console.log(registry.byId('editor').get('value'))">getValue</button>
<button type=button onclick="registry.byId('editor').set('value', '����ɂ���')">set value to ����ɂ���</button>
</form>
</body>
</html>