sample skeleton application with dojo toolkit & arcgis js api v 4.30
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

70 lines
1.7 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<title>Editor Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-2"/>
<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', '\u65e5\u672c\u8a9e');
value = registry.byId('editor').get('value');
doh.is("\u65e5\u672c\u8a9e", 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="post">
<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', '\u65e5\u672c\u8a9e')">set value to &#x65e5;&#x672c;&#x8a9e;</button>
</form>
</body>
</html>