Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated code, added a couple of custom buttons and some styles, and s…

…ome tests.
  • Loading branch information...
commit 1181e75ea04aa14f6210515a2430c361286e2385 1 parent ff05066
@napcs authored
Showing with 13,561 additions and 5,267 deletions.
  1. +7 −0 Gemfile
  2. +34 −0 Gemfile.lock
  3. BIN  public/.DS_Store
  4. BIN  public/javascript/.DS_Store
  5. +1 −1  public/javascript/app.js
  6. BIN  public/javascript/ckeditor/.DS_Store
  7. +1,324 −463 public/javascript/ckeditor/CHANGES.html
  8. +2 −2 public/javascript/ckeditor/INSTALL.html
  9. +3 −10 public/javascript/ckeditor/LICENSE.html
  10. +32 −0 public/javascript/ckeditor/_samples/adobeair/application.xml
  11. +9 −0 public/javascript/ckeditor/_samples/adobeair/run.bat
  12. +8 −0 public/javascript/ckeditor/_samples/adobeair/run.sh
  13. +45 −0 public/javascript/ckeditor/_samples/adobeair/sample.html
  14. +20 −9 public/javascript/ckeditor/_samples/ajax.html
  15. +64 −24 public/javascript/ckeditor/_samples/api.html
  16. +36 −19 public/javascript/ckeditor/_samples/api_dialog.html
  17. +1 −1  public/javascript/ckeditor/_samples/api_dialog/my_dialog.js
  18. +105 −0 public/javascript/ckeditor/_samples/asp/advanced.asp
  19. +136 −0 public/javascript/ckeditor/_samples/asp/events.asp
  20. +103 −0 public/javascript/ckeditor/_samples/asp/index.html
  21. +72 −0 public/javascript/ckeditor/_samples/asp/replace.asp
  22. +77 −0 public/javascript/ckeditor/_samples/asp/replaceall.asp
  23. +46 −0 public/javascript/ckeditor/_samples/asp/sample_posteddata.asp
  24. +72 −0 public/javascript/ckeditor/_samples/asp/standalone.asp
  25. +59 −0 public/javascript/ckeditor/_samples/assets/_posteddata.php
  26. BIN  public/javascript/ckeditor/_samples/assets/output_for_flash.fla
  27. BIN  public/javascript/ckeditor/_samples/assets/output_for_flash.swf
  28. +1 −1  public/javascript/ckeditor/_samples/assets/output_xhtml.css
  29. +70 −0 public/javascript/ckeditor/_samples/assets/parsesample.css
  30. +18 −0 public/javascript/ckeditor/_samples/assets/swfobject.js
  31. +108 −0 public/javascript/ckeditor/_samples/autogrow.html
  32. +125 −0 public/javascript/ckeditor/_samples/bbcode.html
  33. +94 −0 public/javascript/ckeditor/_samples/devtools.html
  34. +27 −10 public/javascript/ckeditor/_samples/divreplace.html
  35. +39 −12 public/javascript/ckeditor/_samples/enterkey.html
  36. +33 −13 public/javascript/ckeditor/_samples/fullpage.html
  37. +88 −26 public/javascript/ckeditor/_samples/index.html
  38. +34 −8 public/javascript/ckeditor/_samples/jqueryadapter.html
  39. +275 −0 public/javascript/ckeditor/_samples/output_for_flash.html
  40. +285 −0 public/javascript/ckeditor/_samples/output_html.html
  41. +33 −11 public/javascript/ckeditor/_samples/output_xhtml.html
  42. +56 −29 public/javascript/ckeditor/_samples/php/advanced.php
  43. +58 −35 public/javascript/ckeditor/_samples/php/events.php
  44. +47 −0 public/javascript/ckeditor/_samples/php/index.html
  45. +48 −24 public/javascript/ckeditor/_samples/php/replace.php
  46. +50 −30 public/javascript/ckeditor/_samples/php/replaceall.php
  47. +52 −33 public/javascript/ckeditor/_samples/php/standalone.php
  48. +81 −0 public/javascript/ckeditor/_samples/placeholder.html
  49. +91 −0 public/javascript/ckeditor/_samples/readonly.html
  50. +22 −7 public/javascript/ckeditor/_samples/replacebyclass.html
  51. +25 −8 public/javascript/ckeditor/_samples/replacebycode.html
  52. +85 −3 public/javascript/ckeditor/_samples/sample.css
  53. +1 −1  public/javascript/ckeditor/_samples/sample.js
  54. +21 −59 public/javascript/ckeditor/_samples/sample_posteddata.php
  55. +32 −10 public/javascript/ckeditor/_samples/sharedspaces.html
  56. +38 −11 public/javascript/ckeditor/_samples/skins.html
  57. +93 −0 public/javascript/ckeditor/_samples/stylesheetparser.html
  58. +115 −0 public/javascript/ckeditor/_samples/tableresize.html
  59. +49 −7 public/javascript/ckeditor/_samples/ui_color.html
  60. +38 −7 public/javascript/ckeditor/_samples/ui_languages.html
  61. +17 −8 public/javascript/ckeditor/_source/adapters/jquery.js
  62. +14 −18 public/javascript/ckeditor/_source/core/_bootstrap.js
  63. +42 −4 public/javascript/ckeditor/_source/core/ckeditor.js
  64. +71 −29 public/javascript/ckeditor/_source/core/ckeditor_base.js
  65. +7 −11 public/javascript/ckeditor/_source/core/ckeditor_basic.js
  66. +154 −2 public/javascript/ckeditor/_source/core/command.js
  67. +44 −17 public/javascript/ckeditor/_source/core/commanddefinition.js
  68. +234 −106 public/javascript/ckeditor/_source/core/config.js
  69. +6 −7 public/javascript/ckeditor/_source/core/dataprocessor.js
  70. +2 −3 public/javascript/ckeditor/_source/core/dom.js
  71. +24 −12 public/javascript/ckeditor/_source/core/dom/comment.js
  72. +29 −2 public/javascript/ckeditor/_source/core/dom/document.js
  73. +3 −3 public/javascript/ckeditor/_source/core/dom/documentfragment.js
  74. +21 −9 public/javascript/ckeditor/_source/core/dom/domobject.js
  75. +424 −69 public/javascript/ckeditor/_source/core/dom/element.js
  76. +18 −5 public/javascript/ckeditor/_source/core/dom/elementpath.js
  77. +10 −7 public/javascript/ckeditor/_source/core/dom/event.js
  78. +120 −91 public/javascript/ckeditor/_source/core/dom/node.js
  79. +4 −1 public/javascript/ckeditor/_source/core/dom/nodelist.js
  80. +321 −89 public/javascript/ckeditor/_source/core/dom/range.js
  81. +213 −0 public/javascript/ckeditor/_source/core/dom/rangelist.js
  82. +6 −1 public/javascript/ckeditor/_source/core/dom/text.js
  83. +106 −61 public/javascript/ckeditor/_source/core/dom/walker.js
  84. +1 −1  public/javascript/ckeditor/_source/core/dom/window.js
  85. +58 −25 public/javascript/ckeditor/_source/core/dtd.js
  86. +394 −91 public/javascript/ckeditor/_source/core/editor.js
  87. +12 −8 public/javascript/ckeditor/_source/core/editor_basic.js
  88. +100 −17 public/javascript/ckeditor/_source/core/env.js
  89. +12 −6 public/javascript/ckeditor/_source/core/event.js
  90. +5 −5 public/javascript/ckeditor/_source/core/eventInfo.js
  91. +27 −12 public/javascript/ckeditor/_source/core/focusmanager.js
  92. +17 −5 public/javascript/ckeditor/_source/core/htmlparser.js
  93. +1 −1  public/javascript/ckeditor/_source/core/htmlparser/basicwriter.js
  94. +1 −1  public/javascript/ckeditor/_source/core/htmlparser/cdata.js
  95. +1 −1  public/javascript/ckeditor/_source/core/htmlparser/comment.js
  96. +73 −5 public/javascript/ckeditor/_source/core/htmlparser/element.js
  97. +34 −8 public/javascript/ckeditor/_source/core/htmlparser/filter.js
  98. +159 −118 public/javascript/ckeditor/_source/core/htmlparser/fragment.js
  99. +1 −3 public/javascript/ckeditor/_source/core/htmlparser/text.js
  100. +13 −8 public/javascript/ckeditor/_source/core/lang.js
  101. +7 −9 public/javascript/ckeditor/_source/core/loader.js
  102. +18 −1 public/javascript/ckeditor/_source/core/plugindefinition.js
  103. +21 −3 public/javascript/ckeditor/_source/core/plugins.js
  104. +1 −1  public/javascript/ckeditor/_source/core/resourcemanager.js
  105. +7 −25 public/javascript/ckeditor/_source/core/scriptloader.js
  106. +5 −25 public/javascript/ckeditor/_source/core/skins.js
  107. +1 −1  public/javascript/ckeditor/_source/core/themes.js
  108. +84 −19 public/javascript/ckeditor/_source/core/tools.js
  109. +13 −1 public/javascript/ckeditor/_source/core/ui.js
  110. +2 −1  public/javascript/ckeditor/_source/lang/_languages.js
  111. +61 −58 public/javascript/ckeditor/_source/lang/_translationstatus.txt
  112. +521 −414 public/javascript/ckeditor/_source/lang/af.js
  113. +157 −50 public/javascript/ckeditor/_source/lang/ar.js
  114. +472 −365 public/javascript/ckeditor/_source/lang/bg.js
  115. +158 −51 public/javascript/ckeditor/_source/lang/bn.js
  116. +158 −51 public/javascript/ckeditor/_source/lang/bs.js
  117. +176 −69 public/javascript/ckeditor/_source/lang/ca.js
  118. +231 −124 public/javascript/ckeditor/_source/lang/cs.js
  119. +194 −87 public/javascript/ckeditor/_source/lang/cy.js
  120. +241 −134 public/javascript/ckeditor/_source/lang/da.js
  121. +221 −114 public/javascript/ckeditor/_source/lang/de.js
  122. +268 −161 public/javascript/ckeditor/_source/lang/el.js
  123. +161 −54 public/javascript/ckeditor/_source/lang/en-au.js
  124. +160 −53 public/javascript/ckeditor/_source/lang/en-ca.js
  125. +274 −167 public/javascript/ckeditor/_source/lang/en-gb.js
  126. +163 −56 public/javascript/ckeditor/_source/lang/en.js
  127. +430 −323 public/javascript/ckeditor/_source/lang/eo.js
  128. +179 −72 public/javascript/ckeditor/_source/lang/es.js
  129. +398 −291 public/javascript/ckeditor/_source/lang/et.js
  130. +156 −49 public/javascript/ckeditor/_source/lang/eu.js
  131. +360 −253 public/javascript/ckeditor/_source/lang/fa.js
  132. +164 −57 public/javascript/ckeditor/_source/lang/fi.js
  133. +233 −126 public/javascript/ckeditor/_source/lang/fo.js
  134. +158 −51 public/javascript/ckeditor/_source/lang/fr-ca.js
  135. +263 −156 public/javascript/ckeditor/_source/lang/fr.js
  136. +158 −51 public/javascript/ckeditor/_source/lang/gl.js
