| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" |
| 2 |
"http://www.w3.org/TR/html4/strict.dtd"> |
| 3 |
<html> |
| 4 |
<head> |
| 5 |
<title>Editor AutoUrlLink Test</title> |
| 6 |
|
| 7 |
<style type="text/css"> |
| 8 |
@import "../../../dojo/resources/dojo.css"; |
| 9 |
@import "../../../dijit/tests/css/dijitTests.css"; |
| 10 |
@import "../../../dijit/themes/claro/claro.css"; |
| 11 |
</style> |
| 12 |
|
| 13 |
<script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config="parseOnLoad: true, isDebug: true"></script> |
| 14 |
|
| 15 |
|
| 16 |
<script type="text/javascript" src="../../../dijit/tests/_testCommon.js"></script> |
| 17 |
|
| 18 |
<script type="text/javascript"> |
| 19 |
dojo.require("dijit.Editor"); |
| 20 |
dojo.require("dojo.parser"); |
| 21 |
dojo.require("dojox.editor.plugins.AutoUrlLink"); |
| 22 |
dojo.require("dijit._editor.plugins.ViewSource"); |
| 23 |
|
| 24 |
var e2Plugins = ["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|", |
| 25 |
"insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull", |
| 26 |
{name: "dijit._editor.plugins.EnterKeyHandling", blockNodeForEnter: "P"}]; |
| 27 |
|
| 28 |
var e3Plugins = ["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|", |
| 29 |
"insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull", |
| 30 |
{name: "dijit._editor.plugins.EnterKeyHandling", blockNodeForEnter: "DIV"}]; |
| 31 |
</script> |
| 32 |
</head> |
| 33 |
<body class="claro"> |
| 34 |
<br> |
| 35 |
<h1 class="testTitle">Editor + AutoUrlLink Plugin</h1> |
| 36 |
|
| 37 |
<h2>This is an example editor with AutoUrlLink enabled.</h2> |
| 38 |
The AutoUrlLink plugin allows you recognize a URL as a link when you are typing. |
| 39 |
<br> |
| 40 |
|
| 41 |
<div dojoType="dijit.Editor" id="editor1" extraPlugins="['autourllink', 'viewsource']"> |
| 42 |
This instance is created from a div with an <b>extra</b> plugin, 'AutoUrlLink' loaded. |
| 43 |
<ul> |
| 44 |
<li>List Item One</li> |
| 45 |
<li>List Item Two</li> |
| 46 |
<li>List Item Three</li> |
| 47 |
<li>List Item Four</li> |
| 48 |
</ul> |
| 49 |
<br> |
| 50 |
<blockquote><a href="http://www.dojotoolkit.org">The Dojo Toolkit</a></blockquote> |
| 51 |
<br> |
| 52 |
<table border="1"> |
| 53 |
<tr> |
| 54 |
<td>Test Cell 1</td> |
| 55 |
<td>Test Cell 2</td> |
| 56 |
</tr> |
| 57 |
<tr> |
| 58 |
<td>Test Cell 3</td> |
| 59 |
<td>Test Cell 4</td> |
| 60 |
</tr> |
| 61 |
</table> |
| 62 |
<br> |
| 63 |
<ol> |
| 64 |
<li>One</li> |
| 65 |
<li>Two |
| 66 |
<ol> |
| 67 |
<li> |
| 68 |
Three |
| 69 |
</li> |
| 70 |
</ol> |
| 71 |
</ol> |
| 72 |
<br> |
| 73 |
<h3>Malformed list #1</h3> |
| 74 |
<ul> |
| 75 |
<li>List Item One</li> |
| 76 |
<li>List Item Two</li> |
| 77 |
<ul> |
| 78 |
<li>List Item Three</li> |
| 79 |
<li>List Item Four</li> |
| 80 |
<li>List Item Five</li> |
| 81 |
</ul> |
| 82 |
</ul> |
| 83 |
<h3>Malformed list #2</h3> |
| 84 |
<ul> |
| 85 |
<ul> |
| 86 |
<li>List Item one</li> |
| 87 |
<li>List Item two</li> |
| 88 |
<li>List Item three</li> |
| 89 |
</ul> |
| 90 |
<li>List Item four</li> |
| 91 |
<li>List Item five</li> |
| 92 |
</ul> |
| 93 |
</div> |
| 94 |
<br> |
| 95 |
<br> |
| 96 |
<h1>Editor with BlockNodeForEnter = P</h1> |
| 97 |
<div dojoType="dijit.Editor" id="editor2" plugins="e2Plugins" extraPlugins="['autourllink', 'viewsource']"> |
| 98 |
This instance is created from a div with an <b>extra</b> plugin, 'AutoUrlLink' loaded. |
| 99 |
<ul> |
| 100 |
<li>List Item One</li> |
| 101 |
<li>List Item Two</li> |
| 102 |
<li>List Item Three</li> |
| 103 |
<li>List Item Four</li> |
| 104 |
</ul> |
| 105 |
<br> |
| 106 |
<blockquote><a href="http://www.dojotoolkit.org">The Dojo Toolkit</a></blockquote> |
| 107 |
<br> |
| 108 |
<table border="1"> |
| 109 |
<tr> |
| 110 |
<td>Test Cell 1</td> |
| 111 |
<td>Test Cell 2</td> |
| 112 |
</tr> |
| 113 |
<tr> |
| 114 |
<td>Test Cell 3</td> |
| 115 |
<td>Test Cell 4</td> |
| 116 |
</tr> |
| 117 |
</table> |
| 118 |
<br> |
| 119 |
<ol> |
| 120 |
<li>One</li> |
| 121 |
<li>Two |
| 122 |
<ol> |
| 123 |
<li> |
| 124 |
Three |
| 125 |
</li> |
| 126 |
</ol> |
| 127 |
</ol> |
| 128 |
<br> |
| 129 |
<h3>Malformed list #1</h3> |
| 130 |
<ul> |
| 131 |
<li>List Item One</li> |
| 132 |
<li>List Item Two</li> |
| 133 |
<ul> |
| 134 |
<li>List Item Three</li> |
| 135 |
<li>List Item Four</li> |
| 136 |
<li>List Item Five</li> |
| 137 |
</ul> |
| 138 |
</ul> |
| 139 |
<h3>Malformed list #2</h3> |
| 140 |
<ul> |
| 141 |
<ul> |
| 142 |
<li>List Item one</li> |
| 143 |
<li>List Item two</li> |
| 144 |
<li>List Item three</li> |
| 145 |
</ul> |
| 146 |
<li>List Item four</li> |
| 147 |
<li>List Item five</li> |
| 148 |
</ul> |
| 149 |
</div> |
| 150 |
<br> |
| 151 |
<br> |
| 152 |
<h1>Editor with BlockNodeForEnter = DIV</h1> |
| 153 |
<div dojoType="dijit.Editor" id="editor3" plugins="e3Plugins" extraPlugins="['autourllink', 'viewsource']"> |
| 154 |
This instance is created from a div with an <b>extra</b> plugin, 'AutoUrlLink' loaded. |
| 155 |
<ul> |
| 156 |
<li>List Item One</li> |
| 157 |
<li>List Item Two</li> |
| 158 |
<li>List Item Three</li> |
| 159 |
<li>List Item Four</li> |
| 160 |
</ul> |
| 161 |
<br> |
| 162 |
<blockquote><a href="http://www.dojotoolkit.org">The Dojo Toolkit</a></blockquote> |
| 163 |
<br> |
| 164 |
<table border="1"> |
| 165 |
<tr> |
| 166 |
<td>Test Cell 1</td> |
| 167 |
<td>Test Cell 2</td> |
| 168 |
</tr> |
| 169 |
<tr> |
| 170 |
<td>Test Cell 3</td> |
| 171 |
<td>Test Cell 4</td> |
| 172 |
</tr> |
| 173 |
</table> |
| 174 |
<br> |
| 175 |
<ol> |
| 176 |
<li>One</li> |
| 177 |
<li>Two |
| 178 |
<ol> |
| 179 |
<li> |
| 180 |
Three |
| 181 |
</li> |
| 182 |
</ol> |
| 183 |
</ol> |
| 184 |
<br> |
| 185 |
<h3>Malformed list #1</h3> |
| 186 |
<ul> |
| 187 |
<li>List Item One</li> |
| 188 |
<li>List Item Two</li> |
| 189 |
<ul> |
| 190 |
<li>List Item Three</li> |
| 191 |
<li>List Item Four</li> |
| 192 |
<li>List Item Five</li> |
| 193 |
</ul> |
| 194 |
</ul> |
| 195 |
<h3>Malformed list #2</h3> |
| 196 |
<ul> |
| 197 |
<ul> |
| 198 |
<li>List Item one</li> |
| 199 |
<li>List Item two</li> |
| 200 |
<li>List Item three</li> |
| 201 |
</ul> |
| 202 |
<li>List Item four</li> |
| 203 |
<li>List Item five</li> |
| 204 |
</ul> |
| 205 |
</div> |
| 206 |
|
| 207 |
</body> |
| 208 |
</html> |