first import

This commit is contained in:
Bachir Soussi Chiadmi
2015-04-08 11:40:19 +02:00
commit 1bc61b12ad
8435 changed files with 1582817 additions and 0 deletions

View File

@@ -0,0 +1,105 @@
<%@ codepage="65001" language="VBScript" %>
<% Option Explicit %>
<!-- #INCLUDE file="../../ckeditor.asp" -->
<%
' You must set "Enable Parent Paths" on your web site
' in order for the above relative include to work.
' Or you can use #INCLUDE VIRTUAL="/full path/ckeditor.asp"
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Sample - CKEditor</title>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<link href="../sample.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<h1 class="samples">
CKEditor Sample
</h1>
<!-- This <div> holds alert messages to be display in the sample page. -->
<div id="alerts">
<noscript>
<p>
<strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
support, like yours, you should still see the contents (HTML data) and you should
be able to edit it normally, without a rich editor interface.
</p>
</noscript>
</div>
<!-- This <fieldset> holds the HTML that you will usually find in your pages. -->
<fieldset title="Output">
<legend>Output</legend>
<form action="sample_posteddata.asp" method="post">
<p>
<label>Editor 1:</label><br/>
</p>
<%
' Create class instance.
dim editor, initialValue, code, textareaAttributes
set editor = New CKEditor
' Do not print the code directly to the browser, return it instead
editor.returnOutput = true
' Path to CKEditor directory, ideally instead of relative dir, use an absolute path:
' editor.basePath = "/ckeditor/"
' If not set, CKEditor will default to /ckeditor/
editor.basePath = "../../"
' Set global configuration (will be used by all instances of CKEditor).
editor.config("width") = 600
' Change default textarea attributes
set textareaAttributes = CreateObject("Scripting.Dictionary")
textareaAttributes.Add "rows", 10
textareaAttributes.Add "cols", 80
Set editor.textareaAttributes = textareaAttributes
' The initial value to be displayed in the editor.
initialValue = "<p>This is some <strong>sample text</strong>. You are using <a href=""http://ckeditor.com/"">CKEditor</a>.</p>"
' Create first instance.
code = editor.editor("editor1", initialValue)
response.write code
%>
<p>
<label>Editor 2:</label><br/>
</p>
<%
' Configuration that will be used only by the second editor.
editor.instanceConfig("toolbar") = Array( _
Array( "Source", "-", "Bold", "Italic", "Underline", "Strike" ), _
Array( "Image", "Link", "Unlink", "Anchor" ) _
)
editor.instanceConfig("skin") = "v2"
' Create second instance.
response.write editor.editor("editor2", initialValue)
%>
<p>
<input type="submit" value="Submit"/>
</p>
</form>
</fieldset>
<div id="footer">
<hr />
<p>
CKEditor - The text editor for Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
</p>
<p id="copy">
Copyright &copy; 2003-2011, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
Knabben. All rights reserved.
</p>
</div>
</body>
</html>

View File

