annotate sites/all/libraries/ckeditor/_samples/asp/advanced.asp @ 2:b74b41bb73f0

-- Google analytics module
author danieleb <danielebarchiesi@me.com>
date Thu, 22 Aug 2013 17:22:54 +0100
parents ff03f76ab3fe
children
rev   line source
danielebarchiesi@0 1 <%@ codepage="65001" language="VBScript" %>
danielebarchiesi@0 2 <% Option Explicit %>
danielebarchiesi@0 3 <!-- #INCLUDE file="../../ckeditor.asp" -->
danielebarchiesi@0 4 <%
danielebarchiesi@0 5
danielebarchiesi@0 6 ' You must set "Enable Parent Paths" on your web site
danielebarchiesi@0 7 ' in order for the above relative include to work.
danielebarchiesi@0 8 ' Or you can use #INCLUDE VIRTUAL="/full path/ckeditor.asp"
danielebarchiesi@0 9
danielebarchiesi@0 10 %>
danielebarchiesi@0 11 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
danielebarchiesi@0 12 <!--
danielebarchiesi@0 13 Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
danielebarchiesi@0 14 For licensing, see LICENSE.html or http://ckeditor.com/license
danielebarchiesi@0 15 -->
danielebarchiesi@0 16 <html xmlns="http://www.w3.org/1999/xhtml">
danielebarchiesi@0 17 <head>
danielebarchiesi@0 18 <title>Sample - CKEditor</title>
danielebarchiesi@0 19 <meta content="text/html; charset=utf-8" http-equiv="content-type"/>
danielebarchiesi@0 20 <link href="../sample.css" rel="stylesheet" type="text/css"/>
danielebarchiesi@0 21 </head>
danielebarchiesi@0 22 <body>
danielebarchiesi@0 23 <h1 class="samples">
danielebarchiesi@0 24 CKEditor Sample
danielebarchiesi@0 25 </h1>
danielebarchiesi@0 26 <!-- This <div> holds alert messages to be display in the sample page. -->
danielebarchiesi@0 27 <div id="alerts">
danielebarchiesi@0 28 <noscript>
danielebarchiesi@0 29 <p>
danielebarchiesi@0 30 <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
danielebarchiesi@0 31 support, like yours, you should still see the contents (HTML data) and you should
danielebarchiesi@0 32 be able to edit it normally, without a rich editor interface.
danielebarchiesi@0 33 </p>
danielebarchiesi@0 34 </noscript>
danielebarchiesi@0 35 </div>
danielebarchiesi@0 36 <!-- This <fieldset> holds the HTML that you will usually find in your pages. -->
danielebarchiesi@0 37 <fieldset title="Output">
danielebarchiesi@0 38 <legend>Output</legend>
danielebarchiesi@0 39 <form action="sample_posteddata.asp" method="post">
danielebarchiesi@0 40 <p>
danielebarchiesi@0 41 <label>Editor 1:</label><br/>
danielebarchiesi@0 42 </p>
danielebarchiesi@0 43 <%
danielebarchiesi@0 44 ' Create class instance.
danielebarchiesi@0 45 dim editor, initialValue, code, textareaAttributes
danielebarchiesi@0 46 set editor = New CKEditor
danielebarchiesi@0 47
danielebarchiesi@0 48 ' Do not print the code directly to the browser, return it instead
danielebarchiesi@0 49 editor.returnOutput = true
danielebarchiesi@0 50
danielebarchiesi@0 51 ' Path to CKEditor directory, ideally instead of relative dir, use an absolute path:
danielebarchiesi@0 52 ' editor.basePath = "/ckeditor/"
danielebarchiesi@0 53 ' If not set, CKEditor will default to /ckeditor/
danielebarchiesi@0 54 editor.basePath = "../../"
danielebarchiesi@0 55
danielebarchiesi@0 56 ' Set global configuration (will be used by all instances of CKEditor).
danielebarchiesi@0 57 editor.config("width") = 600
danielebarchiesi@0 58
danielebarchiesi@0 59 ' Change default textarea attributes
danielebarchiesi@0 60 set textareaAttributes = CreateObject("Scripting.Dictionary")
danielebarchiesi@0 61 textareaAttributes.Add "rows", 10
danielebarchiesi@0 62 textareaAttributes.Add "cols", 80
danielebarchiesi@0 63 Set editor.textareaAttributes = textareaAttributes
danielebarchiesi@0 64
danielebarchiesi@0 65 ' The initial value to be displayed in the editor.
danielebarchiesi@0 66 initialValue = "<p>This is some <strong>sample text</strong>. You are using <a href=""http://ckeditor.com/"">CKEditor</a>.</p>"
danielebarchiesi@0 67
danielebarchiesi@0 68 ' Create first instance.
danielebarchiesi@0 69 code = editor.editor("editor1", initialValue)
danielebarchiesi@0 70
danielebarchiesi@0 71 response.write code
danielebarchiesi@0 72 %>
danielebarchiesi@0 73 <p>
danielebarchiesi@0 74 <label>Editor 2:</label><br/>
danielebarchiesi@0 75 </p>
danielebarchiesi@0 76 <%
danielebarchiesi@0 77 ' Configuration that will be used only by the second editor.
danielebarchiesi@0 78
danielebarchiesi@0 79 editor.instanceConfig("toolbar") = Array( _
danielebarchiesi@0 80 Array( "Source", "-", "Bold", "Italic", "Underline", "Strike" ), _
danielebarchiesi@0 81 Array( "Image", "Link", "Unlink", "Anchor" ) _
danielebarchiesi@0 82 )
danielebarchiesi@0 83
danielebarchiesi@0 84 editor.instanceConfig("skin") = "v2"
danielebarchiesi@0 85
danielebarchiesi@0 86 ' Create second instance.
danielebarchiesi@0 87 response.write editor.editor("editor2", initialValue)
danielebarchiesi@0 88 %>
danielebarchiesi@0 89 <p>
danielebarchiesi@0 90 <input type="submit" value="Submit"/>
danielebarchiesi@0 91 </p>
danielebarchiesi@0 92 </form>
danielebarchiesi@0 93 </fieldset>
danielebarchiesi@0 94 <div id="footer">
danielebarchiesi@0 95 <hr />
danielebarchiesi@0 96 <p>
danielebarchiesi@0 97 CKEditor - The text editor for Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
danielebarchiesi@0 98 </p>
danielebarchiesi@0 99 <p id="copy">
danielebarchiesi@0 100 Copyright &copy; 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
danielebarchiesi@0 101 Knabben. All rights reserved.
danielebarchiesi@0 102 </p>
danielebarchiesi@0 103 </div>
danielebarchiesi@0 104 </body>
danielebarchiesi@0 105 </html>