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.
 
 
 
 
 
 

78 lines
3.3 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Editor Test</title>
<script type="text/javascript" src="../boilerplate.js"></script>
<script type="text/javascript">
require([
"dojo/parser",
"dijit/_editor/RichText",
"dijit/Editor",
"dijit/_editor/plugins/ViewSource",
"dojo/domReady!"
], function(parser, RichText){
// Make editor indent work for paragraphs in addition to lists
var oldQCE = RichText.prototype.queryCommandEnabled;
RichText.prototype.queryCommandEnabled = function(command){
return command == 'indent' || command == 'outdent' || oldQCE.call(this, command);
};
parser.parse();
});
</script>
</head>
<body class="claro" role="main">
<h1>Test file for Editor EnterKeyHandling plugin</h1>
<h2>blockNodeforEnter='BR'</h2>
<div id="br" data-dojo-type="dijit/Editor" data-dojo-props='"aria-label":"editor_br", plugins:[{name:"dijit/_editor/plugins/EnterKeyHandling", blockNodeForEnter:"BR"}, "viewsource"]
'><p>para 1<br>line 2</p>
<p>para 2<br>line 2</p>
</div>
<h2>blockNodeforEnter='DIV'</h2>
<div id="div" data-dojo-type="dijit/Editor" data-dojo-props='"aria-label":"editor_div", plugins:[{name:"dijit/_editor/plugins/EnterKeyHandling", blockNodeForEnter:"DIV"}, "viewsource"]
'><p>para 1<br>line 2</p>
<p>para 2<br>line 2</p>
</div>
<h2>blockNodeforEnter='DIV' split test</h2>
<div id="div2" data-dojo-type="dijit/Editor" data-dojo-props='"aria-label":"editor_div2", plugins:[{name:"dijit/_editor/plugins/EnterKeyHandling", blockNodeForEnter:"DIV"}, "viewsource"]'>
<div>&nbsp;</div>
<div id="lineOne">this is a line of text. It <b id="boldLine0">IS</b> intended to be split up by pressing enter.</div>
<div>&nbsp;</div>
</div>
<h2>blockNodeforEnter='DIV' split test style clone</h2>
<div id="div3" data-dojo-type="dijit/Editor" data-dojo-props='"aria-label":"editor_div3", plugins:[{name:"dijit/_editor/plugins/EnterKeyHandling", blockNodeForEnter:"DIV"}, "viewsource"]'>
<div>&nbsp;</div>
<div id="lineOne">this is a line of text. It <b id="boldLine1" style="font-size: 4em">IS</b> intended to be split up by pressing enter.</div>
<div>&nbsp;</div>
</div>
<h2>blockNodeforEnter='DIV' split test font clone</h2>
<div id="div4" data-dojo-type="dijit/Editor" data-dojo-props='"aria-label":"editor_div4", plugins:[{name:"dijit/_editor/plugins/EnterKeyHandling", blockNodeForEnter:"DIV"}, "viewsource"]'>
<div>&nbsp;</div>
<div id="lineOne">this is a line of text. It <font id="fontLine1" size="5">IS</font> intended to be split up by pressing enter.</div>
<div>&nbsp;</div>
</div>
<h2>blockNodeforEnter='P'</h2>
<div id="p" data-dojo-type="dijit/Editor" data-dojo-props='"aria-label":"editor_p", plugins:[{name:"dijit/_editor/plugins/EnterKeyHandling", blockNodeForEnter:"P"}, "viewsource"]
'><p>para 1<br>line 2</p>
<p>para 2<br>line 2</p>
</div>
<h2>blockNodeforEnter='P' split test</h2>
<div id="p2" data-dojo-type="dijit/Editor" data-dojo-props='"aria-label":"editor_p2", plugins:[{name:"dijit/_editor/plugins/EnterKeyHandling", blockNodeForEnter:"P"}, "viewsource"]'>
<p>&nbsp;</p>
<p id="lineOne">this is a line of text. It <b id="boldLine2">IS</b> intended to be split up by pressing enter.</p>
<p>&nbsp;</p>
</div>
</body>
</html>