@@ -0,0 +1,136 @@
<%@ codepage="65001" language="VBScript" %>
<% Option Explicit %>
<!-- #INCLUDE file="../../ckeditor.asp" -->
<%
' You must set "Enable Parent Paths" on your web site
' in order for the above relative include to work.
' Or you can use #INCLUDE VIRTUAL="/full path/ckeditor.asp"
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Sample - CKEditor</title>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<link href="../sample.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<h1 class="samples">
CKEditor Sample
</h1>
<!-- This <div> holds alert messages to be display in the sample page. -->
<div id="alerts">
<noscript>
<p>
<strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
support, like yours, you should still see the contents (HTML data) and you should
be able to edit it normally, without a rich editor interface.
</p>
</noscript>
</div>
<!-- This <fieldset> holds the HTML that you will usually find in your pages. -->
<fieldset title="Output">
<legend>Output</legend>
<form action="sample_posteddata.asp" method="post">
<p>
<label>Editor 1:</label><br/>
</p>
<%
''
' Adds global event, will hide "Target" tab in Link dialog in all instances.
'
function CKEditorHideLinkTargetTab(editor)
dim functionCode
functionCode = "function (ev) {" & vbcrlf & _
"// Take the dialog name and its definition from the event data" & vbcrlf & _
"var dialogName = ev.data.name;" & vbcrlf & _
"var dialogDefinition = ev.data.definition;" & vbcrlf & _
"" & vbcrlf & _
"// Check if the definition is from the Link dialog." & vbcrlf & _
"if ( dialogName == 'link' )" & vbcrlf & _
" dialogDefinition.removeContents('target')" & vbcrlf & _
"}" & vbcrlf
editor.addGlobalEventHandler "dialogDefinition", functionCode
end function
''
' Adds global event, will notify about opened dialog.
'
function CKEditorNotifyAboutOpenedDialog(editor)
dim functionCode
functionCode = "function (evt) {" & vbcrlf & _
"alert('Loading dialog: ' + evt.data.name);" & vbcrlf & _
"}"
editor.addGlobalEventHandler "dialogDefinition", functionCode
end function
dim editor, initialValue
' Create class instance.
set editor = new CKEditor
' Set configuration option for all editors.
editor.config("width") = 750
' Path to CKEditor directory, ideally instead of relative dir, use an absolute path:
' editor.basePath = "/ckeditor/"
' If not set, CKEditor will default to /ckeditor/
editor.basePath = "../../"
' The initial value to be displayed in the editor.
initialValue = "<p>This is some <strong>sample text</strong>. You are using <a href=""http://ckeditor.com/"">CKEditor</a>.</p>"
' Event that will be handled only by the first editor.
editor.addEventHandler "instanceReady", "function (evt) { alert('Loaded editor: ' + evt.editor.name );}"
' Create first instance.
editor.editor "editor1", initialValue
' Clear event handlers, instances that will be created later will not have
' the 'instanceReady' listener defined a couple of lines above.
editor.clearEventHandlers empty
%>
<p>
<label>Editor 2:</label><br/>
</p>
<%
' Configuration that will be used only by the second editor.
editor.instanceConfig("width") = 600
editor.instanceConfig("toolbar") = "Basic"
' Add some global event handlers (for all editors).
CKEditorHideLinkTargetTab(editor)
CKEditorNotifyAboutOpenedDialog(editor)
' Event that will be handled only by the second editor.
editor.addInstanceEventHandler "instanceReady", "function (evt) { alert('Loaded second editor: ' + evt.editor.name );}"
' Create second instance.
editor.editor "editor2", initialValue
%>
<p>
<input type="submit" value="Submit"/>
</p>
</form>
</fieldset>
<div id="footer">
<hr />
<p>
CKEditor - The text editor for Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
</p>
<p id="copy">
Copyright &copy; 2003-2011, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
Knabben. All rights reserved.
</p>
</div>
</body>
</html>

View File

