| 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 Test: Local Image Insert Dialog Plugin</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 | @import "../../form/resources/FileUploader.css"; |
| 12 | @import "../plugins/resources/css/LocalImage.css"; |
| 13 | </style> |
| 14 | |
| 15 | <script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config="parseOnLoad: true, isDebug: true"></script> |
| 16 | |
| 17 | <script type="text/javascript"> |
| 18 | dojo.require("dijit.Editor"); |
| 19 | dojo.require("dojo.parser"); // scan page for widgets and instantiate them |
| 20 | dojo.require("dojox.editor.plugins.LocalImage"); |
| 21 | dojo.require("dijit._editor.plugins.ViewSource"); |
| 22 | </script> |
| 23 | </head> |
| 24 | <body class="claro"> |
| 25 | <h1>Editor + Insert Image with file uploading</h1> |
| 26 | <br/> |
| 27 | <div dojoType="dijit.Editor" id="editor1" |
| 28 | extraPlugins="[{name: 'LocalImage', uploadable: true, uploadUrl: '../../form/tests/UploadFile.php', baseImageUrl: '../../form/tests/'}, 'viewSource']"> |
| 29 | <ol> |
| 30 | <li>The LocalImagePluginplugin is an 'example' style plugin that shows how to insert |
| 31 | image tags.</li> |
| 32 | <li>You need a php server to test this plugin. Please enable <b>dojox\form\tests\cLOG.php</b> and |
| 33 | <b>dojox\form\tests\UploadFile.php</b> first.</li> |
| 34 | </ol> |
| 35 | <br> |
| 36 | <div><a href="http://www.example.com/example.html" target="_top" id="exampleLink">This is an example link in the page.</a></div> |
| 37 | <br> |
| 38 | <br> |
| 39 | <div><img src="./sample.jpg" alt="Sample Image" id="exampleImage" /></div> |
| 40 | <br> |
| 41 | <br> |
| 42 | </div> |
| 43 | <br/> |
| 44 | <h1>Editor + Insert Image without file uploading</h1> |
| 45 | <br/> |
| 46 | <div dojoType="dijit.Editor" id="editor2" |
| 47 | extraPlugins="[{name: 'LocalImage'}, 'viewSource']"> |
| 48 | <ol> |
| 49 | <li>The LocalImagePlugin is an 'example' style plugin that shows how to insert |
| 50 | image tags.</li> |
| 51 | </ol> |
| 52 | <br> |
| 53 | <div><a href="http://www.example.com/example.html" target="_top" id="exampleLink">This is an example link in the page.</a></div> |
| 54 | <br> |
| 55 | <br> |
| 56 | <div><img src="./sample.jpg" alt="Sample Image" id="exampleImage" /></div> |
| 57 | <br> |
| 58 | <br> |
| 59 | </div> |
| 60 | </body> |
| 61 | </html> |