mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
UPDATEd : Bootstrap to 3.3.6; font-awesome to 4.5.0; bootstrap-tables;
CLEANED not used doc, examples e.t.c files and folders
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<application xmlns="http://ns.adobe.com/air/application/1.0">
|
||||
<id>com.ckeditor.air.sample</id>
|
||||
<name>CKEditor - Adobe AIR Sample Application</name>
|
||||
<version>1.0</version>
|
||||
<filename>CKEditor AIR Samples</filename>
|
||||
<description>This is a sample AIR application of CKEditor.</description>
|
||||
<copyright>Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.</copyright>
|
||||
<initialWindow>
|
||||
<content>_samples/adobeair/sample.html</content>
|
||||
<title>CKEditor - Adobe AIR Sample</title>
|
||||
<systemChrome>standard</systemChrome>
|
||||
<transparent>false</transparent>
|
||||
<visible>true</visible>
|
||||
<minimizable>true</minimizable>
|
||||
<maximizable>true</maximizable>
|
||||
<resizable>true</resizable>
|
||||
<x>100</x>
|
||||
<y>80</y>
|
||||
<width>950</width>
|
||||
<height>700</height>
|
||||
<minSize>900 600</minSize>
|
||||
</initialWindow>
|
||||
<installFolder>CKEditor/Sample AIR Application</installFolder>
|
||||
<programMenuFolder>CKEditor/Sample AIR Application</programMenuFolder>
|
||||
<customUpdateUI>false</customUpdateUI>
|
||||
<allowBrowserInvocation>false</allowBrowserInvocation>
|
||||
</application>
|
||||
@@ -1,9 +0,0 @@
|
||||
@ECHO OFF
|
||||
::
|
||||
:: Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
|
||||
:: For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
::
|
||||
:: Use this file to quickly run the sample in a Windows environment.
|
||||
::
|
||||
|
||||
adl application.xml ../../
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
|
||||
# For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
|
||||
# Use this file to quickly run the sample under Linux.
|
||||
|
||||
adl application.xml ../../
|
||||
@@ -1,45 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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>Replace Textarea by Code - CKEditor Sample</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
||||
<script type="text/javascript" src="../../ckeditor.js"></script>
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<style type="text/css">
|
||||
body { margin: 10px ; }
|
||||
</style></head>
|
||||
<body>
|
||||
<h1>
|
||||
CKEditor - Adobe AIR Sample
|
||||
</h1>
|
||||
<p>
|
||||
This is a sample HTML/JavaScript Adobe AIR application with CKEditor with default features.
|
||||
</p>
|
||||
<p>
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
// Replace the <textarea id="editor"> with an CKEditor
|
||||
// instance, using default configurations.
|
||||
CKEDITOR.replace( 'editor1' );
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
</p>
|
||||
<div id="footer" style="position:absolute;bottom:0;left:0;right:0;width:100%;padding-bottom:10px;">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="#" onclick="window.runtime.flash.net.navigateToURL(new window.runtime.flash.net.URLRequest('http://ckeditor.com/'));return false;">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="#" onclick="window.runtime.flash.net.navigateToURL(new window.runtime.flash.net.URLRequest('http://cksource.com/'));return false;">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,87 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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>Ajax - CKEditor Sample</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
||||
<script type="text/javascript" src="../ckeditor.js"></script>
|
||||
<script src="sample.js" type="text/javascript"></script>
|
||||
<link href="sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
var editor;
|
||||
|
||||
function createEditor()
|
||||
{
|
||||
if ( editor )
|
||||
return;
|
||||
|
||||
var html = document.getElementById( 'editorcontents' ).innerHTML;
|
||||
|
||||
// Create a new editor inside the <div id="editor">, setting its value to html
|
||||
var config = {};
|
||||
editor = CKEDITOR.appendTo( 'editor', config, html );
|
||||
}
|
||||
|
||||
function removeEditor()
|
||||
{
|
||||
if ( !editor )
|
||||
return;
|
||||
|
||||
// Retrieve the editor contents. In an Ajax application, this data would be
|
||||
// sent to the server or used in any other way.
|
||||
document.getElementById( 'editorcontents' ).innerHTML = editor.getData();
|
||||
document.getElementById( 'contents' ).style.display = '';
|
||||
|
||||
// Destroy the editor.
|
||||
editor.destroy();
|
||||
editor = null;
|
||||
}
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
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>
|
||||
<p>
|
||||
<input onclick="createEditor();" type="button" value="Create Editor" />
|
||||
<input onclick="removeEditor();" type="button" value="Remove Editor" />
|
||||
</p>
|
||||
<!-- This div will hold the editor. -->
|
||||
<div id="editor">
|
||||
</div>
|
||||
<div id="contents" style="display: none">
|
||||
<p>
|
||||
Edited Contents:</p>
|
||||
<!-- This div will be used to display the editor contents. -->
|
||||
<div id="editorcontents">
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,174 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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>API usage - CKEditor Sample</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
||||
<script type="text/javascript" src="../ckeditor.js"></script>
|
||||
<script src="sample.js" type="text/javascript"></script>
|
||||
<link href="sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
// The instanceReady event is fired when an instance of CKEditor has finished
|
||||
// its initialization.
|
||||
CKEDITOR.on( 'instanceReady', function( ev )
|
||||
{
|
||||
// Show the editor name and description in the browser status bar.
|
||||
document.getElementById( 'eMessage' ).innerHTML = '<p>Instance "' + ev.editor.name + '" loaded.<\/p>';
|
||||
|
||||
// Show this sample buttons.
|
||||
document.getElementById( 'eButtons' ).style.visibility = '';
|
||||
});
|
||||
|
||||
function InsertHTML()
|
||||
{
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = CKEDITOR.instances.editor1;
|
||||
var value = document.getElementById( 'htmlArea' ).value;
|
||||
|
||||
// Check the active editing mode.
|
||||
if ( oEditor.mode == 'wysiwyg' )
|
||||
{
|
||||
// Insert the desired HTML.
|
||||
oEditor.insertHtml( value );
|
||||
}
|
||||
else
|
||||
alert( 'You must be on WYSIWYG mode!' );
|
||||
}
|
||||
|
||||
function InsertText()
|
||||
{
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = CKEDITOR.instances.editor1;
|
||||
var value = document.getElementById( 'txtArea' ).value;
|
||||
|
||||
// Check the active editing mode.
|
||||
if ( oEditor.mode == 'wysiwyg' )
|
||||
{
|
||||
// Insert as plain text.
|
||||
oEditor.insertText( value );
|
||||
}
|
||||
else
|
||||
alert( 'You must be on WYSIWYG mode!' );
|
||||
}
|
||||
|
||||
function SetContents()
|
||||
{
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = CKEDITOR.instances.editor1;
|
||||
var value = document.getElementById( 'htmlArea' ).value;
|
||||
|
||||
// Set the editor contents (replace the actual one).
|
||||
oEditor.setData( value );
|
||||
}
|
||||
|
||||
function GetContents()
|
||||
{
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = CKEDITOR.instances.editor1;
|
||||
|
||||
// Get the editor contents
|
||||
alert( oEditor.getData() );
|
||||
}
|
||||
|
||||
function ExecuteCommand( commandName )
|
||||
{
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = CKEDITOR.instances.editor1;
|
||||
|
||||
// Check the active editing mode.
|
||||
if ( oEditor.mode == 'wysiwyg' )
|
||||
{
|
||||
// Execute the command.
|
||||
oEditor.execCommand( commandName );
|
||||
}
|
||||
else
|
||||
alert( 'You must be on WYSIWYG mode!' );
|
||||
}
|
||||
|
||||
function CheckDirty()
|
||||
{
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = CKEDITOR.instances.editor1;
|
||||
alert( oEditor.checkDirty() );
|
||||
}
|
||||
|
||||
function ResetDirty()
|
||||
{
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = CKEDITOR.instances.editor1;
|
||||
oEditor.resetDirty();
|
||||
alert( 'The "IsDirty" status has been reset' );
|
||||
}
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
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>
|
||||
<form action="sample_posteddata.php" method="post">
|
||||
<p>
|
||||
This sample shows how to use the CKEditor JavaScript API to interact with the editor
|
||||
at runtime.</p>
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
// Replace the <textarea id="editor1"> with an CKEditor instance.
|
||||
var editor = CKEDITOR.replace( 'editor1' );
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<div id="eMessage">
|
||||
</div>
|
||||
<div id="eButtons" style="visibility: hidden">
|
||||
<input onclick="InsertHTML();" type="button" value="Insert HTML" />
|
||||
<input onclick="SetContents();" type="button" value="Set Editor Contents" />
|
||||
<input onclick="GetContents();" type="button" value="Get Editor Contents (XHTML)" />
|
||||
<br />
|
||||
<textarea cols="80" id="htmlArea" rows="3"><h2>Test</h2><p>This is some <a href="/Test1.html">sample</a> HTML</p></textarea>
|
||||
<br />
|
||||
<br />
|
||||
<input onclick="InsertText();" type="button" value="Insert Text" />
|
||||
<br />
|
||||
<textarea cols="80" id="txtArea" rows="3"> First line with some leading whitespaces.
|
||||
|
||||
Second line of text preceding by two line-breaks.</textarea>
|
||||
<br />
|
||||
<input onclick="ExecuteCommand('bold');" type="button" value="Execute "bold" Command" />
|
||||
<input onclick="ExecuteCommand('link');" type="button" value="Execute "link" Command" />
|
||||
<br />
|
||||
<br />
|
||||
<input onclick="CheckDirty();" type="button" value="checkDirty()" />
|
||||
<input onclick="ResetDirty();" type="button" value="resetDirty()" />
|
||||
</div>
|
||||
</form>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,188 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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>Using API to customize dialogs - CKEditor Sample</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
||||
<script type="text/javascript" src="../ckeditor.js"></script>
|
||||
<script src="sample.js" type="text/javascript"></script>
|
||||
<link href="sample.css" rel="stylesheet" type="text/css" />
|
||||
<style id="styles" type="text/css">
|
||||
|
||||
.cke_button_myDialogCmd .cke_icon
|
||||
{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.cke_button_myDialogCmd .cke_label
|
||||
{
|
||||
display: inline !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
// When opening a dialog, its "definition" is created for it, for
|
||||
// each editor instance. The "dialogDefinition" event is then
|
||||
// fired. We should use this event to make customizations to the
|
||||
// definition of existing dialogs.
|
||||
CKEDITOR.on( 'dialogDefinition', function( ev )
|
||||
{
|
||||
// Take the dialog name and its definition from the event
|
||||
// data.
|
||||
var dialogName = ev.data.name;
|
||||
var dialogDefinition = ev.data.definition;
|
||||
|
||||
// Check if the definition is from the dialog we're
|
||||
// interested on (the "Link" dialog).
|
||||
if ( dialogName == 'link' )
|
||||
{
|
||||
// Get a reference to the "Link Info" tab.
|
||||
var infoTab = dialogDefinition.getContents( 'info' );
|
||||
|
||||
// Add a text field to the "info" tab.
|
||||
infoTab.add( {
|
||||
type : 'text',
|
||||
label : 'My Custom Field',
|
||||
id : 'customField',
|
||||
'default' : 'Sample!',
|
||||
validate : function()
|
||||
{
|
||||
if ( /\d/.test( this.getValue() ) )
|
||||
return 'My Custom Field must not contain digits';
|
||||
}
|
||||
});
|
||||
|
||||
// Remove the "Link Type" combo and the "Browser
|
||||
// Server" button from the "info" tab.
|
||||
infoTab.remove( 'linkType' );
|
||||
infoTab.remove( 'browse' );
|
||||
|
||||
// Set the default value for the URL field.
|
||||
var urlField = infoTab.get( 'url' );
|
||||
urlField['default'] = 'www.example.com';
|
||||
|
||||
// Remove the "Target" tab from the "Link" dialog.
|
||||
dialogDefinition.removeContents( 'target' );
|
||||
|
||||
// Add a new tab to the "Link" dialog.
|
||||
dialogDefinition.addContents({
|
||||
id : 'customTab',
|
||||
label : 'My Tab',
|
||||
accessKey : 'M',
|
||||
elements : [
|
||||
{
|
||||
id : 'myField1',
|
||||
type : 'text',
|
||||
label : 'My Text Field'
|
||||
},
|
||||
{
|
||||
id : 'myField2',
|
||||
type : 'text',
|
||||
label : 'Another Text Field'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
// Rewrite the 'onFocus' handler to always focus 'url' field.
|
||||
dialogDefinition.onFocus = function()
|
||||
{
|
||||
var urlField = this.getContentElement( 'info', 'url' );
|
||||
urlField.select();
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
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. -->
|
||||
<p>
|
||||
This sample shows how to use the dialog API to customize dialogs whithout changing
|
||||
the original editor code. The following customizations are being done::</p>
|
||||
<ol>
|
||||
<li><strong>Add dialog pages</strong> ("My Tab" in the Link dialog).</li>
|
||||
<li><strong>Remove a dialog tab</strong> ("Target" tab from the Link dialog).</li>
|
||||
<li><strong>Add dialog fields</strong> ("My Custom Field" into the Link dialog).</li>
|
||||
<li><strong>Remove dialog fields</strong> ("Link Type" and "Browser Server" the Link
|
||||
dialog).</li>
|
||||
<li><strong>Set default values for dialog fields</strong> (for the "URL" field in the
|
||||
Link dialog). </li>
|
||||
<li><strong>Create a custom dialog</strong> ("My Dialog" button).</li>
|
||||
</ol>
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
// Replace the <textarea id="editor1"> with an CKEditor instance.
|
||||
var editor = CKEDITOR.replace( 'editor1',
|
||||
{
|
||||
// Defines a simpler toolbar to be used in this sample.
|
||||
// Note that we have added out "MyButton" button here.
|
||||
toolbar : [ [ 'Source', '-', 'Bold', 'Italic', 'Underline', 'Strike','-','Link', '-', 'MyButton' ] ]
|
||||
});
|
||||
|
||||
// Listen for the "pluginsLoaded" event, so we are sure that the
|
||||
// "dialog" plugin has been loaded and we are able to do our
|
||||
// customizations.
|
||||
editor.on( 'pluginsLoaded', function( ev )
|
||||
{
|
||||
// If our custom dialog has not been registered, do that now.
|
||||
if ( !CKEDITOR.dialog.exists( 'myDialog' ) )
|
||||
{
|
||||
// We need to do the following trick to find out the dialog
|
||||
// definition file URL path. In the real world, you would simply
|
||||
// point to an absolute path directly, like "/mydir/mydialog.js".
|
||||
var href = document.location.href.split( '/' );
|
||||
href.pop();
|
||||
href.push( 'api_dialog', 'my_dialog.js' );
|
||||
href = href.join( '/' );
|
||||
|
||||
// Finally, register the dialog.
|
||||
CKEDITOR.dialog.add( 'myDialog', href );
|
||||
}
|
||||
|
||||
// Register the command used to open the dialog.
|
||||
editor.addCommand( 'myDialogCmd', new CKEDITOR.dialogCommand( 'myDialog' ) );
|
||||
|
||||
// Add the a custom toolbar buttons, which fires the above
|
||||
// command..
|
||||
editor.ui.addButton( 'MyButton',
|
||||
{
|
||||
label : 'My Dialog',
|
||||
command : 'myDialogCmd'
|
||||
} );
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.dialog.add( 'myDialog', function( editor )
|
||||
{
|
||||
return {
|
||||
title : 'My Dialog',
|
||||
minWidth : 400,
|
||||
minHeight : 200,
|
||||
contents : [
|
||||
{
|
||||
id : 'tab1',
|
||||
label : 'First Tab',
|
||||
title : 'First Tab',
|
||||
elements :
|
||||
[
|
||||
{
|
||||
id : 'input1',
|
||||
type : 'text',
|
||||
label : 'Input 1'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
} );
|
||||
@@ -1,105 +0,0 @@
|
||||
<%@ 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-2010, 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>
|
||||
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 href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,136 +0,0 @@
|
||||
<%@ 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-2010, 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>
|
||||
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 href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,103 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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 - CKEditor</title>
|
||||
<link type="text/css" rel="stylesheet" href="../sample.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
CKEditor Samples List for ASP
|
||||
</h1>
|
||||
<h2>
|
||||
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>
|
||||
<!-- #INCLUDE file="../../ckeditor.asp" -->
|
||||
</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>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>editor.basePath = "../../"</pre>
|
||||
</li>
|
||||
<li>
|
||||
Now use one of the three main methods to create the CKEditor instances:
|
||||
<ul>
|
||||
<li>
|
||||
Replace textarea with id (or name) "editor1".
|
||||
<pre>editor.replaceInstance "editor1"</pre>
|
||||
</li>
|
||||
<li>
|
||||
Replace all textareas with CKEditor.
|
||||
<pre>editor.replaceAll empty</pre>
|
||||
</li>
|
||||
<li>
|
||||
Create a textarea element and attach CKEditor to it.
|
||||
<pre>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>
|
||||
<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>
|
||||
Basic Samples
|
||||
</h2>
|
||||
<ul>
|
||||
<li><a href="replace.asp">Replace existing textareas by code</a></li>
|
||||
<li><a href="replaceAll.asp">Replace all textareas by code</a></li>
|
||||
<li><a href="standalone.asp">Create instances in asp</a></li>
|
||||
</ul>
|
||||
<h2>
|
||||
Advanced Samples
|
||||
</h2>
|
||||
<ul>
|
||||
<li><a href="advanced.asp">Advanced example</a></li>
|
||||
<li><a href="events.asp">Listening to events</a></li>
|
||||
</ul>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,72 +0,0 @@
|
||||
<%@ 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-2010, 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>
|
||||
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"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="Submit"/>
|
||||
</p>
|
||||
</form>
|
||||
</fieldset>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a 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>
|
||||
@@ -1,77 +0,0 @@
|
||||
<%@ 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-2010, 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>
|
||||
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"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<label for="editor2">
|
||||
Editor 2:</label><br/>
|
||||
<textarea cols="80" id="editor2" name="editor2" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="Submit"/>
|
||||
</p>
|
||||
</form>
|
||||
</fieldset>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a 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>
|
||||
@@ -1,46 +0,0 @@
|
||||
<%@ 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-2010, 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>
|
||||
CKEditor - Posted Data
|
||||
</h1>
|
||||
<table border="1" cellspacing="0" id="outputSample">
|
||||
<colgroup><col width="100" /></colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field Name</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<%
|
||||
Dim sForm
|
||||
For Each sForm in Request.Form
|
||||
%>
|
||||
<tr>
|
||||
<th><%=Server.HTMLEncode( sForm )%></th>
|
||||
<td><pre><%=Server.HTMLEncode( Request.Form(sForm) )%></pre></td>
|
||||
</tr>
|
||||
<% Next %>
|
||||
</table>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,72 +0,0 @@
|
||||
<%@ 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-2010, 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>
|
||||
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 href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,204 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*
|
||||
* Styles used by the XHTML 1.1 sample page (xhtml.html).
|
||||
*/
|
||||
|
||||
/**
|
||||
* Basic definitions for the editing area.
|
||||
*/
|
||||
body
|
||||
{
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
font-size: 80%;
|
||||
color: #000000;
|
||||
background-color: #ffffff;
|
||||
padding: 5px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Core styles.
|
||||
*/
|
||||
|
||||
.Bold
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.Italic
|
||||
{
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.Underline
|
||||
{
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.StrikeThrough
|
||||
{
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.Subscript
|
||||
{
|
||||
vertical-align: sub;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.Superscript
|
||||
{
|
||||
vertical-align: super;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
/**
|
||||
* Font faces.
|
||||
*/
|
||||
|
||||
.FontComic
|
||||
{
|
||||
font-family: 'Comic Sans MS';
|
||||
}
|
||||
|
||||
.FontCourier
|
||||
{
|
||||
font-family: 'Courier New';
|
||||
}
|
||||
|
||||
.FontTimes
|
||||
{
|
||||
font-family: 'Times New Roman';
|
||||
}
|
||||
|
||||
/**
|
||||
* Font sizes.
|
||||
*/
|
||||
|
||||
.FontSmaller
|
||||
{
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.FontLarger
|
||||
{
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
.FontSmall
|
||||
{
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
.FontBig
|
||||
{
|
||||
font-size: 14pt;
|
||||
}
|
||||
|
||||
.FontDouble
|
||||
{
|
||||
font-size: 200%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Font colors.
|
||||
*/
|
||||
.FontColor1
|
||||
{
|
||||
color: #ff9900;
|
||||
}
|
||||
|
||||
.FontColor2
|
||||
{
|
||||
color: #0066cc;
|
||||
}
|
||||
|
||||
.FontColor3
|
||||
{
|
||||
color: #ff0000;
|
||||
}
|
||||
|
||||
.FontColor1BG
|
||||
{
|
||||
background-color: #ff9900;
|
||||
}
|
||||
|
||||
.FontColor2BG
|
||||
{
|
||||
background-color: #0066cc;
|
||||
}
|
||||
|
||||
.FontColor3BG
|
||||
{
|
||||
background-color: #ff0000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indentation.
|
||||
*/
|
||||
|
||||
.Indent1
|
||||
{
|
||||
margin-left: 40px;
|
||||
}
|
||||
|
||||
.Indent2
|
||||
{
|
||||
margin-left: 80px;
|
||||
}
|
||||
|
||||
.Indent3
|
||||
{
|
||||
margin-left: 120px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Alignment.
|
||||
*/
|
||||
|
||||
.JustifyLeft
|
||||
{
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.JustifyRight
|
||||
{
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.JustifyCenter
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.JustifyFull
|
||||
{
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
/**
|
||||
* Other.
|
||||
*/
|
||||
|
||||
code
|
||||
{
|
||||
font-family: courier, monospace;
|
||||
background-color: #eeeeee;
|
||||
padding-left: 1px;
|
||||
padding-right: 1px;
|
||||
border: #c0c0c0 1px solid;
|
||||
}
|
||||
|
||||
kbd
|
||||
{
|
||||
padding: 0px 1px 0px 1px;
|
||||
border-width: 1px 2px 2px 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
blockquote
|
||||
{
|
||||
color: #808080;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,75 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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>AutoGrow Plugin - CKEditor Sample</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
||||
<script type="text/javascript" src="../ckeditor.js"></script>
|
||||
<script src="sample.js" type="text/javascript"></script>
|
||||
<link href="sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
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>
|
||||
<form action="sample_posteddata.php" method="post">
|
||||
<p>
|
||||
In this sample the AutoGrow plugin is available. It makes the editor grow to fit the size of the content.</p>
|
||||
<p>
|
||||
<label for="editor1">
|
||||
With default configuration:</label><br />
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
CKEDITOR.replace( 'editor1', {
|
||||
extraPlugins : 'autogrow'
|
||||
});
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
</p>
|
||||
<p>
|
||||
<label for="editor2">
|
||||
With maximum height set to 400:</label><br />
|
||||
<textarea cols="80" id="editor2" name="editor2" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
CKEDITOR.replace( 'editor2', {
|
||||
extraPlugins : 'autogrow',
|
||||
autoGrow_maxHeight : 400
|
||||
});
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="Submit" />
|
||||
</p>
|
||||
</form>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,137 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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>Replace DIV - CKEditor Sample</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
||||
<script type="text/javascript" src="../ckeditor.js"></script>
|
||||
<script src="sample.js" type="text/javascript"></script>
|
||||
<link href="sample.css" rel="stylesheet" type="text/css" />
|
||||
<style id="styles" type="text/css">
|
||||
|
||||
div.editable
|
||||
{
|
||||
border: solid 2px Transparent;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
div.editable:hover
|
||||
{
|
||||
border-color: black;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
// Uncomment the following code to test the "Timeout Loading Method".
|
||||
// CKEDITOR.loadFullCoreTimeout = 5;
|
||||
|
||||
window.onload = function()
|
||||
{
|
||||
// Listen to the double click event.
|
||||
if ( window.addEventListener )
|
||||
document.body.addEventListener( 'dblclick', onDoubleClick, false );
|
||||
else if ( window.attachEvent )
|
||||
document.body.attachEvent( 'ondblclick', onDoubleClick );
|
||||
|
||||
};
|
||||
|
||||
function onDoubleClick( ev )
|
||||
{
|
||||
// Get the element which fired the event. This is not necessarily the
|
||||
// element to which the event has been attached.
|
||||
var element = ev.target || ev.srcElement;
|
||||
|
||||
// Find out the div that holds this element.
|
||||
element = element.parentNode;
|
||||
|
||||
if ( element.nodeName.toLowerCase() == 'div'
|
||||
&& ( element.className.indexOf( 'editable' ) != -1 ) )
|
||||
replaceDiv( element );
|
||||
}
|
||||
|
||||
var editor;
|
||||
|
||||
function replaceDiv( div )
|
||||
{
|
||||
if ( editor )
|
||||
editor.destroy();
|
||||
|
||||
editor = CKEDITOR.replace( div );
|
||||
}
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
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>
|
||||
<p>
|
||||
Double-click on any of the following DIVs to transform them into editor instances.</p>
|
||||
<div class="editable">
|
||||
<h3>
|
||||
Part 1</h3>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi
|
||||
semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna
|
||||
rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla
|
||||
nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce
|
||||
eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus.
|
||||
</p>
|
||||
</div>
|
||||
<div class="editable">
|
||||
<h3>
|
||||
Part 2</h3>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi
|
||||
semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna
|
||||
rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla
|
||||
nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce
|
||||
eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus.
|
||||
</p>
|
||||
<p>
|
||||
Donec velit. Mauris massa. Vestibulum non nulla. Nam suscipit arcu nec elit. Phasellus
|
||||
sollicitudin iaculis ante. Ut non mauris et sapien tincidunt adipiscing. Vestibulum
|
||||
vitae leo. Suspendisse nec mi tristique nulla laoreet vulputate.
|
||||
</p>
|
||||
</div>
|
||||
<div class="editable">
|
||||
<h3>
|
||||
Part 3</h3>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi
|
||||
semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna
|
||||
rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla
|
||||
nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce
|
||||
eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus.
|
||||
</p>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,88 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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>ENTER Key Configuration - CKEditor Sample</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
||||
<script type="text/javascript" src="../ckeditor.js"></script>
|
||||
<script src="sample.js" type="text/javascript"></script>
|
||||
<link href="sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
var editor;
|
||||
|
||||
function changeEnter()
|
||||
{
|
||||
// If we already have an editor, let's destroy it first.
|
||||
if ( editor )
|
||||
editor.destroy( true );
|
||||
|
||||
// Create the editor again, with the appropriate settings.
|
||||
editor = CKEDITOR.replace( 'editor1',
|
||||
{
|
||||
enterMode : Number( document.getElementById( 'xEnter' ).value ),
|
||||
shiftEnterMode : Number( document.getElementById( 'xShiftEnter' ).value )
|
||||
});
|
||||
}
|
||||
|
||||
window.onload = changeEnter;
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
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>
|
||||
<div style="float: left; margin-right: 20px">
|
||||
When ENTER is pressed:<br />
|
||||
<select id="xEnter" onchange="changeEnter();">
|
||||
<option selected="selected" value="1">Create new <P> (recommended)</option>
|
||||
<option value="3">Create new <DIV></option>
|
||||
<option value="2">Break the line with a <BR></option>
|
||||
</select>
|
||||
</div>
|
||||
<div style="float: left">
|
||||
When SHIFT + ENTER is pressed:<br />
|
||||
<select id="xShiftEnter" onchange="changeEnter();">
|
||||
<option value="1">Create new <P></option>
|
||||
<option value="3">Create new <DIV></option>
|
||||
<option selected="selected" value="2">Break the line with a <BR> (recommended)</option>
|
||||
</select>
|
||||
</div>
|
||||
<br style="clear: both" />
|
||||
<form action="sample_posteddata.php" method="post">
|
||||
<p>
|
||||
<br />
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10">This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="Submit" />
|
||||
</p>
|
||||
</form>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,62 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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>Full Page Editing - CKEditor Sample</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
||||
<script type="text/javascript" src="../ckeditor.js"></script>
|
||||
<script src="sample.js" type="text/javascript"></script>
|
||||
<link href="sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
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>
|
||||
<form action="sample_posteddata.php" method="post">
|
||||
<p>
|
||||
In this sample the editor is configured to edit entire HTML pages, from the <html>
|
||||
tag to </html>.</p>
|
||||
<p>
|
||||
<label for="editor1">
|
||||
Editor 1:</label><br />
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10"><html><head><title>CKEditor Sample</title></head><body><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></body></html></textarea>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
CKEDITOR.replace( 'editor1',
|
||||
{
|
||||
fullPage : true
|
||||
});
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="Submit" />
|
||||
</p>
|
||||
</form>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,58 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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>Samples List - CKEditor</title>
|
||||
<link type="text/css" rel="stylesheet" href="sample.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
CKEditor Samples List
|
||||
</h1>
|
||||
<h2>
|
||||
Basic Samples
|
||||
</h2>
|
||||
<ul>
|
||||
<li><a href="replacebyclass.html">Replace textareas by class name</a></li>
|
||||
<li><a href="replacebycode.html">Replace textareas by code</a></li>
|
||||
<li><a href="fullpage.html">Full page support (editing from <html> to </html>)</a></li>
|
||||
</ul>
|
||||
<h2>
|
||||
Basic Customization
|
||||
</h2>
|
||||
<ul>
|
||||
<li><a href="skins.html">Skins</a></li>
|
||||
<li><a href="ui_color.html">User Interface Color</a></li>
|
||||
<li><a href="ui_languages.html">User Interface Languages</a></li>
|
||||
</ul>
|
||||
<h2>
|
||||
Advanced Samples
|
||||
</h2>
|
||||
<ul>
|
||||
<li><a href="divreplace.html">Replace DIV elements on the fly</a> </li>
|
||||
<li><a href="ajax.html">Create and destroy editor instances for Ajax applications</a></li>
|
||||
<li><a href="api.html">Basic usage of the API</a></li>
|
||||
<li><a href="api_dialog.html">Using the JavaScript API to customize dialogs</a></li>
|
||||
<li><a href="enterkey.html">Using the "Enter" key in CKEditor</a></li>
|
||||
<li><a href="sharedspaces.html">Shared toolbars</a></li>
|
||||
<li><a href="jqueryadapter.html">jQuery adapter example</a></li>
|
||||
<li><a href="output_xhtml.html">Output XHTML</a></li>
|
||||
<li><a href="output_html.html">Output HTML</a></li>
|
||||
<li><a href="output_for_flash.html">Output for Flash</a></li>
|
||||
<li><a href="autogrow.html">AutoGrow plugin</a></li>
|
||||
<li><a href="placeholder.html">Placeholder plugin</a></li>
|
||||
</ul>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,73 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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>jQuery adapter - CKEditor Sample</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
|
||||
<script type="text/javascript" src="../ckeditor.js"></script>
|
||||
<script type="text/javascript" src="../adapters/jquery.js"></script>
|
||||
<script src="sample.js" type="text/javascript"></script>
|
||||
<link href="sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
$(function()
|
||||
{
|
||||
var config = {
|
||||
toolbar:
|
||||
[
|
||||
['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink'],
|
||||
['UIColor']
|
||||
]
|
||||
};
|
||||
|
||||
// Initialize the editor.
|
||||
// Callback function can be passed and executed after full instance creation.
|
||||
$('.jquery_ckeditor').ckeditor(config);
|
||||
});
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
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. -->
|
||||
<form action="sample_posteddata.php" method="post">
|
||||
<p>
|
||||
<label for="editor1">
|
||||
Editor 1:</label><br />
|
||||
<textarea class="jquery_ckeditor" cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="Submit" />
|
||||
</p>
|
||||
</form>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,257 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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>Output for Flash</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
||||
<script type="text/javascript" src="../ckeditor.js"></script>
|
||||
<script src="sample.js" type="text/javascript"></script>
|
||||
<link href="sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="assets/swfobject.js"></script>
|
||||
<script type="text/javascript">
|
||||
function sendToFlash()
|
||||
{
|
||||
var html = CKEDITOR.instances.editor1.getData() ;
|
||||
var flash = document.getElementById( 'ckFlash' ) ;
|
||||
flash.setData( html ) ;
|
||||
}
|
||||
|
||||
function init()
|
||||
{
|
||||
var so = new SWFObject("assets/output_for_flash.swf", "ckFlash", "550", "400", "8", "#ffffff") ;
|
||||
so.addParam("wmode", "transparent");
|
||||
so.write("ckFlashContainer") ;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init()">
|
||||
<h1>
|
||||
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>
|
||||
|
||||
<div>
|
||||
This sample shows CKEditor configured to produce HTML code that can be used with
|
||||
<a href="http://www.adobe.com/livedocs/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000922.html">
|
||||
Flash</a>.
|
||||
</div>
|
||||
<hr />
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td style="width: 100%">
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <b>sample text</b>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
if ( document.location.protocol == 'file:' )
|
||||
alert( 'Warning: This samples does not work when loaded from local filesystem due to security restrictions implemented in Flash.' +
|
||||
'\n\nPlease load the sample from a web server instead.') ;
|
||||
|
||||
CKEDITOR.replace( 'editor1',
|
||||
{
|
||||
height : 300,
|
||||
width : '100%',
|
||||
toolbar : [
|
||||
['Source','-','Bold','Italic','Underline','-','BulletedList','-','Link','Unlink'],
|
||||
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
||||
'/',
|
||||
['Font','FontSize','-','TextColor','-','About']
|
||||
],
|
||||
|
||||
/*
|
||||
* Style sheet for the contents
|
||||
*/
|
||||
contentsCss : 'body {color:#000; background-color#FFF; font-family: Arial; font-size:80%;} p, ol, ul {margin-top: 0px; margin-bottom: 0px;}',
|
||||
|
||||
/*
|
||||
* Quirks doctype
|
||||
*/
|
||||
docType : '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">',
|
||||
|
||||
/*
|
||||
* Core styles.
|
||||
*/
|
||||
coreStyles_bold : { element : 'b' },
|
||||
coreStyles_italic : { element : 'i' },
|
||||
coreStyles_underline : { element : 'u'},
|
||||
|
||||
/*
|
||||
* Font face
|
||||
*/
|
||||
// Define the way font elements will be applied to the document. The "font"
|
||||
// element will be used.
|
||||
font_style :
|
||||
{
|
||||
element : 'font',
|
||||
attributes : { 'face' : '#(family)' }
|
||||
},
|
||||
|
||||
/*
|
||||
* Font sizes.
|
||||
* The CSS part of the font sizes isn't used by Flash, it is there to get the
|
||||
* font rendered correctly in CKEditor.
|
||||
*/
|
||||
fontSize_sizes : '8px/8;9px/9;10px/10;11px/11;12px/12;14px/14;16px/16;18px/18;20px/20;22px/22;24px/24;26px/26;28px/28;36px/36;48px/48;72px/72',
|
||||
fontSize_style :
|
||||
{
|
||||
element : 'font',
|
||||
attributes : { 'size' : '#(size)' },
|
||||
styles : { 'font-size' : '#(size)px' }
|
||||
} ,
|
||||
|
||||
/*
|
||||
* Font colors.
|
||||
*/
|
||||
colorButton_enableMore : true,
|
||||
|
||||
colorButton_foreStyle :
|
||||
{
|
||||
element : 'font',
|
||||
attributes : { 'color' : '#(color)' }
|
||||
},
|
||||
|
||||
colorButton_backStyle :
|
||||
{
|
||||
element : 'font',
|
||||
styles : { 'background-color' : '#(color)' }
|
||||
},
|
||||
|
||||
|
||||
on : { 'instanceReady' : configureFlashOutput }
|
||||
});
|
||||
|
||||
/*
|
||||
* Adjust the behavior of the dataProcessor to match the
|
||||
* requirements of Flash
|
||||
*/
|
||||
function configureFlashOutput( ev )
|
||||
{
|
||||
var editor = ev.editor,
|
||||
dataProcessor = editor.dataProcessor,
|
||||
htmlFilter = dataProcessor && dataProcessor.htmlFilter;
|
||||
|
||||
// Out self closing tags the HTML4 way, like <br>.
|
||||
dataProcessor.writer.selfClosingEnd = '>';
|
||||
|
||||
// Make output formatting match Flash expectations
|
||||
var dtd = CKEDITOR.dtd;
|
||||
for ( var e in CKEDITOR.tools.extend( {}, dtd.$nonBodyContent, dtd.$block, dtd.$listItem, dtd.$tableContent ) )
|
||||
{
|
||||
dataProcessor.writer.setRules( e,
|
||||
{
|
||||
indent : false,
|
||||
breakBeforeOpen : false,
|
||||
breakAfterOpen : false,
|
||||
breakBeforeClose : false,
|
||||
breakAfterClose : false
|
||||
});
|
||||
}
|
||||
dataProcessor.writer.setRules( 'br',
|
||||
{
|
||||
indent : false,
|
||||
breakBeforeOpen : false,
|
||||
breakAfterOpen : false,
|
||||
breakBeforeClose : false,
|
||||
breakAfterClose : false
|
||||
});
|
||||
|
||||
// Output properties as attributes, not styles.
|
||||
htmlFilter.addRules(
|
||||
{
|
||||
elements :
|
||||
{
|
||||
$ : function( element )
|
||||
{
|
||||
var style, match, width, height, align;
|
||||
|
||||
// Output dimensions of images as width and height
|
||||
if ( element.name == 'img' )
|
||||
{
|
||||
style = element.attributes.style;
|
||||
|
||||
if ( style )
|
||||
{
|
||||
// Get the width from the style.
|
||||
match = /(?:^|\s)width\s*:\s*(\d+)px/i.exec( style );
|
||||
width = match && match[1];
|
||||
|
||||
// Get the height from the style.
|
||||
match = /(?:^|\s)height\s*:\s*(\d+)px/i.exec( style );
|
||||
height = match && match[1];
|
||||
|
||||
if ( width )
|
||||
{
|
||||
element.attributes.style = element.attributes.style.replace( /(?:^|\s)width\s*:\s*(\d+)px;?/i , '' );
|
||||
element.attributes.width = width;
|
||||
}
|
||||
|
||||
if ( height )
|
||||
{
|
||||
element.attributes.style = element.attributes.style.replace( /(?:^|\s)height\s*:\s*(\d+)px;?/i , '' );
|
||||
element.attributes.height = height;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Output alignment of paragraphs using align
|
||||
if ( element.name == 'p' )
|
||||
{
|
||||
style = element.attributes.style;
|
||||
|
||||
if ( style )
|
||||
{
|
||||
// Get the align from the style.
|
||||
match = /(?:^|\s)text-align\s*:\s*(\w*);?/i.exec( style );
|
||||
align = match && match[1];
|
||||
|
||||
if ( align )
|
||||
{
|
||||
element.attributes.style = element.attributes.style.replace( /(?:^|\s)text-align\s*:\s*(\w*);?/i , '' );
|
||||
element.attributes.align = align;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( element.attributes.style == '' )
|
||||
delete element.attributes.style;
|
||||
|
||||
return element;
|
||||
}
|
||||
}
|
||||
|
||||
} );
|
||||
}
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
<input type="button" value="Send to Flash" onclick="sendToFlash();" />
|
||||
</td>
|
||||
<td valign="top" style="padding-left: 15px" id="ckFlashContainer">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,259 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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>HTML compliant output - CKEditor Sample</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
||||
<script type="text/javascript" src="../ckeditor.js"></script>
|
||||
<script src="sample.js" type="text/javascript"></script>
|
||||
<link href="sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
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>
|
||||
<form action="sample_posteddata.php" method="post">
|
||||
<p>
|
||||
This sample shows CKEditor configured to produce a legacy <strong>HTML4</strong> document. Traditional
|
||||
HTML elements like <b>, <i>, and <font> are used in place of
|
||||
<strong>, <em> and CSS styles.</p>
|
||||
<p>
|
||||
<label for="editor1">
|
||||
Editor 1:</label><br />
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <b>sample text</b>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
CKEDITOR.replace( 'editor1',
|
||||
{
|
||||
/*
|
||||
* Style sheet for the contents
|
||||
*/
|
||||
contentsCss : 'body {color:#000; background-color#:FFF;}',
|
||||
|
||||
/*
|
||||
* Simple HTML5 doctype
|
||||
*/
|
||||
docType : '<!DOCTYPE HTML>',
|
||||
|
||||
/*
|
||||
* Core styles.
|
||||
*/
|
||||
coreStyles_bold : { element : 'b' },
|
||||
coreStyles_italic : { element : 'i' },
|
||||
coreStyles_underline : { element : 'u'},
|
||||
coreStyles_strike : { element : 'strike' },
|
||||
|
||||
/*
|
||||
* Font face
|
||||
*/
|
||||
// Define the way font elements will be applied to the document. The "font"
|
||||
// element will be used.
|
||||
font_style :
|
||||
{
|
||||
element : 'font',
|
||||
attributes : { 'face' : '#(family)' }
|
||||
},
|
||||
|
||||
/*
|
||||
* Font sizes.
|
||||
*/
|
||||
fontSize_sizes : 'xx-small/1;x-small/2;small/3;medium/4;large/5;x-large/6;xx-large/7',
|
||||
fontSize_style :
|
||||
{
|
||||
element : 'font',
|
||||
attributes : { 'size' : '#(size)' }
|
||||
} ,
|
||||
|
||||
/*
|
||||
* Font colors.
|
||||
*/
|
||||
colorButton_enableMore : true,
|
||||
|
||||
colorButton_foreStyle :
|
||||
{
|
||||
element : 'font',
|
||||
attributes : { 'color' : '#(color)' },
|
||||
overrides : [ { element : 'span', attributes : { 'class' : /^FontColor(?:1|2|3)$/ } } ]
|
||||
},
|
||||
|
||||
colorButton_backStyle :
|
||||
{
|
||||
element : 'font',
|
||||
styles : { 'background-color' : '#(color)' }
|
||||
},
|
||||
|
||||
/*
|
||||
* Styles combo.
|
||||
*/
|
||||
stylesSet :
|
||||
[
|
||||
{ name : 'Computer Code', element : 'code' },
|
||||
{ name : 'Keyboard Phrase', element : 'kbd' },
|
||||
{ name : 'Sample Text', element : 'samp' },
|
||||
{ name : 'Variable', element : 'var' },
|
||||
|
||||
{ name : 'Deleted Text', element : 'del' },
|
||||
{ name : 'Inserted Text', element : 'ins' },
|
||||
|
||||
{ name : 'Cited Work', element : 'cite' },
|
||||
{ name : 'Inline Quotation', element : 'q' }
|
||||
],
|
||||
|
||||
on : { 'instanceReady' : configureHtmlOutput }
|
||||
});
|
||||
|
||||
/*
|
||||
* Adjust the behavior of the dataProcessor to avoid styles
|
||||
* and make it look like FCKeditor HTML output.
|
||||
*/
|
||||
function configureHtmlOutput( ev )
|
||||
{
|
||||
var editor = ev.editor,
|
||||
dataProcessor = editor.dataProcessor,
|
||||
htmlFilter = dataProcessor && dataProcessor.htmlFilter;
|
||||
|
||||
// Out self closing tags the HTML4 way, like <br>.
|
||||
dataProcessor.writer.selfClosingEnd = '>';
|
||||
|
||||
// Make output formatting behave similar to FCKeditor
|
||||
var dtd = CKEDITOR.dtd;
|
||||
for ( var e in CKEDITOR.tools.extend( {}, dtd.$nonBodyContent, dtd.$block, dtd.$listItem, dtd.$tableContent ) )
|
||||
{
|
||||
dataProcessor.writer.setRules( e,
|
||||
{
|
||||
indent : true,
|
||||
breakBeforeOpen : true,
|
||||
breakAfterOpen : false,
|
||||
breakBeforeClose : !dtd[ e ][ '#' ],
|
||||
breakAfterClose : true
|
||||
});
|
||||
}
|
||||
|
||||
// Output properties as attributes, not styles.
|
||||
htmlFilter.addRules(
|
||||
{
|
||||
elements :
|
||||
{
|
||||
$ : function( element )
|
||||
{
|
||||
// Output dimensions of images as width and height
|
||||
if ( element.name == 'img' )
|
||||
{
|
||||
var style = element.attributes.style;
|
||||
|
||||
if ( style )
|
||||
{
|
||||
// Get the width from the style.
|
||||
var match = /(?:^|\s)width\s*:\s*(\d+)px/i.exec( style ),
|
||||
width = match && match[1];
|
||||
|
||||
// Get the height from the style.
|
||||
match = /(?:^|\s)height\s*:\s*(\d+)px/i.exec( style );
|
||||
var height = match && match[1];
|
||||
|
||||
if ( width )
|
||||
{
|
||||
element.attributes.style = element.attributes.style.replace( /(?:^|\s)width\s*:\s*(\d+)px;?/i , '' );
|
||||
element.attributes.width = width;
|
||||
}
|
||||
|
||||
if ( height )
|
||||
{
|
||||
element.attributes.style = element.attributes.style.replace( /(?:^|\s)height\s*:\s*(\d+)px;?/i , '' );
|
||||
element.attributes.height = height;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Output alignment of paragraphs using align
|
||||
if ( element.name == 'p' )
|
||||
{
|
||||
style = element.attributes.style;
|
||||
|
||||
if ( style )
|
||||
{
|
||||
// Get the align from the style.
|
||||
match = /(?:^|\s)text-align\s*:\s*(\w*);/i.exec( style );
|
||||
var align = match && match[1];
|
||||
|
||||
if ( align )
|
||||
{
|
||||
element.attributes.style = element.attributes.style.replace( /(?:^|\s)text-align\s*:\s*(\w*);?/i , '' );
|
||||
element.attributes.align = align;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( !element.attributes.style )
|
||||
delete element.attributes.style;
|
||||
|
||||
return element;
|
||||
}
|
||||
},
|
||||
|
||||
attributes :
|
||||
{
|
||||
style : function( value, element )
|
||||
{
|
||||
// Return #RGB for background and border colors
|
||||
return convertRGBToHex( value );
|
||||
}
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Convert a CSS rgb(R, G, B) color back to #RRGGBB format.
|
||||
* @param Css style string (can include more than one color
|
||||
* @return Converted css style.
|
||||
*/
|
||||
function convertRGBToHex( cssStyle )
|
||||
{
|
||||
return cssStyle.replace( /(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi, function( match, red, green, blue )
|
||||
{
|
||||
red = parseInt( red, 10 ).toString( 16 );
|
||||
green = parseInt( green, 10 ).toString( 16 );
|
||||
blue = parseInt( blue, 10 ).toString( 16 );
|
||||
var color = [red, green, blue] ;
|
||||
|
||||
// Add padding zeros if the hex value is less than 0x10.
|
||||
for ( var i = 0 ; i < color.length ; i++ )
|
||||
color[i] = String( '0' + color[i] ).slice( -2 ) ;
|
||||
|
||||
return '#' + color.join( '' ) ;
|
||||
});
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="Submit" />
|
||||
</p>
|
||||
</form>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,159 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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>XHTML compliant output - CKEditor Sample</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
||||
<script type="text/javascript" src="../ckeditor.js"></script>
|
||||
<script src="sample.js" type="text/javascript"></script>
|
||||
<link href="sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
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>
|
||||
<form action="sample_posteddata.php" method="post">
|
||||
<p>
|
||||
This sample shows CKEditor configured to produce <strong>XHTML 1.1</strong> compliant
|
||||
HTML. Deprecated elements or attributes, like the <font> and <u> elements
|
||||
or the "style" attribute, are avoided.</p>
|
||||
<p>
|
||||
<label for="editor1">
|
||||
Editor 1:</label><br />
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <span class="Bold">sample text</span>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
CKEDITOR.replace( 'editor1',
|
||||
{
|
||||
/*
|
||||
* Style sheet for the contents
|
||||
*/
|
||||
contentsCss : 'assets/output_xhtml.css',
|
||||
|
||||
/*
|
||||
* Core styles.
|
||||
*/
|
||||
coreStyles_bold : { element : 'span', attributes : {'class': 'Bold'} },
|
||||
coreStyles_italic : { element : 'span', attributes : {'class': 'Italic'}},
|
||||
coreStyles_underline : { element : 'span', attributes : {'class': 'Underline'}},
|
||||
coreStyles_strike : { element : 'span', attributes : {'class': 'StrikeThrough'}, overrides : 'strike' },
|
||||
|
||||
coreStyles_subscript : { element : 'span', attributes : {'class': 'Subscript'}, overrides : 'sub' },
|
||||
coreStyles_superscript : { element : 'span', attributes : {'class': 'Superscript'}, overrides : 'sup' },
|
||||
|
||||
/*
|
||||
* Font face
|
||||
*/
|
||||
// List of fonts available in the toolbar combo. Each font definition is
|
||||
// separated by a semi-colon (;). We are using class names here, so each font
|
||||
// is defined by {Combo Label}/{Class Name}.
|
||||
font_names : 'Comic Sans MS/FontComic;Courier New/FontCourier;Times New Roman/FontTimes',
|
||||
|
||||
// Define the way font elements will be applied to the document. The "span"
|
||||
// element will be used. When a font is selected, the font name defined in the
|
||||
// above list is passed to this definition with the name "Font", being it
|
||||
// injected in the "class" attribute.
|
||||
// We must also instruct the editor to replace span elements that are used to
|
||||
// set the font (Overrides).
|
||||
font_style :
|
||||
{
|
||||
element : 'span',
|
||||
attributes : { 'class' : '#(family)' },
|
||||
overrides : [ { element : 'span', attributes : { 'class' : /^Font(?:Comic|Courier|Times)$/ } } ]
|
||||
},
|
||||
|
||||
/*
|
||||
* Font sizes.
|
||||
*/
|
||||
fontSize_sizes : 'Smaller/FontSmaller;Larger/FontLarger;8pt/FontSmall;14pt/FontBig;Double Size/FontDouble',
|
||||
fontSize_style :
|
||||
{
|
||||
element : 'span',
|
||||
attributes : { 'class' : '#(size)' },
|
||||
overrides : [ { element : 'span', attributes : { 'class' : /^Font(?:Smaller|Larger|Small|Big|Double)$/ } } ]
|
||||
} ,
|
||||
|
||||
/*
|
||||
* Font colors.
|
||||
*/
|
||||
colorButton_enableMore : false,
|
||||
|
||||
colorButton_colors : 'FontColor1/FF9900,FontColor2/0066CC,FontColor3/F00',
|
||||
colorButton_foreStyle :
|
||||
{
|
||||
element : 'span',
|
||||
attributes : { 'class' : '#(color)' },
|
||||
overrides : [ { element : 'span', attributes : { 'class' : /^FontColor(?:1|2|3)$/ } } ]
|
||||
},
|
||||
|
||||
colorButton_backStyle :
|
||||
{
|
||||
element : 'span',
|
||||
attributes : { 'class' : '#(color)BG' },
|
||||
overrides : [ { element : 'span', attributes : { 'class' : /^FontColor(?:1|2|3)BG$/ } } ]
|
||||
},
|
||||
|
||||
/*
|
||||
* Indentation.
|
||||
*/
|
||||
indentClasses : ['Indent1', 'Indent2', 'Indent3'],
|
||||
|
||||
/*
|
||||
* Paragraph justification.
|
||||
*/
|
||||
justifyClasses : [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyFull' ],
|
||||
|
||||
/*
|
||||
* Styles combo.
|
||||
*/
|
||||
stylesSet :
|
||||
[
|
||||
{ name : 'Strong Emphasis', element : 'strong' },
|
||||
{ name : 'Emphasis', element : 'em' },
|
||||
|
||||
{ name : 'Computer Code', element : 'code' },
|
||||
{ name : 'Keyboard Phrase', element : 'kbd' },
|
||||
{ name : 'Sample Text', element : 'samp' },
|
||||
{ name : 'Variable', element : 'var' },
|
||||
|
||||
{ name : 'Deleted Text', element : 'del' },
|
||||
{ name : 'Inserted Text', element : 'ins' },
|
||||
|
||||
{ name : 'Cited Work', element : 'cite' },
|
||||
{ name : 'Inline Quotation', element : 'q' }
|
||||
]
|
||||
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="Submit" />
|
||||
</p>
|
||||
</form>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,93 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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>
|
||||
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.php" method="post">
|
||||
<p>
|
||||
<label>Editor 1:</label><br/>
|
||||
</p>
|
||||
<?php
|
||||
// Include CKEditor class.
|
||||
include("../../ckeditor.php");
|
||||
|
||||
// Create class instance.
|
||||
$CKEditor = new CKEditor();
|
||||
|
||||
// Do not print the code directly to the browser, return it instead
|
||||
$CKEditor->returnOutput = true;
|
||||
|
||||
// Path to CKEditor directory, ideally instead of relative dir, use an absolute path:
|
||||
// $CKEditor->basePath = '/ckeditor/'
|
||||
// If not set, CKEditor will try to detect the correct path.
|
||||
$CKEditor->basePath = '../../';
|
||||
|
||||
// Set global configuration (will be used by all instances of CKEditor).
|
||||
$CKEditor->config['width'] = 600;
|
||||
|
||||
// Change default textarea attributes
|
||||
$CKEditor->textareaAttributes = array("cols" => 80, "rows" => 10);
|
||||
|
||||
// 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 = $CKEditor->editor("editor1", $initialValue);
|
||||
|
||||
echo $code;
|
||||
?>
|
||||
<p>
|
||||
<label>Editor 2:</label><br/>
|
||||
</p>
|
||||
<?php
|
||||
// Configuration that will be used only by the second editor.
|
||||
$config['toolbar'] = array(
|
||||
array( 'Source', '-', 'Bold', 'Italic', 'Underline', 'Strike' ),
|
||||
array( 'Image', 'Link', 'Unlink', 'Anchor' )
|
||||
);
|
||||
|
||||
$config['skin'] = 'v2';
|
||||
|
||||
// Create second instance.
|
||||
echo $CKEditor->editor("editor2", $initialValue, $config);
|
||||
?>
|
||||
<p>
|
||||
<input type="submit" value="Submit"/>
|
||||
</p>
|
||||
</form>
|
||||
</fieldset>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,130 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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>
|
||||
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.php" method="post">
|
||||
<p>
|
||||
<label>Editor 1:</label><br/>
|
||||
</p>
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Adds global event, will hide "Target" tab in Link dialog in all instances.
|
||||
*/
|
||||
function CKEditorHideLinkTargetTab(&$CKEditor) {
|
||||
|
||||
$function = 'function (ev) {
|
||||
// Take the dialog name and its definition from the event data
|
||||
var dialogName = ev.data.name;
|
||||
var dialogDefinition = ev.data.definition;
|
||||
|
||||
// Check if the definition is from the Link dialog.
|
||||
if ( dialogName == "link" )
|
||||
dialogDefinition.removeContents("target")
|
||||
}';
|
||||
|
||||
$CKEditor->addGlobalEventHandler('dialogDefinition', $function);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds global event, will notify about opened dialog.
|
||||
*/
|
||||
function CKEditorNotifyAboutOpenedDialog(&$CKEditor) {
|
||||
$function = 'function (evt) {
|
||||
alert("Loading dialog: " + evt.data.name);
|
||||
}';
|
||||
|
||||
$CKEditor->addGlobalEventHandler('dialogDefinition', $function);
|
||||
}
|
||||
|
||||
// Include CKEditor class.
|
||||
include("../../ckeditor.php");
|
||||
|
||||
// Create class instance.
|
||||
$CKEditor = new CKEditor();
|
||||
|
||||
// Set configuration option for all editors.
|
||||
$CKEditor->config['width'] = 750;
|
||||
|
||||
// Path to CKEditor directory, ideally instead of relative dir, use an absolute path:
|
||||
// $CKEditor->basePath = '/ckeditor/'
|
||||
// If not set, CKEditor will try to detect the correct path.
|
||||
$CKEditor->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.
|
||||
$CKEditor->addEventHandler('instanceReady', 'function (evt) {
|
||||
alert("Loaded editor: " + evt.editor.name);
|
||||
}');
|
||||
|
||||
// Create first instance.
|
||||
$CKEditor->editor("editor1", $initialValue);
|
||||
|
||||
// Clear event handlers, instances that will be created later will not have
|
||||
// the 'instanceReady' listener defined a couple of lines above.
|
||||
$CKEditor->clearEventHandlers();
|
||||
?>
|
||||
<p>
|
||||
<label>Editor 2:</label><br/>
|
||||
</p>
|
||||
<?php
|
||||
// Configuration that will be used only by the second editor.
|
||||
$config['width'] = '600';
|
||||
$config['toolbar'] = 'Basic';
|
||||
|
||||
// Add some global event handlers (for all editors).
|
||||
CKEditorHideLinkTargetTab($CKEditor);
|
||||
CKEditorNotifyAboutOpenedDialog($CKEditor);
|
||||
|
||||
// Event that will be handled only by the second editor.
|
||||
// Instead of calling addEventHandler(), events may be passed as an argument.
|
||||
$events['instanceReady'] = 'function (evt) {
|
||||
alert("Loaded second editor: " + evt.editor.name);
|
||||
}';
|
||||
|
||||
// Create second instance.
|
||||
$CKEditor->editor("editor2", $initialValue, $config, $events);
|
||||
?>
|
||||
<p>
|
||||
<input type="submit" value="Submit"/>
|
||||
</p>
|
||||
</form>
|
||||
</fieldset>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,63 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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>
|
||||
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.php" method="post">
|
||||
<p>
|
||||
<label for="editor1">
|
||||
Editor 1:</label><br/>
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="Submit"/>
|
||||
</p>
|
||||
</form>
|
||||
</fieldset>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
// Include CKEditor class.
|
||||
include_once "../../ckeditor.php";
|
||||
// Create class instance.
|
||||
$CKEditor = new CKEditor();
|
||||
// Path to CKEditor directory, ideally instead of relative dir, use an absolute path:
|
||||
// $CKEditor->basePath = '/ckeditor/'
|
||||
// If not set, CKEditor will try to detect the correct path.
|
||||
$CKEditor->basePath = '../../';
|
||||
// Replace textarea with id (or name) "editor1".
|
||||
$CKEditor->replace("editor1");
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,68 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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>
|
||||
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.php" method="post">
|
||||
<p>
|
||||
<label for="editor1">
|
||||
Editor 1:</label><br/>
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<label for="editor2">
|
||||
Editor 2:</label><br/>
|
||||
<textarea cols="80" id="editor2" name="editor2" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="Submit"/>
|
||||
</p>
|
||||
</form>
|
||||
</fieldset>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
// Include CKEditor class.
|
||||
include("../../ckeditor.php");
|
||||
// Create class instance.
|
||||
$CKEditor = new CKEditor();
|
||||
// Path to CKEditor directory, ideally instead of relative dir, use an absolute path:
|
||||
// $CKEditor->basePath = '/ckeditor/'
|
||||
// If not set, CKEditor will try to detect the correct path.
|
||||
$CKEditor->basePath = '../../';
|
||||
// Replace all textareas with CKEditor.
|
||||
$CKEditor->replaceAll();
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,64 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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>
|
||||
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.php" method="post">
|
||||
<p>
|
||||
<label for="editor1">
|
||||
Editor 1:</label><br/>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
// Include CKEditor class.
|
||||
include_once "../../ckeditor.php";
|
||||
// The initial value to be displayed in the editor.
|
||||
$initialValue = '<p>This is some <strong>sample text</strong>.</p>';
|
||||
// Create class instance.
|
||||
$CKEditor = new CKEditor();
|
||||
// Path to CKEditor directory, ideally instead of relative dir, use an absolute path:
|
||||
// $CKEditor->basePath = '/ckeditor/'
|
||||
// If not set, CKEditor will try to detect the correct path.
|
||||
$CKEditor->basePath = '../../';
|
||||
// Create textarea element and attach CKEditor to it.
|
||||
$CKEditor->editor("editor1", $initialValue);
|
||||
?>
|
||||
<input type="submit" value="Submit"/>
|
||||
</p>
|
||||
</form>
|
||||
</fieldset>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,62 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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>Placeholder Plugin - CKEditor Sample</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
||||
<script type="text/javascript" src="../ckeditor.js"></script>
|
||||
<script src="sample.js" type="text/javascript"></script>
|
||||
<link href="sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
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>
|
||||
<form action="sample_posteddata.php" method="post">
|
||||
<p>
|
||||
In this sample the Placeholder plugin is available.<br />
|
||||
It replaces text in the format of <code>[[text]]</code> to uneditable sections, and lets the user edit them and create new ones using a dialog.</p>
|
||||
<p>
|
||||
<label for="editor1">
|
||||
With default configuration:</label><br />
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is a [[sample placeholder]]. You are using <a href="http://ckeditor.com/">CKEditor</a>. </p></textarea>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
CKEDITOR.replace( 'editor1', {
|
||||
extraPlugins : 'placeholder',
|
||||
toolbar : [ [ 'Source', 'CreatePlaceholder' ] ]
|
||||
});
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="Submit" />
|
||||
</p>
|
||||
</form>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,49 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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>Replace Textareas by Class Name - CKEditor Sample</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
||||
<script type="text/javascript" src="../ckeditor.js"></script>
|
||||
<script src="sample.js" type="text/javascript"></script>
|
||||
<link href="sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
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>
|
||||
<form action="sample_posteddata.php" method="post">
|
||||
<p>
|
||||
<label for="editor1">
|
||||
Editor 1:</label><br />
|
||||
<textarea class="ckeditor" cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="Submit" />
|
||||
</p>
|
||||
</form>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,80 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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>Replace Textarea by Code - CKEditor Sample</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
||||
<script type="text/javascript" src="../ckeditor.js"></script>
|
||||
<script src="sample.js" type="text/javascript"></script>
|
||||
<link href="sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
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>
|
||||
<form action="sample_posteddata.php" method="post">
|
||||
<p>
|
||||
<label for="editor1">
|
||||
Editor 1:</label><br />
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
// This call can be placed at any point after the
|
||||
// <textarea>, or inside a <head><script> in a
|
||||
// window.onload event handler.
|
||||
|
||||
// Replace the <textarea id="editor"> with an CKEditor
|
||||
// instance, using default configurations.
|
||||
CKEDITOR.replace( 'editor1' );
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
</p>
|
||||
<p>
|
||||
<label for="editor2">
|
||||
Editor 2:</label><br />
|
||||
<textarea cols="80" id="editor2" name="editor2" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
// This call can be placed at any point after the
|
||||
// <textarea>, or inside a <head><script> in a
|
||||
// window.onload event handler.
|
||||
|
||||
// Replace the <textarea id="editor"> with an CKEditor
|
||||
// instance, using default configurations.
|
||||
CKEDITOR.replace( 'editor2' );
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="Submit" />
|
||||
</p>
|
||||
</form>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,81 +0,0 @@
|
||||
/*
|
||||
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
fieldset
|
||||
{
|
||||
margin: 0;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
form
|
||||
{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
pre
|
||||
{
|
||||
background-color: #F7F7F7;
|
||||
border: 1px solid #D7D7D7;
|
||||
overflow: auto;
|
||||
margin: 0;
|
||||
padding: 0.25em;
|
||||
}
|
||||
|
||||
#alerts
|
||||
{
|
||||
color: Red;
|
||||
}
|
||||
|
||||
#footer hr
|
||||
{
|
||||
margin: 10px 0 15px 0;
|
||||
height: 1px;
|
||||
border: solid 1px gray;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
#footer p
|
||||
{
|
||||
margin: 0 10px 10px 10px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#footer #copy
|
||||
{
|
||||
float: right;
|
||||
}
|
||||
|
||||
#outputSample
|
||||
{
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
#outputSample thead th
|
||||
{
|
||||
color: #dddddd;
|
||||
background-color: #999999;
|
||||
padding: 4px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#outputSample tbody th
|
||||
{
|
||||
vertical-align: top;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#outputSample pre
|
||||
{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
white-space: pre; /* CSS2 */
|
||||
white-space: -moz-pre-wrap; /* Mozilla*/
|
||||
white-space: -o-pre-wrap; /* Opera 7 */
|
||||
white-space: pre-wrap; /* CSS 2.1 */
|
||||
white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */
|
||||
word-wrap: break-word; /* IE */
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
/*
|
||||
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
// This file is not required by CKEditor and may be safely ignored.
|
||||
// It is just a helper file that displays a red message about browser compatibility
|
||||
// at the top of the samples (if incompatible browser is detected).
|
||||
|
||||
if ( window.CKEDITOR )
|
||||
{
|
||||
(function()
|
||||
{
|
||||
var showCompatibilityMsg = function()
|
||||
{
|
||||
var env = CKEDITOR.env;
|
||||
|
||||
var html = '<p><strong>Your browser is not compatible with CKEditor.</strong>';
|
||||
|
||||
var browsers =
|
||||
{
|
||||
gecko : 'Firefox 2.0',
|
||||
ie : 'Internet Explorer 6.0',
|
||||
opera : 'Opera 9.5',
|
||||
webkit : 'Safari 3.0'
|
||||
};
|
||||
|
||||
var alsoBrowsers = '';
|
||||
|
||||
for ( var key in env )
|
||||
{
|
||||
if ( browsers[ key ] )
|
||||
{
|
||||
if ( env[key] )
|
||||
html += ' CKEditor is compatible with ' + browsers[ key ] + ' or higher.';
|
||||
else
|
||||
alsoBrowsers += browsers[ key ] + '+, ';
|
||||
}
|
||||
}
|
||||
|
||||
alsoBrowsers = alsoBrowsers.replace( /\+,([^,]+), $/, '+ and $1' );
|
||||
|
||||
html += ' It is also compatible with ' + alsoBrowsers + '.';
|
||||
|
||||
html += '</p><p>With non compatible browsers, you should still be able to see and edit the contents (HTML) in a plain text field.</p>';
|
||||
|
||||
var alertsEl = document.getElementById( 'alerts' );
|
||||
alertsEl && ( alertsEl.innerHTML = html );
|
||||
};
|
||||
|
||||
var onload = function()
|
||||
{
|
||||
// Show a friendly compatibility message as soon as the page is loaded,
|
||||
// for those browsers that are not compatible with CKEditor.
|
||||
if ( !CKEDITOR.env.isCompatible )
|
||||
showCompatibilityMsg();
|
||||
};
|
||||
|
||||
// Register the onload listener.
|
||||
if ( window.addEventListener )
|
||||
window.addEventListener( 'load', onload, false );
|
||||
else if ( window.attachEvent )
|
||||
window.attachEvent( 'onload', onload );
|
||||
})();
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<?php
|
||||
/*
|
||||
Copyright (c) 2003-2010, 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>
|
||||
CKEditor - Posted Data
|
||||
</h1>
|
||||
<table border="1" cellspacing="0" id="outputSample">
|
||||
<colgroup><col width="100" /></colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field Name</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
|
||||
if ( isset( $_POST ) )
|
||||
$postArray = &$_POST ; // 4.1.0 or later, use $_POST
|
||||
else
|
||||
$postArray = &$HTTP_POST_VARS ; // prior to 4.1.0, use HTTP_POST_VARS
|
||||
|
||||
foreach ( $postArray as $sForm => $value )
|
||||
{
|
||||
if ( get_magic_quotes_gpc() )
|
||||
$postedValue = htmlspecialchars( stripslashes( $value ) ) ;
|
||||
else
|
||||
$postedValue = htmlspecialchars( $value ) ;
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<th style="vertical-align: top"><?php echo $sForm?></th>
|
||||
<td><pre><?php echo $postedValue?></pre></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,131 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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>Shared toolbars - CKEditor Sample</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
||||
<script type="text/javascript" src="../ckeditor.js"></script>
|
||||
<script src="sample.js" type="text/javascript"></script>
|
||||
<link href="sample.css" rel="stylesheet" type="text/css" />
|
||||
<style id="styles" type="text/css">
|
||||
|
||||
#editorsForm
|
||||
{
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
border: solid 1px #555;
|
||||
margin: 10px 0;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
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>
|
||||
<div id="topSpace">
|
||||
</div>
|
||||
<form action="sample_posteddata.php" id="editorsForm" method="post">
|
||||
<p>
|
||||
<label for="editor1">
|
||||
Editor 1 (uses the shared toolbar and element path):</label><br />
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<label for="editor2">
|
||||
Editor 2 (uses the shared toolbar and element path):</label><br />
|
||||
<textarea cols="80" id="editor2" name="editor2" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<label for="editor3">
|
||||
Editor 3 (uses the shared toolbar only):</label><br />
|
||||
<textarea cols="80" id="editor3" name="editor3" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<label for="editor4">
|
||||
Editor 4 (no shared spaces):</label><br />
|
||||
<textarea cols="80" id="editor4" name="editor4" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="Submit" />
|
||||
</p>
|
||||
</form>
|
||||
<div id="bottomSpace">
|
||||
</div>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
// Create all editor instances at the end of the page, so we are sure
|
||||
// that the "bottomSpace" div is available in the DOM (IE issue).
|
||||
|
||||
CKEDITOR.replace( 'editor1',
|
||||
{
|
||||
sharedSpaces :
|
||||
{
|
||||
top : 'topSpace',
|
||||
bottom : 'bottomSpace'
|
||||
},
|
||||
|
||||
// Removes the maximize plugin as it's not usable
|
||||
// in a shared toolbar.
|
||||
// Removes the resizer as it's not usable in a
|
||||
// shared elements path.
|
||||
removePlugins : 'maximize,resize'
|
||||
} );
|
||||
|
||||
CKEDITOR.replace( 'editor2',
|
||||
{
|
||||
sharedSpaces :
|
||||
{
|
||||
top : 'topSpace',
|
||||
bottom : 'bottomSpace'
|
||||
},
|
||||
|
||||
// Removes the maximize plugin as it's not usable
|
||||
// in a shared toolbar.
|
||||
// Removes the resizer as it's not usable in a
|
||||
// shared elements path.
|
||||
removePlugins : 'maximize,resize'
|
||||
} );
|
||||
|
||||
CKEDITOR.replace( 'editor3',
|
||||
{
|
||||
sharedSpaces :
|
||||
{
|
||||
top : 'topSpace'
|
||||
},
|
||||
|
||||
// Removes the maximize plugin as it's not usable
|
||||
// in a shared toolbar.
|
||||
removePlugins : 'maximize'
|
||||
} );
|
||||
|
||||
CKEDITOR.replace( 'editor4' );
|
||||
//]]>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,83 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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>Skins - CKEditor Sample</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
||||
<script type="text/javascript" src="../ckeditor.js"></script>
|
||||
<script src="sample.js" type="text/javascript"></script>
|
||||
<link href="sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
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>
|
||||
<form action="sample_posteddata.php" method="post">
|
||||
<p>
|
||||
"Kama" skin:<br />
|
||||
<textarea cols="80" id="editor_kama" name="editor_kama" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
CKEDITOR.replace( 'editor_kama',
|
||||
{
|
||||
skin : 'kama'
|
||||
});
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
</p>
|
||||
<p>
|
||||
"Office 2003" skin:<br />
|
||||
<textarea cols="80" id="editor_office2003" name="editor_office2003" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
CKEDITOR.replace( 'editor_office2003',
|
||||
{
|
||||
skin : 'office2003'
|
||||
});
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
</p>
|
||||
<p>
|
||||
"V2" skin:<br />
|
||||
<textarea cols="80" id="editor_v2" name="editor_v2" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
CKEDITOR.replace( 'editor_v2',
|
||||
{
|
||||
skin : 'v2'
|
||||
});
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
</p>
|
||||
</form>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,87 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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>UI Color Setting Tool - CKEditor Sample</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
||||
<script type="text/javascript" src="../ckeditor.js"></script>
|
||||
<script src="sample.js" type="text/javascript"></script>
|
||||
<link href="sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
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>
|
||||
<p>
|
||||
Click the UI Color Picker button to test your color preferences at runtime.</p>
|
||||
<form action="sample_posteddata.php" method="post">
|
||||
<p>
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
// Replace the <textarea id="editor"> with an CKEditor
|
||||
// instance, using default configurations.
|
||||
CKEDITOR.replace( 'editor1',
|
||||
{
|
||||
extraPlugins : 'uicolor',
|
||||
toolbar :
|
||||
[
|
||||
[ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink' ],
|
||||
[ 'UIColor' ]
|
||||
]
|
||||
});
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
</p>
|
||||
<p>
|
||||
<textarea cols="80" id="editor2" name="editor2" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
// Replace the <textarea id="editor"> with an CKEditor
|
||||
// instance, using default configurations.
|
||||
CKEDITOR.replace( 'editor2',
|
||||
{
|
||||
extraPlugins : 'uicolor',
|
||||
uiColor: '#14B8C4',
|
||||
toolbar :
|
||||
[
|
||||
[ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink' ],
|
||||
[ 'UIColor' ]
|
||||
]
|
||||
} );
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="Submit" />
|
||||
</p>
|
||||
</form>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,103 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2010, 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>User Interface Globalization - CKEditor Sample</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
||||
<script type="text/javascript" src="../ckeditor.js"></script>
|
||||
<script type="text/javascript" src="../lang/_languages.js"></script>
|
||||
<script src="sample.js" type="text/javascript"></script>
|
||||
<link href="sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
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>
|
||||
<form action="sample_posteddata.php" method="post">
|
||||
<p>
|
||||
Available languages (<span id="count"> </span> languages!):<br />
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
document.write( '<select disabled="disabled" id="languages" onchange="createEditor( this.value );">' );
|
||||
// Get the language list from the _languages.js file.
|
||||
for ( var i = 0 ; i < window.CKEDITOR_LANGS.length ; i++ )
|
||||
{
|
||||
document.write(
|
||||
'<option value="' + window.CKEDITOR_LANGS[i].code + '">' +
|
||||
window.CKEDITOR_LANGS[i].name +
|
||||
'</option>' );
|
||||
}
|
||||
document.write( '</select>' );
|
||||
//]]>
|
||||
</script>
|
||||
<br />
|
||||
<span style="color: #888888">(You may see strange characters if your system doesn't
|
||||
support the selected language)</span>
|
||||
</p>
|
||||
<p>
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
// Set the number of languages.
|
||||
document.getElementById( 'count' ).innerHTML = window.CKEDITOR_LANGS.length;
|
||||
|
||||
var editor;
|
||||
|
||||
function createEditor( languageCode )
|
||||
{
|
||||
if ( editor )
|
||||
editor.destroy();
|
||||
|
||||
// Replace the <textarea id="editor"> with an CKEditor
|
||||
// instance, using default configurations.
|
||||
editor = CKEDITOR.replace( 'editor1',
|
||||
{
|
||||
language : languageCode,
|
||||
|
||||
on :
|
||||
{
|
||||
instanceReady : function()
|
||||
{
|
||||
// Wait for the editor to be ready to set
|
||||
// the language combo.
|
||||
var languages = document.getElementById( 'languages' );
|
||||
languages.value = this.langCode;
|
||||
languages.disabled = false;
|
||||
}
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
// At page startup, load the default language:
|
||||
createEditor( '' );
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
</p>
|
||||
</form>
|
||||
<div id="footer">
|
||||
<hr />
|
||||
<p>
|
||||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user