@@ -0,0 +1,103 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ASP integration Samples List &mdash; CKEditor</title>
<link type="text/css" rel="stylesheet" href="../sample.css" />
</head>
<body>
<h1 class="samples">
CKEditor Samples List for ASP &mdash; CKEditor Sample
</h1>
<h2 class="samples">
Overview
</h2>
<p>The ckeditor.asp file provides a wrapper to ease the work of creating CKEditor instances from classic Asp.</p>
<p>To use it, you must first include it into your page:
<code>
&lt;!-- #INCLUDE file="../../ckeditor.asp" --&gt;
</code>
Of course, you should adjust the path to make it point to the correct location, and maybe use a full path (with virtual="" instead of file="")
</p>
<p>After that script is included, you can use it in different ways, based on the following pattern:</p>
<ol>
<li>
Create an instance of the CKEditor class:
<pre class="samples">dim editor
set editor = New CKEditor</pre>
</li>
<li>
Set the path to the folder where CKEditor has been installed, by default it will use /ckeditor/
<pre class="samples">editor.basePath = "../../"</pre>
</li>
<li>
Now use one of the three main methods to create the CKEditor instances:
<ul class="samples">
<li>
Replace textarea with id (or name) "editor1".
<pre class="samples">editor.replaceInstance "editor1"</pre>
</li>
<li>
Replace all textareas with CKEditor.
<pre class="samples">editor.replaceAll empty</pre>
</li>
<li>
Create a textarea element and attach CKEditor to it.
<pre class="samples">editor.editor "editor1", initialValue</pre>
</li>
</ul>
</li>
</ol>
<p>Before step 3 you can use a number of methods and properties to adjust the behavior of this class and the CKEditor instances
that will be created:</p>
<ul class="samples">
<li>returnOutput : if set to true, the functions won't dump the code with response.write, but instead they will return it so
you can do anything you want</li>
<li>basePath: location of the CKEditor scripts</li>
<li>initialized: if you set it to true, it means that you have already included the CKEditor.js file into the page and it
doesn't have to be generated again.</li>
<li>textareaAttributes: You can set here a Dictionary object with the attributes that you want to output in the call to the "editor" method.</li>
<li>config: Allows to set config values for all the instances from now on.</li>
<li>instanceConfig: Allows to set config values just for the next instance.</li>
<li>addEventHandler: Adds an event handler for all the instances from now on.</li>
<li>addInstanceEventHandler: Adds an event handler just for the next instance.</li>
<li>addGlobalEventHandler: Adds an event handler for the global CKEDITOR object.</li>
<li>clearEventHandlers: Removes one or all the event handlers from all the instances from now on.</li>
<li>clearInstanceEventHandlers: Removes one or all the event handlers from the next instance.</li>
<li>clearGlobalEventHandlers: Removes one or all the event handlers from the global CKEDITOR object.</li>
</ul>
<h2 class="samples">
Basic Samples
</h2>
<ul class="samples">
<li><a class="samples" href="replace.asp">Replace existing textareas by code</a></li>
<li><a class="samples" href="replaceall.asp">Replace all textareas by code</a></li>
<li><a class="samples" href="standalone.asp">Create instances in asp</a></li>
</ul>
<h2 class="samples">
Advanced Samples
</h2>
<ul class="samples">
<li><a class="samples" href="advanced.asp">Advanced example</a></li>
<li><a class="samples" href="events.asp">Listening to events</a></li>
</ul>
<div id="footer">
<hr />
<p>
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
</p>
<p id="copy">
Copyright &copy; 2003-2011, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved.
</p>
</div>
</body>
</html>

View File

@@ -0,0 +1,72 @@
<%@ codepage="65001" language="VBScript" %>
<% Option Explicit %>
<!-- #INCLUDE file="../../ckeditor.asp" -->
<%
' You must set "Enable Parent Paths" on your web site
' in order for the above relative include to work.
' Or you can use #INCLUDE VIRTUAL="/full path/ckeditor.asp"
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Sample - CKEditor</title>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<link href="../sample.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<h1 class="samples">
CKEditor Sample
</h1>
<!-- This <div> holds alert messages to be display in the sample page. -->
<div id="alerts">
<noscript>
<p>
<strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
support, like yours, you should still see the contents (HTML data) and you should
be able to edit it normally, without a rich editor interface.
</p>
</noscript>
</div>
<!-- This <fieldset> holds the HTML that you will usually find in your pages. -->
<fieldset title="Output">
<legend>Output</legend>
<form action="sample_posteddata.asp" method="post">
<p>
<label for="editor1">
Editor 1:</label><br/>
<textarea cols="80" id="editor1" name="editor1" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
</p>
<p>
<input type="submit" value="Submit"/>
</p>
</form>
</fieldset>
<div id="footer">
<hr />
<p>
CKEditor - The text editor for Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
</p>
<p id="copy">
Copyright &copy; 2003-2011, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
Knabben. All rights reserved.
</p>
</div>
<%
' Create class instance.
dim editor
set editor = New CKEditor
' Path to CKEditor directory, ideally instead of relative dir, use an absolute path:
' editor.basePath = "/ckeditor/"
' If not set, CKEditor will default to /ckeditor/
editor.basePath = "../../"
' Replace textarea with id (or name) "editor1".
editor.replaceInstance "editor1"
%>
</body>
</html>

View File