Sorry, we could not display the entire diff because too many files (872) changed.
View
7 Gemfile
@@ -0,0 +1,7 @@
+source :rubygems
+
+gem 'sinatra'
+gem 'haml'
+gem 'nokogiri'
+gem 'rspec', :group => :test
+gem 'rack-test', :group => :test
View
34 Gemfile.lock
@@ -0,0 +1,34 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ diff-lcs (1.1.3)
+ haml (3.1.4)
+ nokogiri (1.5.2)
+ rack (1.4.1)
+ rack-protection (1.2.0)
+ rack
+ rack-test (0.6.1)
+ rack (>= 1.0)
+ rspec (2.9.0)
+ rspec-core (~> 2.9.0)
+ rspec-expectations (~> 2.9.0)
+ rspec-mocks (~> 2.9.0)
+ rspec-core (2.9.0)
+ rspec-expectations (2.9.1)
+ diff-lcs (~> 1.1.3)
+ rspec-mocks (2.9.0)
+ sinatra (1.3.2)
+ rack (~> 1.3, >= 1.3.6)
+ rack-protection (~> 1.2)
+ tilt (~> 1.3, >= 1.3.3)
+ tilt (1.3.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ haml
+ nokogiri
+ rack-test
+ rspec
+ sinatra
View
BIN  public/.DS_Store
Binary file not shown
View
BIN  public/javascript/.DS_Store
Binary file not shown
View
2  public/javascript/app.js
@@ -2,7 +2,7 @@ $(function(){
$("#help").hide();
- $("a#help_link").click(function(e){
+ $("a#help_link").on("click", function(e){
e.preventDefault();
$("#help").dialog({
bgiframe: true,
View
BIN  public/javascript/ckeditor/.DS_Store
Binary file not shown
View
1,787 public/javascript/ckeditor/CHANGES.html 100644 → 100755
1,324 additions, 463 deletions not shown
View
4 public/javascript/ckeditor/INSTALL.html 100644 → 100755
@@ -1,6 +1,6 @@
<!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.
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
-->
<html xmlns="http://www.w3.org/1999/xhtml">
@@ -84,7 +84,7 @@
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
</p>
<p id="copy">
- Copyright &copy; 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
+ Copyright &copy; 2003-2012, <a href="http://cksource.com/">CKSource</a> - Frederico
Knabben. All rights reserved.
</p>
</div>
View
13 public/javascript/ckeditor/LICENSE.html 100644 → 100755
@@ -7,7 +7,7 @@
==========================
CKEditor - The text editor for Internet - http://ckeditor.com
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
Licensed under the terms of any of the following licenses at your
choice:
@@ -28,9 +28,7 @@
license you have chosen to be bound to when using, reproducing,
modifying and distributing this software, just include a text file
titled "legal.txt" in your version of this software, indicating your
-license choice. In any case, your choice will not restrict any
-recipient of your version of this software to use, reproduce, modify
-and distribute this software under any of the above licenses.
+license choice.
Sources of Intellectual Property Included in CKEditor
=====================================================
@@ -40,11 +38,6 @@
property. In some specific instances, CKEditor will incorporate work
done by developers outside of CKSource with their express permission.
-YUI Test: At _source/tests/yuitest.js can be found part of the source
-code of YUI, which is licensed under the terms of the BSD License
-(http://developer.yahoo.com/yui/license.txt). YUI is Copyright (C)
-2008, Yahoo! Inc.
-
Trademarks
==========
@@ -1286,7 +1279,7 @@
<p>
<strong>CKEditor&trade;</strong> - The text editor for Internet&trade; - <a href="http://ckeditor.com">
http://ckeditor.com</a><br />
- Copyright &copy; 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved.
+ Copyright &copy; 2003-2012, <a href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved.
</p>
<p>
Licensed under the terms of any of the following licenses at your choice:
View
32 public/javascript/ckeditor/_samples/adobeair/application.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+Copyright (c) 2003-2012, 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-2012, 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>
View
9 public/javascript/ckeditor/_samples/adobeair/run.bat
@@ -0,0 +1,9 @@
+@ECHO OFF
+::
+:: Copyright (c) 2003-2012, 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 ../../
View
8 public/javascript/ckeditor/_samples/adobeair/run.sh
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+
+# Copyright (c) 2003-2012, 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 ../../
View
45 public/javascript/ckeditor/_samples/adobeair/sample.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+Copyright (c) 2003-2012, 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 class="samples">
+ 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">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
+ <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 class="samples" 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 &copy; 2003-2012, <a class="samples" 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>
View
29 public/javascript/ckeditor/_samples/ajax.html 100644 → 100755
@@ -1,11 +1,11 @@
<!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.
+Copyright (c) 2003-2012, 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>
+ <title>Ajax &mdash; 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>
@@ -13,14 +13,13 @@
<script type="text/javascript">
//<![CDATA[
-var editor;
+var editor, html = '';
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 = {};
@@ -34,7 +33,7 @@
// 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( 'editorcontents' ).innerHTML = html = editor.getData();
document.getElementById( 'contents' ).style.display = '';
// Destroy the editor.
@@ -46,9 +45,20 @@
</script>
</head>
<body>
- <h1>
- CKEditor Sample
+ <h1 class="samples">
+ CKEditor Sample &mdash; Create and Destroy Editor Instances for Ajax Applications
</h1>
+ <div class="description">
+ <p>
+ This sample shows how to create and destroy CKEditor instances on the fly. After the removal of CKEditor the content created inside the editing
+ area will be displayed in a <code>&lt;div&gt;</code> element.
+ </p>
+ <p>
+ For details of how to create this setup check the source code of this sample page
+ for JavaScript code responsible for the creation and destruction of a CKEditor instance.
+ </p>
+ </div>
+
<!-- This <div> holds alert messages to be display in the sample page. -->
<div id="alerts">
<noscript>
@@ -59,6 +69,7 @@
</p>
</noscript>
</div>
+ <p>Click the buttons to create and remove a CKEditor instance.</p>
<p>
<input onclick="createEditor();" type="button" value="Create Editor" />
<input onclick="removeEditor();" type="button" value="Remove Editor" />
@@ -76,10 +87,10 @@
<div id="footer">
<hr />
<p>
- CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
+ CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
</p>
<p id="copy">
- Copyright &copy; 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
+ Copyright &copy; 2003-2012, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
Knabben. All rights reserved.
</p>
</div>
View
88 public/javascript/ckeditor/_samples/api.html 100644 → 100755
@@ -1,11 +1,11 @@
<!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.
+Copyright (c) 2003-2012, 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>
+ <title>API Usage &mdash; 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>
@@ -13,53 +13,73 @@
<script type="text/javascript">
//<![CDATA[
-// The instanceReady event is fired when an instance of CKEditor has finished
+// 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>';
+ document.getElementById( 'eMessage' ).innerHTML = '<p>Instance <code>' + ev.editor.name + '<\/code> loaded.<\/p>';
// Show this sample buttons.
- document.getElementById( 'eButtons' ).style.visibility = '';
+ document.getElementById( 'eButtons' ).style.display = 'block';
});
function InsertHTML()
{
// Get the editor instance that we want to interact with.
var oEditor = CKEDITOR.instances.editor1;
- var value = document.getElementById( 'plainArea' ).value;
+ var value = document.getElementById( 'htmlArea' ).value;
// Check the active editing mode.
if ( oEditor.mode == 'wysiwyg' )
{
- // Insert the desired HTML.
+ // Insert HTML code.
+ // http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#insertHtml
oEditor.insertHtml( value );
}
else
- alert( 'You must be on WYSIWYG mode!' );
+ alert( 'You must be in 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.
+ // http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#insertText
+ oEditor.insertText( value );
+ }
+ else
+ alert( 'You must be in WYSIWYG mode!' );
}
function SetContents()
{
// Get the editor instance that we want to interact with.
var oEditor = CKEDITOR.instances.editor1;
- var value = document.getElementById( 'plainArea' ).value;
+ var value = document.getElementById( 'htmlArea' ).value;
- // Set the editor contents (replace the actual one).
+ // Set editor contents (replace current contents).
+ // http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#setData
oEditor.setData( value );
}
function GetContents()
{
- // Get the editor instance that we want to interact with.
+ // Get the editor instance that you want to interact with.
var oEditor = CKEDITOR.instances.editor1;
- // Get the editor contents
+ // Get editor contents
+ // http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#getData
alert( oEditor.getData() );
}
-function ExecuteCommand(commandName)
+function ExecuteCommand( commandName )
{
// Get the editor instance that we want to interact with.
var oEditor = CKEDITOR.instances.editor1;
@@ -68,16 +88,20 @@
if ( oEditor.mode == 'wysiwyg' )
{
// Execute the command.
+ // http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#execCommand
oEditor.execCommand( commandName );
}
else
- alert( 'You must be on WYSIWYG mode!' );
+ alert( 'You must be in WYSIWYG mode!' );
}
function CheckDirty()
{
// Get the editor instance that we want to interact with.
var oEditor = CKEDITOR.instances.editor1;
+ // Checks whether the current editor contents present changes when compared
+ // to the contents loaded into the editor at startup
+ // http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#checkDirty
alert( oEditor.checkDirty() );
}
@@ -85,6 +109,8 @@
{
// Get the editor instance that we want to interact with.
var oEditor = CKEDITOR.instances.editor1;
+ // Resets the "dirty state" of the editor (see CheckDirty())
+ // http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#resetDirty
oEditor.resetDirty();
alert( 'The "IsDirty" status has been reset' );
}
@@ -94,9 +120,20 @@
</head>
<body>
- <h1>
- CKEditor Sample
+ <h1 class="samples">
+ CKEditor Sample &mdash; Using CKEditor JavaScript API
</h1>
+ <div class="description">
+ <p>
+ This sample shows how to use the
+ <a class="samples" href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html">CKEditor JavaScript API</a>
+ to interact with the editor at runtime.
+ </p>
+ <p>
+ For details on how to create this setup check the source code of this sample page.
+ </p>
+ </div>
+
<!-- This <div> holds alert messages to be display in the sample page. -->
<div id="alerts">
<noscript>
@@ -108,10 +145,7 @@
</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">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
+ <textarea cols="100" id="editor1" name="editor1" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
<script type="text/javascript">
//<![CDATA[
@@ -122,13 +156,19 @@
<div id="eMessage">
</div>
- <div id="eButtons" style="visibility: hidden">
+ <div id="eButtons" style="display: none">
<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="plainArea" rows="3">&lt;h2&gt;Test&lt;/h2&gt;&lt;p&gt;This is some &lt;a href="/Test1.html"&gt;sample&lt;/a&gt; HTML&lt;/p&gt;</textarea>
+ <textarea cols="100" id="htmlArea" rows="3">&lt;h2&gt;Test&lt;/h2&gt;&lt;p&gt;This is some &lt;a href="/Test1.html"&gt;sample&lt;/a&gt; HTML code.&lt;/p&gt;</textarea>
+ <br />
<br />
+ <input onclick="InsertText();" type="button" value="Insert Text" />
+ <br />
+ <textarea cols="100" id="txtArea" rows="3"> First line with some leading whitespaces.
+
+Second line of text preceded by two line breaks.</textarea>
<br />
<input onclick="ExecuteCommand('bold');" type="button" value="Execute &quot;bold&quot; Command" />
<input onclick="ExecuteCommand('link');" type="button" value="Execute &quot;link&quot; Command" />
@@ -141,10 +181,10 @@
<div id="footer">
<hr />
<p>
- CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
+ CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
</p>
<p id="copy">
- Copyright &copy; 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
+ Copyright &copy; 2003-2012, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
Knabben. All rights reserved.
</p>
</div>
View
55 public/javascript/ckeditor/_samples/api_dialog.html 100644 → 100755
@@ -1,11 +1,11 @@
<!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.
+Copyright (c) 2003-2012, 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>
+ <title>Using API to Customize Dialog Windows &mdash; 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>
@@ -87,6 +87,13 @@
}
]
});
+
+ // Rewrite the 'onFocus' handler to always focus 'url' field.
+ dialogDefinition.onFocus = function()
+ {
+ var urlField = this.getContentElement( 'info', 'url' );
+ urlField.select();
+ };
}
});
@@ -95,9 +102,32 @@
</head>
<body>
- <h1>
- CKEditor Sample
+ <h1 class="samples">
+ CKEditor Sample &mdash; Using CKEditor Dialog API
</h1>
+ <div class="description">
+ <p>
+ This sample shows how to use the
+ <a class="samples" href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.html">CKEditor Dialog API</a>
+ to customize CKEditor dialog windows without changing the original editor code.
+ The following customizations are being done in the example below:
+ </p>
+ <ol>
+ <li><strong>Adding dialog window tabs</strong> &ndash; "My Tab" in the "Link" dialog window.</li>
+ <li><strong>Removing a dialog window tab</strong> &ndash; "Target" tab from the "Link" dialog window.</li>
+ <li><strong>Adding dialog window fields</strong> &ndash; "My Custom Field" in the "Link" dialog window.</li>
+ <li><strong>Removing dialog window fields</strong> &ndash; "Link Type" and "Browse Server" in the "Link"
+ dialog window.</li>
+ <li><strong>Setting default values for dialog window fields</strong> &ndash; "URL" field in the
+ "Link" dialog window. </li>
+ <li><strong>Creating a custom dialog window</strong> &ndash; "My Dialog" dialog window opened with the "My Dialog" toolbar button.</li>
+ </ol>
+ <p>
+For details on how to create this setup check the source code of this sample page.
+ </p>
+ </div>
+
+
<!-- This <div> holds alert messages to be display in the sample page. -->
<div id="alerts">
<noscript>
@@ -110,19 +140,6 @@
</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">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
<script type="text/javascript">
//<![CDATA[
@@ -170,10 +187,10 @@
<div id="footer">
<hr />
<p>
- CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
+ CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
</p>
<p id="copy">
- Copyright &copy; 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
+ Copyright &copy; 2003-2012, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
Knabben. All rights reserved.
</p>
</div>
View
2  public/javascript/ckeditor/_samples/api_dialog/my_dialog.js 100644 → 100755
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
View
105 public/javascript/ckeditor/_samples/asp/advanced.asp
@@ -0,0 +1,105 @@
+<%@ codepage="65001" language="VBScript" %>
+<% Option Explicit %>
+<!-- #INCLUDE file="../../ckeditor.asp" -->
+<%
+
+ ' You must set "Enable Parent Paths" on your web site
+ ' in order for the above relative include to work.
+ ' Or you can use #INCLUDE VIRTUAL="/full path/ckeditor.asp"
+
+%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Sample - CKEditor</title>
+ <meta content="text/html; charset=utf-8" http-equiv="content-type"/>
+ <link href="../sample.css" rel="stylesheet" type="text/css"/>
+</head>
+<body>
+ <h1 class="samples">
+ CKEditor Sample
+ </h1>
+ <!-- This <div> holds alert messages to be display in the sample page. -->
+ <div id="alerts">
+ <noscript>
+ <p>
+ <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
+ support, like yours, you should still see the contents (HTML data) and you should
+ be able to edit it normally, without a rich editor interface.
+ </p>
+ </noscript>
+ </div>
+ <!-- This <fieldset> holds the HTML that you will usually find in your pages. -->
+ <fieldset title="Output">
+ <legend>Output</legend>
+ <form action="sample_posteddata.asp" method="post">
+ <p>
+ <label>Editor 1:</label><br/>
+ </p>
+<%
+ ' Create class instance.
+ dim editor, initialValue, code, textareaAttributes
+ set editor = New CKEditor
+
+ ' Do not print the code directly to the browser, return it instead
+ editor.returnOutput = true
+
+ ' Path to CKEditor directory, ideally instead of relative dir, use an absolute path:
+ ' editor.basePath = "/ckeditor/"
+ ' If not set, CKEditor will default to /ckeditor/
+ editor.basePath = "../../"
+
+ ' Set global configuration (will be used by all instances of CKEditor).
+ editor.config("width") = 600
+
+ ' Change default textarea attributes
+ set textareaAttributes = CreateObject("Scripting.Dictionary")
+ textareaAttributes.Add "rows", 10
+ textareaAttributes.Add "cols", 80
+ Set editor.textareaAttributes = textareaAttributes
+
+ ' The initial value to be displayed in the editor.
+ initialValue = "<p>This is some <strong>sample text</strong>. You are using <a href=""http://ckeditor.com/"">CKEditor</a>.</p>"
+
+ ' Create first instance.
+ code = editor.editor("editor1", initialValue)
+
+ response.write code
+%>
+ <p>
+ <label>Editor 2:</label><br/>
+ </p>
+<%
+' Configuration that will be used only by the second editor.
+
+editor.instanceConfig("toolbar") = Array( _
+ Array( "Source", "-", "Bold", "Italic", "Underline", "Strike" ), _
+ Array( "Image", "Link", "Unlink", "Anchor" ) _
+ )
+
+editor.instanceConfig("skin") = "v2"
+
+' Create second instance.
+response.write editor.editor("editor2", initialValue)
+%>
+ <p>
+ <input type="submit" value="Submit"/>
+ </p>
+ </form>
+ </fieldset>
+ <div id="footer">
+ <hr />
+ <p>
+ CKEditor - The text editor for Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
+ </p>
+ <p id="copy">
+ Copyright &copy; 2003-2012, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
+ Knabben. All rights reserved.
+ </p>
+ </div>
+</body>
+</html>
View
136 public/javascript/ckeditor/_samples/asp/events.asp
@@ -0,0 +1,136 @@
+<%@ codepage="65001" language="VBScript" %>
+<% Option Explicit %>
+<!-- #INCLUDE file="../../ckeditor.asp" -->
+<%
+
+ ' You must set "Enable Parent Paths" on your web site
+ ' in order for the above relative include to work.
+ ' Or you can use #INCLUDE VIRTUAL="/full path/ckeditor.asp"
+
+%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Sample - CKEditor</title>
+ <meta content="text/html; charset=utf-8" http-equiv="content-type"/>
+ <link href="../sample.css" rel="stylesheet" type="text/css"/>
+</head>
+<body>
+ <h1 class="samples">
+ CKEditor Sample
+ </h1>
+ <!-- This <div> holds alert messages to be display in the sample page. -->
+ <div id="alerts">
+ <noscript>
+ <p>
+ <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
+ support, like yours, you should still see the contents (HTML data) and you should
+ be able to edit it normally, without a rich editor interface.
+ </p>
+ </noscript>
+ </div>
+ <!-- This <fieldset> holds the HTML that you will usually find in your pages. -->
+ <fieldset title="Output">
+ <legend>Output</legend>
+ <form action="sample_posteddata.asp" method="post">
+ <p>
+ <label>Editor 1:</label><br/>
+ </p>
+<%
+
+''
+ ' Adds global event, will hide "Target" tab in Link dialog in all instances.
+ '
+function CKEditorHideLinkTargetTab(editor)
+ dim functionCode
+ functionCode = "function (ev) {" & vbcrlf & _
+ "// Take the dialog name and its definition from the event data" & vbcrlf & _
+ "var dialogName = ev.data.name;" & vbcrlf & _
+ "var dialogDefinition = ev.data.definition;" & vbcrlf & _
+ "" & vbcrlf & _
+ "// Check if the definition is from the Link dialog." & vbcrlf & _
+ "if ( dialogName == 'link' )" & vbcrlf & _
+ " dialogDefinition.removeContents('target')" & vbcrlf & _
+ "}" & vbcrlf
+
+ editor.addGlobalEventHandler "dialogDefinition", functionCode
+end function
+
+''
+ ' Adds global event, will notify about opened dialog.
+ '
+function CKEditorNotifyAboutOpenedDialog(editor)
+ dim functionCode
+ functionCode = "function (evt) {" & vbcrlf & _
+ "alert('Loading dialog: ' + evt.data.name);" & vbcrlf & _
+ "}"
+
+ editor.addGlobalEventHandler "dialogDefinition", functionCode
+end function
+
+
+dim editor, initialValue
+
+' Create class instance.
+set editor = new CKEditor
+
+' Set configuration option for all editors.
+editor.config("width") = 750
+
+' Path to CKEditor directory, ideally instead of relative dir, use an absolute path:
+' editor.basePath = "/ckeditor/"
+' If not set, CKEditor will default to /ckeditor/
+editor.basePath = "../../"
+
+' The initial value to be displayed in the editor.
+initialValue = "<p>This is some <strong>sample text</strong>. You are using <a href=""http://ckeditor.com/"">CKEditor</a>.</p>"
+
+' Event that will be handled only by the first editor.
+editor.addEventHandler "instanceReady", "function (evt) { alert('Loaded editor: ' + evt.editor.name );}"
+
+' Create first instance.
+editor.editor "editor1", initialValue
+
+' Clear event handlers, instances that will be created later will not have
+' the 'instanceReady' listener defined a couple of lines above.
+editor.clearEventHandlers empty
+%>
+ <p>
+ <label>Editor 2:</label><br/>
+ </p>
+<%
+' Configuration that will be used only by the second editor.
+editor.instanceConfig("width") = 600
+editor.instanceConfig("toolbar") = "Basic"
+
+' Add some global event handlers (for all editors).
+CKEditorHideLinkTargetTab(editor)
+CKEditorNotifyAboutOpenedDialog(editor)
+
+' Event that will be handled only by the second editor.
+editor.addInstanceEventHandler "instanceReady", "function (evt) { alert('Loaded second editor: ' + evt.editor.name );}"
+
+' Create second instance.
+editor.editor "editor2", initialValue
+%>
+ <p>
+ <input type="submit" value="Submit"/>
+ </p>
+ </form>
+ </fieldset>
+ <div id="footer">
+ <hr />
+ <p>
+ CKEditor - The text editor for Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
+ </p>
+ <p id="copy">
+ Copyright &copy; 2003-2012, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
+ Knabben. All rights reserved.
+ </p>
+ </div>
+</body>
+</html>
View
103 public/javascript/ckeditor/_samples/asp/index.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>ASP integration Samples List &mdash; CKEditor</title>
+ <link type="text/css" rel="stylesheet" href="../sample.css" />
+</head>
+<body>
+ <h1 class="samples">
+ CKEditor Samples List for ASP &mdash; CKEditor Sample
+ </h1>
+ <h2 class="samples">
+ Overview
+ </h2>
+ <p>The ckeditor.asp file provides a wrapper to ease the work of creating CKEditor instances from classic Asp.</p>
+ <p>To use it, you must first include it into your page:
+ <code>
+ &lt;!-- #INCLUDE file="../../ckeditor.asp" --&gt;
+ </code>
+ Of course, you should adjust the path to make it point to the correct location, and maybe use a full path (with virtual="" instead of file="")
+ </p>
+ <p>After that script is included, you can use it in different ways, based on the following pattern:</p>
+
+<ol>
+ <li>
+ Create an instance of the CKEditor class:
+<pre class="samples">dim editor
+set editor = New CKEditor</pre>
+ </li>
+ <li>
+ Set the path to the folder where CKEditor has been installed, by default it will use /ckeditor/
+ <pre class="samples">editor.basePath = "../../"</pre>
+ </li>
+ <li>
+ Now use one of the three main methods to create the CKEditor instances:
+ <ul class="samples">
+ <li>
+ Replace textarea with id (or name) "editor1".
+ <pre class="samples">editor.replaceInstance "editor1"</pre>
+ </li>
+ <li>
+ Replace all textareas with CKEditor.
+ <pre class="samples">editor.replaceAll empty</pre>
+ </li>
+ <li>
+ Create a textarea element and attach CKEditor to it.
+ <pre class="samples">editor.editor "editor1", initialValue</pre>
+ </li>
+ </ul>
+ </li>
+</ol>
+<p>Before step 3 you can use a number of methods and properties to adjust the behavior of this class and the CKEditor instances
+that will be created:</p>
+<ul class="samples">
+ <li>returnOutput : if set to true, the functions won't dump the code with response.write, but instead they will return it so
+ you can do anything you want</li>
+ <li>basePath: location of the CKEditor scripts</li>
+ <li>initialized: if you set it to true, it means that you have already included the CKEditor.js file into the page and it
+ doesn't have to be generated again.</li>
+ <li>textareaAttributes: You can set here a Dictionary object with the attributes that you want to output in the call to the "editor" method.</li>
+
+ <li>config: Allows to set config values for all the instances from now on.</li>
+ <li>instanceConfig: Allows to set config values just for the next instance.</li>
+
+ <li>addEventHandler: Adds an event handler for all the instances from now on.</li>
+ <li>addInstanceEventHandler: Adds an event handler just for the next instance.</li>
+ <li>addGlobalEventHandler: Adds an event handler for the global CKEDITOR object.</li>
+
+ <li>clearEventHandlers: Removes one or all the event handlers from all the instances from now on.</li>
+ <li>clearInstanceEventHandlers: Removes one or all the event handlers from the next instance.</li>
+ <li>clearGlobalEventHandlers: Removes one or all the event handlers from the global CKEDITOR object.</li>
+
+</ul>
+
+ <h2 class="samples">
+ Basic Samples
+ </h2>
+ <ul class="samples">
+ <li><a class="samples" href="replace.asp">Replace existing textareas by code</a></li>
+ <li><a class="samples" href="replaceall.asp">Replace all textareas by code</a></li>
+ <li><a class="samples" href="standalone.asp">Create instances in asp</a></li>
+ </ul>
+ <h2 class="samples">
+ Advanced Samples
+ </h2>
+ <ul class="samples">
+ <li><a class="samples" href="advanced.asp">Advanced example</a></li>
+ <li><a class="samples" href="events.asp">Listening to events</a></li>
+ </ul>
+ <div id="footer">
+ <hr />
+ <p>
+ CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
+ </p>
+ <p id="copy">
+ Copyright &copy; 2003-2012, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved.
+ </p>
+ </div>
+</body>
+</html>
View
72 public/javascript/ckeditor/_samples/asp/replace.asp
@@ -0,0 +1,72 @@
+<%@ codepage="65001" language="VBScript" %>
+<% Option Explicit %>
+<!-- #INCLUDE file="../../ckeditor.asp" -->
+<%
+
+ ' You must set "Enable Parent Paths" on your web site
+ ' in order for the above relative include to work.
+ ' Or you can use #INCLUDE VIRTUAL="/full path/ckeditor.asp"
+
+%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Sample - CKEditor</title>
+ <meta content="text/html; charset=utf-8" http-equiv="content-type"/>
+ <link href="../sample.css" rel="stylesheet" type="text/css"/>
+</head>
+<body>
+ <h1 class="samples">
+ CKEditor Sample
+ </h1>
+ <!-- This <div> holds alert messages to be display in the sample page. -->
+ <div id="alerts">
+ <noscript>
+ <p>
+ <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
+ support, like yours, you should still see the contents (HTML data) and you should
+ be able to edit it normally, without a rich editor interface.
+ </p>
+ </noscript>
+ </div>
+ <!-- This <fieldset> holds the HTML that you will usually find in your pages. -->
+ <fieldset title="Output">
+ <legend>Output</legend>
+ <form action="sample_posteddata.asp" method="post">
+ <p>
+ <label for="editor1">
+ Editor 1:</label><br/>
+ <textarea cols="80" id="editor1" name="editor1" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
+ </p>
+ <p>
+ <input type="submit" value="Submit"/>
+ </p>
+ </form>
+ </fieldset>
+ <div id="footer">
+ <hr />
+ <p>
+ CKEditor - The text editor for Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
+ </p>
+ <p id="copy">
+ Copyright &copy; 2003-2012, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
+ Knabben. All rights reserved.
+ </p>
+ </div>
+ <%
+ ' Create class instance.
+ dim editor
+ set editor = New CKEditor
+ ' Path to CKEditor directory, ideally instead of relative dir, use an absolute path:
+ ' editor.basePath = "/ckeditor/"
+ ' If not set, CKEditor will default to /ckeditor/
+ editor.basePath = "../../"
+ ' Replace textarea with id (or name) "editor1".
+ editor.replaceInstance "editor1"
+ %>
+</body>
+</html>
View
77 public/javascript/ckeditor/_samples/asp/replaceall.asp
@@ -0,0 +1,77 @@
+<%@ codepage="65001" language="VBScript" %>
+<% Option Explicit %>
+<!-- #INCLUDE file="../../ckeditor.asp" -->
+<%
+
+ ' You must set "Enable Parent Paths" on your web site
+ ' in order for the above relative include to work.
+ ' Or you can use #INCLUDE VIRTUAL="/full path/ckeditor.asp"
+
+%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Sample - CKEditor</title>
+ <meta content="text/html; charset=utf-8" http-equiv="content-type"/>
+ <link href="../sample.css" rel="stylesheet" type="text/css"/>
+</head>
+<body>
+ <h1 class="samples">
+ CKEditor Sample
+ </h1>
+ <!-- This <div> holds alert messages to be display in the sample page. -->
+ <div id="alerts">
+ <noscript>
+ <p>
+ <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
+ support, like yours, you should still see the contents (HTML data) and you should
+ be able to edit it normally, without a rich editor interface.
+ </p>
+ </noscript>
+ </div>
+ <!-- This <fieldset> holds the HTML that you will usually find in your pages. -->
+ <fieldset title="Output">
+ <legend>Output</legend>
+ <form action="sample_posteddata.asp" method="post">
+ <p>
+ <label for="editor1">
+ Editor 1:</label><br/>
+ <textarea cols="80" id="editor1" name="editor1" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
+ </p>
+ <p>
+ <label for="editor2">
+ Editor 2:</label><br/>
+ <textarea cols="80" id="editor2" name="editor2" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
+ </p>
+ <p>
+ <input type="submit" value="Submit"/>
+ </p>
+ </form>
+ </fieldset>
+ <div id="footer">
+ <hr />
+ <p>
+ CKEditor - The text editor for Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
+ </p>
+ <p id="copy">
+ Copyright &copy; 2003-2012, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
+ Knabben. All rights reserved.
+ </p>
+ </div>
+ <%
+ ' Create class instance.
+ dim editor
+ set editor = New CKEditor
+ ' Path to CKEditor directory, ideally instead of relative dir, use an absolute path:
+ ' editor.basePath = "/ckeditor/"
+ ' If not set, CKEditor will default to /ckeditor/
+ editor.basePath = "../../"
+ ' Replace all textareas with CKEditor.
+ editor.replaceAll empty
+ %>
+</body>
+</html>
View
46 public/javascript/ckeditor/_samples/asp/sample_posteddata.asp
@@ -0,0 +1,46 @@
+<%@ codepage="65001" language="VBScript" %>
+<% Option Explicit %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Sample - CKEditor</title>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ <link type="text/css" rel="stylesheet" href="../sample.css" />
+</head>
+<body>
+ <h1 class="samples">
+ CKEditor - Posted Data
+ </h1>
+ <table border="1" cellspacing="0" id="outputSample">
+ <colgroup><col width="100" /></colgroup>
+ <thead>
+ <tr>
+ <th>Field&nbsp;Name</th>
+ <th>Value</th>
+ </tr>
+ </thead>
+ <%
+ Dim sForm
+ For Each sForm in Request.Form
+ %>
+ <tr>
+ <th><%=Server.HTMLEncode( sForm )%></th>
+ <td><pre class="samples"><%=Server.HTMLEncode( Request.Form(sForm) )%></pre></td>
+ </tr>
+ <% Next %>
+ </table>
+ <div id="footer">
+ <hr />
+ <p>
+ CKEditor - The text editor for Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
+ </p>
+ <p id="copy">
+ Copyright &copy; 2003-2012, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved.
+ </p>
+ </div>
+</body>
+</html>
View
72 public/javascript/ckeditor/_samples/asp/standalone.asp
@@ -0,0 +1,72 @@
+<%@ codepage="65001" language="VBScript" %>
+<% Option Explicit %>
+<!-- #INCLUDE file="../../ckeditor.asp" -->
+<%
+
+ ' You must set "Enable Parent Paths" on your web site
+ ' in order for the above relative include to work.
+ ' Or you can use #INCLUDE VIRTUAL="/full path/ckeditor.asp"
+
+%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Sample - CKEditor</title>
+ <meta content="text/html; charset=utf-8" http-equiv="content-type"/>
+ <link href="../sample.css" rel="stylesheet" type="text/css"/>
+</head>
+<body>
+ <h1 class="samples">
+ CKEditor Sample
+ </h1>
+ <!-- This <div> holds alert messages to be display in the sample page. -->
+ <div id="alerts">
+ <noscript>
+ <p>
+ <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
+ support, like yours, you should still see the contents (HTML data) and you should
+ be able to edit it normally, without a rich editor interface.
+ </p>
+ </noscript>
+ </div>
+ <!-- This <fieldset> holds the HTML that you will usually find in your pages. -->
+ <fieldset title="Output">
+ <legend>Output</legend>
+ <form action="sample_posteddata.asp" method="post">
+ <p>
+ Editor 1:
+ </p>
+ <p>
+ <%
+ dim initialValue, editor
+ ' The initial value to be displayed in the editor.
+ initialValue = "<p>This is some <strong>sample text</strong>.</p>"
+ ' Create class instance.
+ set editor = New CKEditor
+ ' Path to CKEditor directory, ideally instead of relative dir, use an absolute path:
+ ' editor.basePath = "/ckeditor/"
+ ' If not set, CKEditor will default to /ckeditor/
+ editor.basePath = "../../"
+ ' Create textarea element and attach CKEditor to it.
+ editor.editor "editor1", initialValue
+ %>
+ <input type="submit" value="Submit"/>
+ </p>
+ </form>
+ </fieldset>
+ <div id="footer">
+ <hr />
+ <p>
+ CKEditor - The text editor for Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
+ </p>
+ <p id="copy">
+ Copyright &copy; 2003-2012, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
+ Knabben. All rights reserved.
+ </p>
+ </div>
+</body>
+</html>
View
59 public/javascript/ckeditor/_samples/assets/_posteddata.php
@@ -0,0 +1,59 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<?php
+/*
+Copyright (c) 2003-2012, 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 &mdash; CKEditor</title>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ <link type="text/css" rel="stylesheet" href="sample.css" />
+</head>
+<body>
+ <h1 class="samples">
+ CKEditor &mdash; Posted Data
+ </h1>
+ <table border="1" cellspacing="0" id="outputSample">
+ <colgroup><col width="100" /></colgroup>
+ <thead>
+ <tr>
+ <th>Field&nbsp;Name</th>
+ <th>Value</th>
+ </tr>
+ </thead>
+<?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 htmlspecialchars($sForm); ?></th>
+ <td><pre class="samples"><?php echo $postedValue?></pre></td>
+ </tr>
+ <?php
+}
+?>
+ </table>
+ <div id="footer">
+ <hr />
+ <p>
+ CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
+ </p>
+ <p id="copy">
+ Copyright &copy; 2003-2012, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved.
+ </p>
+ </div>
+</body>
+</html>
View
BIN  public/javascript/ckeditor/_samples/assets/output_for_flash.fla
Binary file not shown
View
BIN  public/javascript/ckeditor/_samples/assets/output_for_flash.swf
Binary file not shown
View
2  public/javascript/ckeditor/_samples/assets/output_xhtml.css 100644 → 100755
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
+ * Copyright (c) 2003-2012, 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).
View
70 public/javascript/ckeditor/_samples/assets/parsesample.css
@@ -0,0 +1,70 @@
+body
+{
+ font-family: Arial, Verdana, sans-serif;
+ font-size: 12px;
+ color: #222;
+ background-color: #fff;
+}
+
+/* preserved spaces for rtl list item bullets. (#6249)*/
+ol,ul,dl
+{
+ padding-right:40px;
+}
+
+h1,h2,h3,h4
+{
+ font-family: Georgia, Times, serif;
+}
+
+h1.lightBlue
+{
+ color: #00A6C7;
+ font-size: 1.8em;
+ font-weight:normal;
+}
+
+h3.green
+{
+ color: #739E39;
+ font-weight:normal;
+}
+
+span.markYellow { background-color: yellow; }
+span.markGreen { background-color: lime; }
+
+img.left
+{
+ padding: 5px;
+ margin-right: 5px;
+ float:left;
+ border:2px solid #DDD;
+}
+
+img.right
+{
+ padding: 5px;
+ margin-right: 5px;
+ float:right;
+ border:2px solid #DDD;
+}
+
+a.green
+{
+ color:#739E39;
+}
+
+table.grey
+{
+ background-color : #F5F5F5;
+}
+
+table.grey th
+{
+ background-color : #DDD;
+}
+
+ul.square
+{
+ list-style-type : square;
+}
View
18 public/javascript/ckeditor/_samples/assets/swfobject.js
@@ -0,0 +1,18 @@
+/**
+ * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
+ *
+ * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ */
+/*
+Copyright (c) 2007 Geoff Stearns
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+/*jsl:ignoreall*/
+if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;
View
108 public/javascript/ckeditor/_samples/autogrow.html
@@ -0,0 +1,108 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+Copyright (c) 2003-2012, 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 &mdash; 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 class="samples">
+ CKEditor Sample &mdash; Using AutoGrow Plugin
+ </h1>
+ <div class="description">
+ <p>
+ This sample shows how to configure CKEditor instances to use the
+ <strong>AutoGrow</strong> (<code>autogrow</code>) plugin that lets the editor window expand
+ and shrink depending on the amount and size of content entered in the editing area.
+ </p>
+ <p>
+ In its default implementation the <strong>AutoGrow feature</strong> can expand the
+ CKEditor window infinitely in order to avoid introducing scrollbars to the editing area.
+ </p>
+ <p>
+ It is also possible to set a maximum height for the editor window. Once CKEditor
+ editing area reaches the value in pixels specified in the <code>
+ <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.autoGrow_maxHeight">autoGrow_maxHeight</a>
+ </code> configuration setting, scrollbars will be added and the editor window will no longer expand.
+ </p>
+ <p>
+ To add a CKEditor instance using the <code>autogrow</code> plugin and its
+ <code>autoGrow_maxHeight</code> attribute, insert the following JavaScript call to your code:
+ </p>
+ <pre class="samples">CKEDITOR.replace( '<em>textarea_id</em>',
+ {
+ <strong>extraPlugins : 'autogrow',</strong>
+ autoGrow_maxHeight : 800,
+ // Remove the Resize plugin as it does not make sense to use it in conjunction with the AutoGrow plugin.
+ removePlugins : 'resize'
+ });</pre>
+ <p>
+ Note that <code><em>textarea_id</em></code> in the code above is the <code>id</code> attribute of
+ the <code>&lt;textarea&gt;</code> element to be replaced with CKEditor. The maximum height should
+ be given in pixels.
+ </p>
+ </div>
+ <!-- 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">
+ CKEditor using the <code>autogrow</code> plugin with its default configuration:</label>
+ <textarea cols="80" id="editor1" name="editor1" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
+ <script type="text/javascript">
+ //<![CDATA[
+
+ CKEDITOR.replace( 'editor1', {
+ extraPlugins : 'autogrow',
+ removePlugins : 'resize'
+ });
+
+ //]]>
+ </script>
+ </p>
+ <p>
+ <label for="editor2">
+ CKEditor using the <code>autogrow</code> plugin with maximum height set to 400 pixels:</label>
+ <textarea cols="80" id="editor2" name="editor2" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
+ <script type="text/javascript">
+ //<![CDATA[
+
+ CKEDITOR.replace( 'editor2', {
+ extraPlugins : 'autogrow',
+ autoGrow_maxHeight : 400,
+ removePlugins : 'resize'
+ });
+
+ //]]>
+ </script>
+ </p>
+ <p>
+ <input type="submit" value="Submit" />
+ </p>
+ </form>
+ <div id="footer">
+ <hr />
+ <p>
+ CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
+ </p>
+ <p id="copy">
+ Copyright &copy; 2003-2012, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
+ Knabben. All rights reserved.
+ </p>
+ </div>
+</body>
+</html>
View
125 public/javascript/ckeditor/_samples/bbcode.html
@@ -0,0 +1,125 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+Copyright (c) 2003-2012, 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>BBCode Plugin &mdash; 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 class="samples">
+ CKEditor Sample &mdash; BBCode Plugin
+ </h1>
+ <div class="description">
+ <p>
+ This sample shows how to configure CKEditor to output <a href="http://en.wikipedia.org/wiki/BBCode">BBCode</a> format instead of HTML.
+ Please note that the editor configuration was modified to reflect what is needed in a BBCode editing environment.
+ Smiley images, for example, were stripped to the emoticons that are commonly used in some BBCode dialects.
+ </p>
+ <p>
+ Please note that currently there is no standard for the BBCode markup language, so its implementation
+ for different platforms (message boards, blogs etc.) can vary. This means that before using CKEditor to
+ output BBCode you may need to adjust the implementation to your own environment.
+ </p>
+ <p>
+ A snippet of the configuration code can be seen below; check the source of this page for
+ a full definition:
+ </p>
+ <pre class="samples">
+CKEDITOR.replace( 'editor1',
+ {
+ <strong>extraPlugins : 'bbcode',</strong>
+ toolbar :
+ [
+ ['Source', '-', 'Save','NewPage','-','Undo','Redo'],
+ ['Find','Replace','-','SelectAll','RemoveFormat'],
+ ['Link', 'Unlink', 'Image'],
+ '/',
+ ['FontSize', 'Bold', 'Italic','Underline'],
+ ['NumberedList','BulletedList','-','Blockquote'],
+ ['TextColor', '-', 'Smiley','SpecialChar', '-', 'Maximize']
+ ],
+ ... <i>some other configurations omitted here</i>
+ }); </pre>
+ </div>
+
+ <!-- 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>
+ <textarea cols="80" id="editor1" name="editor1" rows="10">This is some [b]sample text[/b]. You are using [url=http://ckeditor.com/]CKEditor[/url].</textarea>
+ <script type="text/javascript">
+ //<![CDATA[
+
+ // Replace the <textarea id="editor"> with an CKEditor
+ // instance, using the "bbcode" plugin, shaping some of the
+ // editor configuration to fit BBCode environment.
+ CKEDITOR.replace( 'editor1',
+ {
+ extraPlugins : 'bbcode',
+ // Remove unused plugins.
+ removePlugins : 'bidi,button,dialogadvtab,div,filebrowser,flash,format,forms,horizontalrule,iframe,indent,justify,liststyle,pagebreak,showborders,stylescombo,table,tabletools,templates',
+ // Width and height are not supported in the BBCode format, so object resizing is disabled.
+ disableObjectResizing : true,
+ // Define font sizes in percent values.
+ fontSize_sizes : "30/30%;50/50%;100/100%;120/120%;150/150%;200/200%;300/300%",
+ toolbar :
+ [
+ ['Source', '-', 'Save','NewPage','-','Undo','Redo'],
+ ['Find','Replace','-','SelectAll','RemoveFormat'],
+ ['Link', 'Unlink', 'Image', 'Smiley','SpecialChar'],
+ '/',
+ ['Bold', 'Italic','Underline'],
+ ['FontSize'],
+ ['TextColor'],
+ ['NumberedList','BulletedList','-','Blockquote'],
+ ['Maximize']
+ ],
+ // Strip CKEditor smileys to those commonly used in BBCode.
+ smiley_images :
+ [
+ 'regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','tounge_smile.gif',
+ 'embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angel_smile.gif','shades_smile.gif',
+ 'cry_smile.gif','kiss.gif'
+ ],
+ smiley_descriptions :
+ [
+ 'smiley', 'sad', 'wink', 'laugh', 'cheeky', 'blush', 'surprise',
+ 'indecision', 'angel', 'cool', 'crying', 'kiss'
+ ]
+ } );
+
+ //]]>
+ </script>
+ </p>
+ <p>
+ <input type="submit" value="Submit" />
+ </p>
+ </form>
+ <div id="footer">
+ <hr />
+ <p>
+ CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
+ </p>
+ <p id="copy">
+ Copyright &copy; 2003-2012, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
+ Knabben. All rights reserved.
+ </p>
+ </div>
+</body>
+</html>
View
94 public/javascript/ckeditor/_samples/devtools.html
@@ -0,0 +1,94 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+Copyright (c) 2003-2012, 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 DevTools Plugin &mdash; 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 class="samples">
+ CKEditor Sample &mdash; Using the Developer Tools Plugin
+ </h1>
+ <div class="description">
+ <p>
+ This sample shows how to configure CKEditor instances to use the
+ <strong>Developer Tools</strong> (<code>devtools</code>) plugin that displays
+ information about dialog window elements, including the name of the dialog window,
+ tab, and UI element. Please note that the tooltip also contains a link to the
+ <a href="http://docs.cksource.com/ckeditor_api/">CKEditor JavaScript API</a>
+ documentation for each of the selected elements.
+ </p>
+ <p>
+ This plugin is aimed at developers who would like to customize their CKEditor
+ instances and create their own plugins. By default it is turned off; it is
+ usually useful to only turn it on in the development phase. Note that it works with
+ all CKEditor dialog windows, including the ones that were created by custom plugins.
+ </p>
+ <p>
+ To add a CKEditor instance using the <strong>devtools</strong> plugin, insert
+ the following JavaScript call into your code:
+ </p>
+ <pre class="samples">CKEDITOR.replace( '<em>textarea_id</em>',
+ {
+ <strong>extraPlugins : 'devtools'</strong>
+ });</pre>
+ <p>
+ Note that <code><em>textarea_id</em></code> in the code above is the <code>id</code> attribute of
+ the <code>&lt;textarea&gt;</code> element to be replaced with CKEditor.
+ </p>
+ </div>
+
+ <!-- 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>
+ <textarea cols="80" id="editor1" name="editor1" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
+ <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' ,
+ {
+ extraPlugins : 'devtools'
+ });
+
+ //]]>
+ </script>
+ </p>
+ <p>
+ <input type="submit" value="Submit" />
+ </p>
+ </form>
+ <div id="footer">
+ <hr />
+ <p>
+ CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
+ </p>
+ <p id="copy">
+ Copyright &copy; 2003-2012, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
+ Knabben. All rights reserved.
+ </p>
+ </div>
+</body>
+</html>
View
37 public/javascript/ckeditor/_samples/divreplace.html 100644 → 100755
@@ -1,11 +1,11 @@
<!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.
+Copyright (c) 2003-2012, 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>
+ <title>Replace DIV &mdash; 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>
@@ -48,10 +48,15 @@
var element = ev.target || ev.srcElement;
// Find out the div that holds this element.
- element = element.parentNode;
+ var name;
+ do
+ {
+ element = element.parentNode;
+ }
+ while ( element && ( name = element.nodeName.toLowerCase() ) && ( name != 'div' || element.className.indexOf( 'editable' ) == -1 ) && name != 'body' )
- if ( element.nodeName.toLowerCase() == 'div'
- && ( element.className.indexOf( 'editable' ) != -1 ) )
+
+ if ( name == 'div' && element.className.indexOf( 'editable' ) != -1 )
replaceDiv( element );
}
@@ -70,9 +75,20 @@
</head>
<body>
- <h1>
- CKEditor Sample
+ <h1 class="samples">
+ CKEditor Sample &mdash; Replace DIV with CKEditor on the Fly
</h1>
+ <div class="description">
+ <p>
+ This sample shows how to automatically replace <code>&lt;div&gt;</code> elements
+ with a CKEditor instance on the fly, following user's doubleclick. The content
+ that was previously placed inside the <code>&lt;div&gt;</code> element will now
+ be moved into CKEditor editing area.
+ </p>
+ <p>
+ For details on how to create this setup check the source code of this sample page.
+ </p>
+ </div>
<!-- This <div> holds alert messages to be display in the sample page. -->
<div id="alerts">
<noscript>
@@ -84,7 +100,8 @@
</noscript>
</div>
<p>
- Double-click on any of the following DIVs to transform them into editor instances.</p>
+ Double-click any of the following <code>&lt;div&gt;</code> elements to transform them into
+ editor instances.</p>
<div class="editable">
<h3>
Part 1</h3>
@@ -126,10 +143,10 @@
<div id="footer">
<hr />
<p>
- CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
+ CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
</p>
<p id="copy">
- Copyright &copy; 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
+ Copyright &copy; 2003-2012, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
Knabben. All rights reserved.
</p>
</div>
View
51 public/javascript/ckeditor/_samples/enterkey.html 100644 → 100755
@@ -1,11 +1,11 @@
<!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.
+Copyright (c) 2003-2012, 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>
+ <title>ENTER Key Configuration &mdash; 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