| 1 | <!DOCTYPE html> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta http-equiv="Content-type" content="text/html; charset=utf-8"> |
| 5 | <title>Editor Test</title> |
| 6 | |
| 7 | <script type="text/javascript" src="../boilerplate.js"></script> |
| 8 | |
| 9 | |
| 10 | <script type="text/javascript"> |
| 11 | require([ |
| 12 | "dojo/parser", |
| 13 | "dijit/_editor/RichText", |
| 14 | "dijit/Editor", |
| 15 | "dijit/_editor/plugins/ViewSource", |
| 16 | "dojo/domReady!" |
| 17 | ], function(parser, RichText){ |
| 18 | // Make editor indent work for paragraphs in addition to lists |
| 19 | var oldQCE = RichText.prototype.queryCommandEnabled; |
| 20 | RichText.prototype.queryCommandEnabled = function(command){ |
| 21 | return command == 'indent' || command == 'outdent' || oldQCE.call(this, command); |
| 22 | }; |
| 23 | |
| 24 | parser.parse(); |
| 25 | }); |
| 26 | </script> |
| 27 | </head> |
| 28 | |
| 29 | <body class="claro" role="main"> |
| 30 | <h1>Test file for Editor EnterKeyHandling plugin</h1> |
| 31 | |
| 32 | <h2>blockNodeforEnter='BR'</h2> |
| 33 | <div id="br" data-dojo-type="dijit/Editor" data-dojo-props='"aria-label":"editor_br", plugins:[{name:"dijit/_editor/plugins/EnterKeyHandling", blockNodeForEnter:"BR"}, "viewsource"] |
| 34 | '><p>para 1<br>line 2</p> |
| 35 | <p>para 2<br>line 2</p> |
| 36 | </div> |
| 37 | |
| 38 | <h2>blockNodeforEnter='DIV'</h2> |
| 39 | <div id="div" data-dojo-type="dijit/Editor" data-dojo-props='"aria-label":"editor_div", plugins:[{name:"dijit/_editor/plugins/EnterKeyHandling", blockNodeForEnter:"DIV"}, "viewsource"] |
| 40 | '><p>para 1<br>line 2</p> |
| 41 | <p>para 2<br>line 2</p> |
| 42 | </div> |
| 43 | |
| 44 | <h2>blockNodeforEnter='DIV' split test</h2> |
| 45 | <div id="div2" data-dojo-type="dijit/Editor" data-dojo-props='"aria-label":"editor_div2", plugins:[{name:"dijit/_editor/plugins/EnterKeyHandling", blockNodeForEnter:"DIV"}, "viewsource"]'> |
| 46 | <div> </div> |
| 47 | <div id="lineOne">this is a line of text. It <b id="boldLine0">IS</b> intended to be split up by pressing enter.</div> |
| 48 | <div> </div> |
| 49 | </div> |
| 50 | |
| 51 | <h2>blockNodeforEnter='DIV' split test style clone</h2> |
| 52 | <div id="div3" data-dojo-type="dijit/Editor" data-dojo-props='"aria-label":"editor_div3", plugins:[{name:"dijit/_editor/plugins/EnterKeyHandling", blockNodeForEnter:"DIV"}, "viewsource"]'> |
| 53 | <div> </div> |
| 54 | <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> |
| 55 | <div> </div> |
| 56 | </div> |
| 57 | |
| 58 | <h2>blockNodeforEnter='DIV' split test font clone</h2> |
| 59 | <div id="div4" data-dojo-type="dijit/Editor" data-dojo-props='"aria-label":"editor_div4", plugins:[{name:"dijit/_editor/plugins/EnterKeyHandling", blockNodeForEnter:"DIV"}, "viewsource"]'> |
| 60 | <div> </div> |
| 61 | <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> |
| 62 | <div> </div> |
| 63 | </div> |
| 64 | |
| 65 | <h2>blockNodeforEnter='P'</h2> |
| 66 | <div id="p" data-dojo-type="dijit/Editor" data-dojo-props='"aria-label":"editor_p", plugins:[{name:"dijit/_editor/plugins/EnterKeyHandling", blockNodeForEnter:"P"}, "viewsource"] |
| 67 | '><p>para 1<br>line 2</p> |
| 68 | <p>para 2<br>line 2</p> |
| 69 | </div> |
| 70 | |
| 71 | <h2>blockNodeforEnter='P' split test</h2> |
| 72 | <div id="p2" data-dojo-type="dijit/Editor" data-dojo-props='"aria-label":"editor_p2", plugins:[{name:"dijit/_editor/plugins/EnterKeyHandling", blockNodeForEnter:"P"}, "viewsource"]'> |
| 73 | <p> </p> |
| 74 | <p id="lineOne">this is a line of text. It <b id="boldLine2">IS</b> intended to be split up by pressing enter.</p> |
| 75 | <p> </p> |
| 76 | </div> |
| 77 | </body> |
| 78 | </html> |