@@ -0,0 +1,77 @@
<%@ codepage="65001" language="VBScript" %>
<% Option Explicit %>
<!-- #INCLUDE file="../../ckeditor.asp" -->
<%
' You must set "Enable Parent Paths" on your web site
' in order for the above relative include to work.
' Or you can use #INCLUDE VIRTUAL="/full path/ckeditor.asp"
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Sample - CKEditor</title>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<link href="../sample.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<h1 class="samples">
CKEditor Sample
</h1>
<!-- This <div> holds alert messages to be display in the sample page. -->
<div id="alerts">
<noscript>
<p>
<strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
support, like yours, you should still see the contents (HTML data) and you should
be able to edit it normally, without a rich editor interface.
</p>
</noscript>
</div>
<!-- This <fieldset> holds the HTML that you will usually find in your pages. -->
<fieldset title="Output">
<legend>Output</legend>
<form action="sample_posteddata.asp" method="post">
<p>
<label for="editor1">
Editor 1:</label><br/>
<textarea cols="80" id="editor1" name="editor1" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
</p>
<p>
<label for="editor2">
Editor 2:</label><br/>
<textarea cols="80" id="editor2" name="editor2" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
</p>
<p>
<input type="submit" value="Submit"/>
</p>
</form>
</fieldset>
<div id="footer">
<hr />
<p>
CKEditor - The text editor for Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
</p>
<p id="copy">
Copyright &copy; 2003-2011, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
Knabben. All rights reserved.
</p>
</div>
<%
' Create class instance.
dim editor
set editor = New CKEditor
' Path to CKEditor directory, ideally instead of relative dir, use an absolute path:
' editor.basePath = "/ckeditor/"
' If not set, CKEditor will default to /ckeditor/
editor.basePath = "../../"
' Replace all textareas with CKEditor.
editor.replaceAll empty
%>
</body>
</html>

View File

@@ -0,0 +1,46 @@
<%@ codepage="65001" language="VBScript" %>
<% Option Explicit %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Sample - CKEditor</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="../sample.css" />
</head>
<body>
<h1 class="samples">
CKEditor - Posted Data
</h1>
<table border="1" cellspacing="0" id="outputSample">
<colgroup><col width="100" /></colgroup>
<thead>
<tr>
<th>Field&nbsp;Name</th>
<th>Value</th>
</tr>
</thead>
<%
Dim sForm
For Each sForm in Request.Form
%>
<tr>
<th><%=Server.HTMLEncode( sForm )%></th>
<td><pre class="samples"><%=Server.HTMLEncode( Request.Form(sForm) )%></pre></td>
</tr>
<% Next %>
</table>
<div id="footer">
<hr />
<p>
CKEditor - The text editor for Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
</p>
<p id="copy">
Copyright &copy; 2003-2011, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved.
</p>
</div>
</body>
</html>

View File

@@ -0,0 +1,72 @@
<%@ codepage="65001" language="VBScript" %>
<% Option Explicit %>
<!-- #INCLUDE file="../../ckeditor.asp" -->
<%
' You must set "Enable Parent Paths" on your web site
' in order for the above relative include to work.
' Or you can use #INCLUDE VIRTUAL="/full path/ckeditor.asp"
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Sample - CKEditor</title>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<link href="../sample.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<h1 class="samples">
CKEditor Sample
</h1>
<!-- This <div> holds alert messages to be display in the sample page. -->
<div id="alerts">
<noscript>
<p>
<strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
support, like yours, you should still see the contents (HTML data) and you should
be able to edit it normally, without a rich editor interface.
</p>
</noscript>
</div>
<!-- This <fieldset> holds the HTML that you will usually find in your pages. -->
<fieldset title="Output">
<legend>Output</legend>
<form action="sample_posteddata.asp" method="post">
<p>
Editor 1:
</p>
<p>
<%
dim initialValue, editor
' The initial value to be displayed in the editor.
initialValue = "<p>This is some <strong>sample text</strong>.</p>"
' Create class instance.
set editor = New CKEditor
' Path to CKEditor directory, ideally instead of relative dir, use an absolute path:
' editor.basePath = "/ckeditor/"
' If not set, CKEditor will default to /ckeditor/
editor.basePath = "../../"
' Create textarea element and attach CKEditor to it.
editor.editor "editor1", initialValue
%>
<input type="submit" value="Submit"/>
</p>
</form>
</fieldset>
<div id="footer">
<hr />
<p>
CKEditor - The text editor for Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
</p>
<p id="copy">
Copyright &copy; 2003-2011, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
Knabben. All rights reserved.
</p>
</div>
</body>
</html>