| 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: FontChoice Plugin</title> |
| 6 | |
| 7 | <script type="text/javascript" src="../boilerplate.js"></script> |
| 8 | |
| 9 | <script type="text/javascript"> |
| 10 | require([ |
| 11 | "dojo/parser", |
| 12 | "dijit/Editor", |
| 13 | "dijit/_editor/plugins/FontChoice", |
| 14 | "dijit/_editor/plugins/ViewSource", |
| 15 | "dojo/domReady!" |
| 16 | ], function(parser){ |
| 17 | parser.parse(); |
| 18 | }); |
| 19 | </script> |
| 20 | </head> |
| 21 | <body class="claro" role="main"> |
| 22 | <br> |
| 23 | <br> |
| 24 | <div>Content before the editor.</div> |
| 25 | <br> |
| 26 | <br> |
| 27 | <p>Editor with default drop down lists:</p> |
| 28 | <div id="editor0" data-dojo-type="dijit/Editor" |
| 29 | data-dojo-props='"aria-label":"editor0", extraPlugins:["fontName", "fontSize", "formatBlock", "viewSource"], height: "400px", style:"background-color: white; width: 100%;"'> |
| 30 | <h1>Font Choice Plugin details</h1> |
| 31 | <ol> |
| 32 | <li>The Fontchoice plugin provides three dropdown menus for manipulating font information, such as |
| 33 | font name, font size, and the format of the block containing the text (such as P, PRE, H1, and so on)</li> |
| 34 | <li>It auto-updates itself based on the caret and selection position in the document.</li> |
| 35 | </ol> |
| 36 | |
| 37 | <h2>Things to test:</h2> |
| 38 | <ol> |
| 39 | <li>Verify clicking in a P tag shows Paragraph in the dropdown.</li> |
| 40 | <li>Verify clicking in a a font-sized tag that the size dropdown indicates the current size (via a name).</li> |
| 41 | <li>Verify clicking in a a font-nameed tag that the name dropdown indicates the current font name.</li> |
| 42 | <li>Verify that you can set/manipulate all the above via the menu.</li> |
| 43 | </ol> |
| 44 | <br> |
| 45 | <p id="para0"> |
| 46 | This is a pararaph. |
| 47 | </p> |
| 48 | <br> |
| 49 | <pre id="pre0"> |
| 50 | This is preformatted text. |
| 51 | </pre> |
| 52 | <br> |
| 53 | <h1 id="h10"> |
| 54 | This is a heading. |
| 55 | </h1> |
| 56 | <h2 id="h20"> |
| 57 | This is a sub-heading. |
| 58 | </h2> |
| 59 | <h3 id="h30"> |
| 60 | This is a sub-sub-heading. |
| 61 | </h3> |
| 62 | <br> |
| 63 | <p id="text">This is some text in a 'p' for styling.</p> |
| 64 | <p id="text1">This is some more text in a 'p' for styling.</p> |
| 65 | <br> |
| 66 | <font id="sizedText1" size="1">This is some small text.</font> |
| 67 | <br> |
| 68 | <font id="sizedText4" size="4">This is some mediumish text.</font> |
| 69 | <br> |
| 70 | <font id="sizedText7" size="7">This is some xx-large text.</font> |
| 71 | <br> |
| 72 | <font face="'Comic Sans MS'" id="comicText">This is some text in 'Comic Sans MS'</font>. |
| 73 | <br> |
| 74 | <br> |
| 75 | <br> |
| 76 | <h1 style="background-color: lightgray">Selection format removal test</h1> |
| 77 | <div id="selectionContainer"> |
| 78 | <h3> |
| 79 | Some H3 formatted content. |
| 80 | </h3> |
| 81 | <pre> |
| 82 | Some PRE formatted content. |
| 83 | </pre> |
| 84 | <p> |
| 85 | Some P formatted content. |
| 86 | </p> |
| 87 | </div> |
| 88 | |
| 89 | </div> |
| 90 | <br> |
| 91 | <br> |
| 92 | <div>Content after the editor.</div> |
| 93 | <br> |
| 94 | <br> |
| 95 | <div>Content before the editor.</div> |
| 96 | <br> |
| 97 | <br> |
| 98 | <p>Editor w/ plain text dropdown values:</p> |
| 99 | <div id="editor1" data-dojo-type="dijit/Editor" |
| 100 | data-dojo-props='"aria-label":"editor1", extraPlugins:[{name: "fontName", plainText: true}, {name: "fontSize", plainText: true}, {name: "formatBlock", plainText: true}, "viewSource"], style:"background-color: white; width: 100%;", height: "400px"'> |
| 101 | <h1>Font Choice Plugin details</h1> |
| 102 | <ol> |
| 103 | <li>This instance of the FontChoice plugin just turns off formatted content in the dropdowns. Everything should be the same font and size.</li> |
| 104 | </ol> |
| 105 | |
| 106 | <h2>Things to test:</h2> |
| 107 | <ol> |
| 108 | <li>Verify that each of the dropdowns have values that are all the same size and font.</li> |
| 109 | </ol> |
| 110 | </div> |
| 111 | <br> |
| 112 | <br> |
| 113 | <div>Content after the editor.</div> |
| 114 | <br> |
| 115 | <br> |
| 116 | <p>Editor w/ generic (web font names) font selector, traditional font name selector, font size selector, and format block selector:</p> |
| 117 | <div id="generic" data-dojo-type="dijit/Editor" data-dojo-props='"aria-label":"generic", height:"10em", |
| 118 | plugins:["bold", "italic", "underline", {name: "dijit/_editor/plugins/FontChoice", command: "fontName", generic: true}, "fontName", "fontSize", "formatBlock"]'>hello world</div> |
| 119 | <br> |
| 120 | <br> |
| 121 | <div>Content after the editor.</div> |
| 122 | <br> |
| 123 | <br> |
| 124 | <div>Content before the editor.</div> |
| 125 | <br> |
| 126 | <br> |
| 127 | <p>Editor w/ custom font drop down list:</p> |
| 128 | <div id="custom" data-dojo-type="dijit/Editor" data-dojo-props='"aria-label":"custom", height:"10em", |
| 129 | plugins:["bold", "italic", "underline", {name: "dijit/_editor/plugins/FontChoice", command: "fontName", custom:["Verdana","Myriad","Garamond"]}]'> |
| 130 | This editor should let you set the fonts to |
| 131 | <span style="font-family:Verdana;">Verdana</span>, <span style="font-family:Myriad;">Myriad</span>, and <span style="font-family:Garamond;">Garamond</span>. |
| 132 | </div> |
| 133 | <br> |
| 134 | <br> |
| 135 | <div>Content after the editor.</div> |
| 136 | <br> |
| 137 | <br> |
| 138 | </body> |
| 139 | </html> |