Updated
This commit is contained in:
208
master/examples/editorAutoUrlLink.html
Normal file
208
master/examples/editorAutoUrlLink.html
Normal file
@@ -0,0 +1,208 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Editor AutoUrlLink Test</title>
|
||||
|
||||
<style type="text/css">
|
||||
@import "../../../dojo/resources/dojo.css";
|
||||
@import "../../../dijit/tests/css/dijitTests.css";
|
||||
@import "../../../dijit/themes/claro/claro.css";
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" src="../../../dojo/dojo.js" djConfig="parseOnLoad: true, isDebug: true"></script>
|
||||
|
||||
<!-- only needed for alternate theme testing: -->
|
||||
<script type="text/javascript" src="../../../dijit/tests/_testCommon.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
dojo.require("dijit.Editor");
|
||||
dojo.require("dojo.parser");
|
||||
dojo.require("dojox.editor.plugins.AutoUrlLink");
|
||||
dojo.require("dijit._editor.plugins.ViewSource");
|
||||
|
||||
var e2Plugins = ["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|",
|
||||
"insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull",
|
||||
{name: "dijit._editor.plugins.EnterKeyHandling", blockNodeForEnter: "P"}];
|
||||
|
||||
var e3Plugins = ["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|",
|
||||
"insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull",
|
||||
{name: "dijit._editor.plugins.EnterKeyHandling", blockNodeForEnter: "DIV"}];
|
||||
</script>
|
||||
</head>
|
||||
<body class="claro">
|
||||
<br>
|
||||
<h1 class="testTitle">Editor + AutoUrlLink Plugin</h1>
|
||||
|
||||
<h2>This is an example editor with AutoUrlLink enabled.</h2>
|
||||
The AutoUrlLink plugin allows you recognize a URL as a link when you are typing.
|
||||
<br>
|
||||
|
||||
<div dojoType="dijit.Editor" id="editor1" extraPlugins="['autourllink', 'viewsource']">
|
||||
This instance is created from a div with an <b>extra</b> plugin, 'AutoUrlLink' loaded.
|
||||
<ul>
|
||||
<li>List Item One</li>
|
||||
<li>List Item Two</li>
|
||||
<li>List Item Three</li>
|
||||
<li>List Item Four</li>
|
||||
</ul>
|
||||
<br>
|
||||
<blockquote><a href="http://www.dojotoolkit.org">The Dojo Toolkit</a></blockquote>
|
||||
<br>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<td>Test Cell 1</td>
|
||||
<td>Test Cell 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Test Cell 3</td>
|
||||
<td>Test Cell 4</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<ol>
|
||||
<li>One</li>
|
||||
<li>Two
|
||||
<ol>
|
||||
<li>
|
||||
Three
|
||||
</li>
|
||||
</ol>
|
||||
</ol>
|
||||
<br>
|
||||
<h3>Malformed list #1</h3>
|
||||
<ul>
|
||||
<li>List Item One</li>
|
||||
<li>List Item Two</li>
|
||||
<ul>
|
||||
<li>List Item Three</li>
|
||||
<li>List Item Four</li>
|
||||
<li>List Item Five</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<h3>Malformed list #2</h3>
|
||||
<ul>
|
||||
<ul>
|
||||
<li>List Item one</li>
|
||||
<li>List Item two</li>
|
||||
<li>List Item three</li>
|
||||
</ul>
|
||||
<li>List Item four</li>
|
||||
<li>List Item five</li>
|
||||
</ul>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
<h1>Editor with BlockNodeForEnter = P</h1>
|
||||
<div dojoType="dijit.Editor" id="editor2" plugins="e2Plugins" extraPlugins="['autourllink', 'viewsource']">
|
||||
This instance is created from a div with an <b>extra</b> plugin, 'AutoUrlLink' loaded.
|
||||
<ul>
|
||||
<li>List Item One</li>
|
||||
<li>List Item Two</li>
|
||||
<li>List Item Three</li>
|
||||
<li>List Item Four</li>
|
||||
</ul>
|
||||
<br>
|
||||
<blockquote><a href="http://www.dojotoolkit.org">The Dojo Toolkit</a></blockquote>
|
||||
<br>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<td>Test Cell 1</td>
|
||||
<td>Test Cell 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Test Cell 3</td>
|
||||
<td>Test Cell 4</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<ol>
|
||||
<li>One</li>
|
||||
<li>Two
|
||||
<ol>
|
||||
<li>
|
||||
Three
|
||||
</li>
|
||||
</ol>
|
||||
</ol>
|
||||
<br>
|
||||
<h3>Malformed list #1</h3>
|
||||
<ul>
|
||||
<li>List Item One</li>
|
||||
<li>List Item Two</li>
|
||||
<ul>
|
||||
<li>List Item Three</li>
|
||||
<li>List Item Four</li>
|
||||
<li>List Item Five</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<h3>Malformed list #2</h3>
|
||||
<ul>
|
||||
<ul>
|
||||
<li>List Item one</li>
|
||||
<li>List Item two</li>
|
||||
<li>List Item three</li>
|
||||
</ul>
|
||||
<li>List Item four</li>
|
||||
<li>List Item five</li>
|
||||
</ul>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
<h1>Editor with BlockNodeForEnter = DIV</h1>
|
||||
<div dojoType="dijit.Editor" id="editor3" plugins="e3Plugins" extraPlugins="['autourllink', 'viewsource']">
|
||||
This instance is created from a div with an <b>extra</b> plugin, 'AutoUrlLink' loaded.
|
||||
<ul>
|
||||
<li>List Item One</li>
|
||||
<li>List Item Two</li>
|
||||
<li>List Item Three</li>
|
||||
<li>List Item Four</li>
|
||||
</ul>
|
||||
<br>
|
||||
<blockquote><a href="http://www.dojotoolkit.org">The Dojo Toolkit</a></blockquote>
|
||||
<br>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<td>Test Cell 1</td>
|
||||
<td>Test Cell 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Test Cell 3</td>
|
||||
<td>Test Cell 4</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<ol>
|
||||
<li>One</li>
|
||||
<li>Two
|
||||
<ol>
|
||||
<li>
|
||||
Three
|
||||
</li>
|
||||
</ol>
|
||||
</ol>
|
||||
<br>
|
||||
<h3>Malformed list #1</h3>
|
||||
<ul>
|
||||
<li>List Item One</li>
|
||||
<li>List Item Two</li>
|
||||
<ul>
|
||||
<li>List Item Three</li>
|
||||
<li>List Item Four</li>
|
||||
<li>List Item Five</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<h3>Malformed list #2</h3>
|
||||
<ul>
|
||||
<ul>
|
||||
<li>List Item one</li>
|
||||
<li>List Item two</li>
|
||||
<li>List Item three</li>
|
||||
</ul>
|
||||
<li>List Item four</li>
|
||||
<li>List Item five</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user