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
79 lines (66 loc) • 3.35 kB
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> </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> </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> </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> </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> </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> </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> </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> </p>
</div>
</body>
</html>