ckeditor 4.0.6 → 4.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +54 -6
- data/app/assets/javascripts/ckeditor/config.js +10 -10
- data/app/assets/javascripts/ckeditor/filebrowser/javascripts/{application.js → application.js.erb} +1 -2
- data/app/assets/javascripts/ckeditor/filebrowser/stylesheets/{uploader.css → uploader.css.erb} +2 -2
- data/app/assets/javascripts/ckeditor/init.js.erb +2 -2
- data/app/assets/javascripts/ckeditor/override.js.erb +21 -0
- data/app/controllers/ckeditor/application_controller.rb +2 -1
- data/app/controllers/ckeditor/attachment_files_controller.rb +4 -4
- data/app/controllers/ckeditor/pictures_controller.rb +4 -4
- data/app/views/ckeditor/shared/_asset.html.erb +1 -1
- data/app/views/ckeditor/shared/_asset_tmpl.html.erb +2 -2
- data/app/views/layouts/ckeditor/application.html.erb +0 -1
- data/lib/ckeditor.rb +49 -7
- data/lib/ckeditor/utils.rb +1 -1
- data/lib/ckeditor/version.rb +2 -2
- data/lib/generators/ckeditor/templates/ckeditor.rb +4 -0
- data/test/ckeditor_test.rb +53 -0
- data/test/support/helpers.rb +2 -2
- data/vendor/assets/javascripts/ckeditor/CHANGES.md +259 -102
- data/vendor/assets/javascripts/ckeditor/build-config.js +3 -2
- data/vendor/assets/javascripts/ckeditor/ckeditor.js +778 -732
- data/vendor/assets/javascripts/ckeditor/contents.css +20 -17
- data/vendor/assets/javascripts/ckeditor/lang/af.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ar.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/bg.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/bn.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/bs.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ca.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/cs.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/cy.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/da.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/de.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/el.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/en-au.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/en-ca.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/en-gb.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/en.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/eo.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/es.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/et.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/eu.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/fa.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/fi.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/fo.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/fr-ca.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/fr.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/gl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/gu.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/he.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/hi.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/hr.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/hu.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/id.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/is.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/it.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ja.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ka.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/km.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ko.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ku.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/lt.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/lv.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/mk.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/mn.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ms.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/nb.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/nl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/no.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/pl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/pt-br.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/pt.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ro.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ru.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/si.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/sk.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/sl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/sq.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/sr-latn.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/sr.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/sv.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/th.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/tr.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ug.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/uk.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/vi.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/zh-cn.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/zh.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +6 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +3 -4
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +6 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +4 -4
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/icons_hidpi.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +21 -21
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +7 -6
- data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +20 -20
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/envelope.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/envelope.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/heart.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/heart.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/kiss.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/kiss.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ar.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/el.js +9 -9
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/et.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/he.js +8 -9
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/id.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ja.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/km.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt.js +4 -4
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sq.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ug.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/uk.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/vi.js +11 -10
- data/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmp.html +5 -18
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +62 -62
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_opera.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/icons_hidpi.png +0 -0
- metadata +28 -41
- data/vendor/assets/javascripts/ckeditor/samples/ajax.html +0 -82
- data/vendor/assets/javascripts/ckeditor/samples/api.html +0 -207
- data/vendor/assets/javascripts/ckeditor/samples/appendto.html +0 -57
- data/vendor/assets/javascripts/ckeditor/samples/assets/inlineall/logo.png +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/assets/outputxhtml/outputxhtml.css +0 -204
- data/vendor/assets/javascripts/ckeditor/samples/assets/posteddata.php +0 -59
- data/vendor/assets/javascripts/ckeditor/samples/assets/sample.css +0 -3
- data/vendor/assets/javascripts/ckeditor/samples/assets/sample.jpg +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/assets/uilanguages/languages.js +0 -7
- data/vendor/assets/javascripts/ckeditor/samples/datafiltering.html +0 -401
- data/vendor/assets/javascripts/ckeditor/samples/divreplace.html +0 -141
- data/vendor/assets/javascripts/ckeditor/samples/index.html +0 -128
- data/vendor/assets/javascripts/ckeditor/samples/inlineall.html +0 -311
- data/vendor/assets/javascripts/ckeditor/samples/inlinebycode.html +0 -121
- data/vendor/assets/javascripts/ckeditor/samples/inlinetextarea.html +0 -110
- data/vendor/assets/javascripts/ckeditor/samples/jquery.html +0 -97
- data/vendor/assets/javascripts/ckeditor/samples/plugins/dialog/assets/my_dialog.js +0 -48
- data/vendor/assets/javascripts/ckeditor/samples/plugins/dialog/dialog.html +0 -187
- data/vendor/assets/javascripts/ckeditor/samples/plugins/enterkey/enterkey.html +0 -103
- data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.fla +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.swf +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/swfobject.js +0 -18
- data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/outputforflash.html +0 -280
- data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/outputhtml.html +0 -221
- data/vendor/assets/javascripts/ckeditor/samples/plugins/magicline/magicline.html +0 -207
- data/vendor/assets/javascripts/ckeditor/samples/plugins/toolbar/toolbar.html +0 -232
- data/vendor/assets/javascripts/ckeditor/samples/plugins/wysiwygarea/fullpage.html +0 -77
- data/vendor/assets/javascripts/ckeditor/samples/readonly.html +0 -73
- data/vendor/assets/javascripts/ckeditor/samples/replacebyclass.html +0 -57
- data/vendor/assets/javascripts/ckeditor/samples/replacebycode.html +0 -56
- data/vendor/assets/javascripts/ckeditor/samples/sample.css +0 -339
- data/vendor/assets/javascripts/ckeditor/samples/sample.js +0 -33
- data/vendor/assets/javascripts/ckeditor/samples/sample_posteddata.php +0 -16
- data/vendor/assets/javascripts/ckeditor/samples/tabindex.html +0 -75
- data/vendor/assets/javascripts/ckeditor/samples/uicolor.html +0 -69
- data/vendor/assets/javascripts/ckeditor/samples/uilanguages.html +0 -119
- data/vendor/assets/javascripts/ckeditor/samples/xhtmlstyle.html +0 -231
@@ -1,82 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<!--
|
3
|
-
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
4
|
-
For licensing, see LICENSE.md or http://ckeditor.com/license
|
5
|
-
-->
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>Ajax — CKEditor Sample</title>
|
9
|
-
<meta charset="utf-8">
|
10
|
-
<script src="../ckeditor.js"></script>
|
11
|
-
<link rel="stylesheet" href="sample.css">
|
12
|
-
<script>
|
13
|
-
|
14
|
-
var editor, html = '';
|
15
|
-
|
16
|
-
function createEditor() {
|
17
|
-
if ( editor )
|
18
|
-
return;
|
19
|
-
|
20
|
-
// Create a new editor inside the <div id="editor">, setting its value to html
|
21
|
-
var config = {};
|
22
|
-
editor = CKEDITOR.appendTo( 'editor', config, html );
|
23
|
-
}
|
24
|
-
|
25
|
-
function removeEditor() {
|
26
|
-
if ( !editor )
|
27
|
-
return;
|
28
|
-
|
29
|
-
// Retrieve the editor contents. In an Ajax application, this data would be
|
30
|
-
// sent to the server or used in any other way.
|
31
|
-
document.getElementById( 'editorcontents' ).innerHTML = html = editor.getData();
|
32
|
-
document.getElementById( 'contents' ).style.display = '';
|
33
|
-
|
34
|
-
// Destroy the editor.
|
35
|
-
editor.destroy();
|
36
|
-
editor = null;
|
37
|
-
}
|
38
|
-
|
39
|
-
</script>
|
40
|
-
</head>
|
41
|
-
<body>
|
42
|
-
<h1 class="samples">
|
43
|
-
<a href="index.html">CKEditor Samples</a> » Create and Destroy Editor Instances for Ajax Applications
|
44
|
-
</h1>
|
45
|
-
<div class="description">
|
46
|
-
<p>
|
47
|
-
This sample shows how to create and destroy CKEditor instances on the fly. After the removal of CKEditor the content created inside the editing
|
48
|
-
area will be displayed in a <code><div></code> element.
|
49
|
-
</p>
|
50
|
-
<p>
|
51
|
-
For details of how to create this setup check the source code of this sample page
|
52
|
-
for JavaScript code responsible for the creation and destruction of a CKEditor instance.
|
53
|
-
</p>
|
54
|
-
</div>
|
55
|
-
<p>Click the buttons to create and remove a CKEditor instance.</p>
|
56
|
-
<p>
|
57
|
-
<input onclick="createEditor();" type="button" value="Create Editor">
|
58
|
-
<input onclick="removeEditor();" type="button" value="Remove Editor">
|
59
|
-
</p>
|
60
|
-
<!-- This div will hold the editor. -->
|
61
|
-
<div id="editor">
|
62
|
-
</div>
|
63
|
-
<div id="contents" style="display: none">
|
64
|
-
<p>
|
65
|
-
Edited Contents:
|
66
|
-
</p>
|
67
|
-
<!-- This div will be used to display the editor contents. -->
|
68
|
-
<div id="editorcontents">
|
69
|
-
</div>
|
70
|
-
</div>
|
71
|
-
<div id="footer">
|
72
|
-
<hr>
|
73
|
-
<p>
|
74
|
-
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
75
|
-
</p>
|
76
|
-
<p id="copy">
|
77
|
-
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
78
|
-
Knabben. All rights reserved.
|
79
|
-
</p>
|
80
|
-
</div>
|
81
|
-
</body>
|
82
|
-
</html>
|
@@ -1,207 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<!--
|
3
|
-
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
4
|
-
For licensing, see LICENSE.md or http://ckeditor.com/license
|
5
|
-
-->
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<meta charset="utf-8">
|
9
|
-
<title>API Usage — CKEditor Sample</title>
|
10
|
-
<script src="../ckeditor.js"></script>
|
11
|
-
<link href="sample.css" rel="stylesheet">
|
12
|
-
<script>
|
13
|
-
|
14
|
-
// The instanceReady event is fired, when an instance of CKEditor has finished
|
15
|
-
// its initialization.
|
16
|
-
CKEDITOR.on( 'instanceReady', function( ev ) {
|
17
|
-
// Show the editor name and description in the browser status bar.
|
18
|
-
document.getElementById( 'eMessage' ).innerHTML = 'Instance <code>' + ev.editor.name + '<\/code> loaded.';
|
19
|
-
|
20
|
-
// Show this sample buttons.
|
21
|
-
document.getElementById( 'eButtons' ).style.display = 'block';
|
22
|
-
});
|
23
|
-
|
24
|
-
function InsertHTML() {
|
25
|
-
// Get the editor instance that we want to interact with.
|
26
|
-
var editor = CKEDITOR.instances.editor1;
|
27
|
-
var value = document.getElementById( 'htmlArea' ).value;
|
28
|
-
|
29
|
-
// Check the active editing mode.
|
30
|
-
if ( editor.mode == 'wysiwyg' )
|
31
|
-
{
|
32
|
-
// Insert HTML code.
|
33
|
-
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertHtml
|
34
|
-
editor.insertHtml( value );
|
35
|
-
}
|
36
|
-
else
|
37
|
-
alert( 'You must be in WYSIWYG mode!' );
|
38
|
-
}
|
39
|
-
|
40
|
-
function InsertText() {
|
41
|
-
// Get the editor instance that we want to interact with.
|
42
|
-
var editor = CKEDITOR.instances.editor1;
|
43
|
-
var value = document.getElementById( 'txtArea' ).value;
|
44
|
-
|
45
|
-
// Check the active editing mode.
|
46
|
-
if ( editor.mode == 'wysiwyg' )
|
47
|
-
{
|
48
|
-
// Insert as plain text.
|
49
|
-
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertText
|
50
|
-
editor.insertText( value );
|
51
|
-
}
|
52
|
-
else
|
53
|
-
alert( 'You must be in WYSIWYG mode!' );
|
54
|
-
}
|
55
|
-
|
56
|
-
function SetContents() {
|
57
|
-
// Get the editor instance that we want to interact with.
|
58
|
-
var editor = CKEDITOR.instances.editor1;
|
59
|
-
var value = document.getElementById( 'htmlArea' ).value;
|
60
|
-
|
61
|
-
// Set editor contents (replace current contents).
|
62
|
-
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setData
|
63
|
-
editor.setData( value );
|
64
|
-
}
|
65
|
-
|
66
|
-
function GetContents() {
|
67
|
-
// Get the editor instance that you want to interact with.
|
68
|
-
var editor = CKEDITOR.instances.editor1;
|
69
|
-
|
70
|
-
// Get editor contents
|
71
|
-
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-getData
|
72
|
-
alert( editor.getData() );
|
73
|
-
}
|
74
|
-
|
75
|
-
function ExecuteCommand( commandName ) {
|
76
|
-
// Get the editor instance that we want to interact with.
|
77
|
-
var editor = CKEDITOR.instances.editor1;
|
78
|
-
|
79
|
-
// Check the active editing mode.
|
80
|
-
if ( editor.mode == 'wysiwyg' )
|
81
|
-
{
|
82
|
-
// Execute the command.
|
83
|
-
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-execCommand
|
84
|
-
editor.execCommand( commandName );
|
85
|
-
}
|
86
|
-
else
|
87
|
-
alert( 'You must be in WYSIWYG mode!' );
|
88
|
-
}
|
89
|
-
|
90
|
-
function CheckDirty() {
|
91
|
-
// Get the editor instance that we want to interact with.
|
92
|
-
var editor = CKEDITOR.instances.editor1;
|
93
|
-
// Checks whether the current editor contents present changes when compared
|
94
|
-
// to the contents loaded into the editor at startup
|
95
|
-
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-checkDirty
|
96
|
-
alert( editor.checkDirty() );
|
97
|
-
}
|
98
|
-
|
99
|
-
function ResetDirty() {
|
100
|
-
// Get the editor instance that we want to interact with.
|
101
|
-
var editor = CKEDITOR.instances.editor1;
|
102
|
-
// Resets the "dirty state" of the editor (see CheckDirty())
|
103
|
-
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-resetDirty
|
104
|
-
editor.resetDirty();
|
105
|
-
alert( 'The "IsDirty" status has been reset' );
|
106
|
-
}
|
107
|
-
|
108
|
-
function Focus() {
|
109
|
-
CKEDITOR.instances.editor1.focus();
|
110
|
-
}
|
111
|
-
|
112
|
-
function onFocus() {
|
113
|
-
document.getElementById( 'eMessage' ).innerHTML = '<b>' + this.name + ' is focused </b>';
|
114
|
-
}
|
115
|
-
|
116
|
-
function onBlur() {
|
117
|
-
document.getElementById( 'eMessage' ).innerHTML = this.name + ' lost focus';
|
118
|
-
}
|
119
|
-
|
120
|
-
</script>
|
121
|
-
|
122
|
-
</head>
|
123
|
-
<body>
|
124
|
-
<h1 class="samples">
|
125
|
-
<a href="index.html">CKEditor Samples</a> » Using CKEditor JavaScript API
|
126
|
-
</h1>
|
127
|
-
<div class="description">
|
128
|
-
<p>
|
129
|
-
This sample shows how to use the
|
130
|
-
<a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.editor">CKEditor JavaScript API</a>
|
131
|
-
to interact with the editor at runtime.
|
132
|
-
</p>
|
133
|
-
<p>
|
134
|
-
For details on how to create this setup check the source code of this sample page.
|
135
|
-
</p>
|
136
|
-
</div>
|
137
|
-
|
138
|
-
<!-- This <div> holds alert messages to be display in the sample page. -->
|
139
|
-
<div id="alerts">
|
140
|
-
<noscript>
|
141
|
-
<p>
|
142
|
-
<strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
|
143
|
-
support, like yours, you should still see the contents (HTML data) and you should
|
144
|
-
be able to edit it normally, without a rich editor interface.
|
145
|
-
</p>
|
146
|
-
</noscript>
|
147
|
-
</div>
|
148
|
-
<form action="../../../samples/sample_posteddata.php" method="post">
|
149
|
-
<textarea cols="100" 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>
|
150
|
-
|
151
|
-
<script>
|
152
|
-
// Replace the <textarea id="editor1"> with an CKEditor instance.
|
153
|
-
CKEDITOR.replace( 'editor1', {
|
154
|
-
on: {
|
155
|
-
focus: onFocus,
|
156
|
-
blur: onBlur,
|
157
|
-
|
158
|
-
// Check for availability of corresponding plugins.
|
159
|
-
pluginsLoaded: function( evt ) {
|
160
|
-
var doc = CKEDITOR.document, ed = evt.editor;
|
161
|
-
if ( !ed.getCommand( 'bold' ) )
|
162
|
-
doc.getById( 'exec-bold' ).hide();
|
163
|
-
if ( !ed.getCommand( 'link' ) )
|
164
|
-
doc.getById( 'exec-link' ).hide();
|
165
|
-
}
|
166
|
-
}
|
167
|
-
});
|
168
|
-
</script>
|
169
|
-
|
170
|
-
<p id="eMessage">
|
171
|
-
</p>
|
172
|
-
|
173
|
-
<div id="eButtons" style="display: none">
|
174
|
-
<input id="exec-bold" onclick="ExecuteCommand('bold');" type="button" value="Execute "bold" Command">
|
175
|
-
<input id="exec-link" onclick="ExecuteCommand('link');" type="button" value="Execute "link" Command">
|
176
|
-
<input onclick="Focus();" type="button" value="Focus">
|
177
|
-
<br><br>
|
178
|
-
<input onclick="InsertHTML();" type="button" value="Insert HTML">
|
179
|
-
<input onclick="SetContents();" type="button" value="Set Editor Contents">
|
180
|
-
<input onclick="GetContents();" type="button" value="Get Editor Contents (XHTML)">
|
181
|
-
<br>
|
182
|
-
<textarea cols="100" id="htmlArea" rows="3"><h2>Test</h2><p>This is some <a href="/Test1.html">sample</a> HTML code.</p></textarea>
|
183
|
-
<br>
|
184
|
-
<br>
|
185
|
-
<input onclick="InsertText();" type="button" value="Insert Text">
|
186
|
-
<br>
|
187
|
-
<textarea cols="100" id="txtArea" rows="3"> First line with some leading whitespaces.
|
188
|
-
|
189
|
-
Second line of text preceded by two line breaks.</textarea>
|
190
|
-
<br>
|
191
|
-
<br>
|
192
|
-
<input onclick="CheckDirty();" type="button" value="checkDirty()">
|
193
|
-
<input onclick="ResetDirty();" type="button" value="resetDirty()">
|
194
|
-
</div>
|
195
|
-
</form>
|
196
|
-
<div id="footer">
|
197
|
-
<hr>
|
198
|
-
<p>
|
199
|
-
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
200
|
-
</p>
|
201
|
-
<p id="copy">
|
202
|
-
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
203
|
-
Knabben. All rights reserved.
|
204
|
-
</p>
|
205
|
-
</div>
|
206
|
-
</body>
|
207
|
-
</html>
|
@@ -1,57 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<!--
|
3
|
-
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
4
|
-
For licensing, see LICENSE.md or http://ckeditor.com/license
|
5
|
-
-->
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>CKEDITOR.appendTo — CKEditor Sample</title>
|
9
|
-
<meta charset="utf-8">
|
10
|
-
<script src="../ckeditor.js"></script>
|
11
|
-
<link rel="stylesheet" href="sample.css">
|
12
|
-
</head>
|
13
|
-
<body>
|
14
|
-
<h1 class="samples">
|
15
|
-
<a href="index.html">CKEditor Samples</a> » Append To Page Element Using JavaScript Code
|
16
|
-
</h1>
|
17
|
-
<div id="section1">
|
18
|
-
<div class="description">
|
19
|
-
<p>
|
20
|
-
<code>CKEDITOR.appendTo</code> is basically to place editors
|
21
|
-
inside existing DOM elements. Unlike <code>CKEDITOR.replace</code>,
|
22
|
-
a target container to be replaced is no longer necessary. A new editor
|
23
|
-
instance is inserted directly wherever it is desired.
|
24
|
-
</p>
|
25
|
-
<pre class="samples">CKEDITOR.appendTo( '<em>container_id</em>',
|
26
|
-
{ /* Configuration options to be used. */ }
|
27
|
-
'Editor content to be used.'
|
28
|
-
);</pre>
|
29
|
-
</div>
|
30
|
-
<script>
|
31
|
-
|
32
|
-
// This call can be placed at any point after the
|
33
|
-
// <textarea>, or inside a <head><script> in a
|
34
|
-
// window.onload event handler.
|
35
|
-
|
36
|
-
// Replace the <textarea id="editor"> with an CKEditor
|
37
|
-
// instance, using default configurations.
|
38
|
-
CKEDITOR.appendTo( 'section1',
|
39
|
-
null,
|
40
|
-
'<p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>'
|
41
|
-
);
|
42
|
-
|
43
|
-
</script>
|
44
|
-
</div>
|
45
|
-
<br>
|
46
|
-
<div id="footer">
|
47
|
-
<hr>
|
48
|
-
<p>
|
49
|
-
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
50
|
-
</p>
|
51
|
-
<p id="copy">
|
52
|
-
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
53
|
-
Knabben. All rights reserved.
|
54
|
-
</p>
|
55
|
-
</div>
|
56
|
-
</body>
|
57
|
-
</html>
|
Binary file
|
@@ -1,204 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
3
|
-
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
4
|
-
*
|
5
|
-
* Styles used by the XHTML 1.1 sample page (xhtml.html).
|
6
|
-
*/
|
7
|
-
|
8
|
-
/**
|
9
|
-
* Basic definitions for the editing area.
|
10
|
-
*/
|
11
|
-
body
|
12
|
-
{
|
13
|
-
font-family: Arial, Verdana, sans-serif;
|
14
|
-
font-size: 80%;
|
15
|
-
color: #000000;
|
16
|
-
background-color: #ffffff;
|
17
|
-
padding: 5px;
|
18
|
-
margin: 0px;
|
19
|
-
}
|
20
|
-
|
21
|
-
/**
|
22
|
-
* Core styles.
|
23
|
-
*/
|
24
|
-
|
25
|
-
.Bold
|
26
|
-
{
|
27
|
-
font-weight: bold;
|
28
|
-
}
|
29
|
-
|
30
|
-
.Italic
|
31
|
-
{
|
32
|
-
font-style: italic;
|
33
|
-
}
|
34
|
-
|
35
|
-
.Underline
|
36
|
-
{
|
37
|
-
text-decoration: underline;
|
38
|
-
}
|
39
|
-
|
40
|
-
.StrikeThrough
|
41
|
-
{
|
42
|
-
text-decoration: line-through;
|
43
|
-
}
|
44
|
-
|
45
|
-
.Subscript
|
46
|
-
{
|
47
|
-
vertical-align: sub;
|
48
|
-
font-size: smaller;
|
49
|
-
}
|
50
|
-
|
51
|
-
.Superscript
|
52
|
-
{
|
53
|
-
vertical-align: super;
|
54
|
-
font-size: smaller;
|
55
|
-
}
|
56
|
-
|
57
|
-
/**
|
58
|
-
* Font faces.
|
59
|
-
*/
|
60
|
-
|
61
|
-
.FontComic
|
62
|
-
{
|
63
|
-
font-family: 'Comic Sans MS';
|
64
|
-
}
|
65
|
-
|
66
|
-
.FontCourier
|
67
|
-
{
|
68
|
-
font-family: 'Courier New';
|
69
|
-
}
|
70
|
-
|
71
|
-
.FontTimes
|
72
|
-
{
|
73
|
-
font-family: 'Times New Roman';
|
74
|
-
}
|
75
|
-
|
76
|
-
/**
|
77
|
-
* Font sizes.
|
78
|
-
*/
|
79
|
-
|
80
|
-
.FontSmaller
|
81
|
-
{
|
82
|
-
font-size: smaller;
|
83
|
-
}
|
84
|
-
|
85
|
-
.FontLarger
|
86
|
-
{
|
87
|
-
font-size: larger;
|
88
|
-
}
|
89
|
-
|
90
|
-
.FontSmall
|
91
|
-
{
|
92
|
-
font-size: 8pt;
|
93
|
-
}
|
94
|
-
|
95
|
-
.FontBig
|
96
|
-
{
|
97
|
-
font-size: 14pt;
|
98
|
-
}
|
99
|
-
|
100
|
-
.FontDouble
|
101
|
-
{
|
102
|
-
font-size: 200%;
|
103
|
-
}
|
104
|
-
|
105
|
-
/**
|
106
|
-
* Font colors.
|
107
|
-
*/
|
108
|
-
.FontColor1
|
109
|
-
{
|
110
|
-
color: #ff9900;
|
111
|
-
}
|
112
|
-
|
113
|
-
.FontColor2
|
114
|
-
{
|
115
|
-
color: #0066cc;
|
116
|
-
}
|
117
|
-
|
118
|
-
.FontColor3
|
119
|
-
{
|
120
|
-
color: #ff0000;
|
121
|
-
}
|
122
|
-
|
123
|
-
.FontColor1BG
|
124
|
-
{
|
125
|
-
background-color: #ff9900;
|
126
|
-
}
|
127
|
-
|
128
|
-
.FontColor2BG
|
129
|
-
{
|
130
|
-
background-color: #0066cc;
|
131
|
-
}
|
132
|
-
|
133
|
-
.FontColor3BG
|
134
|
-
{
|
135
|
-
background-color: #ff0000;
|
136
|
-
}
|
137
|
-
|
138
|
-
/**
|
139
|
-
* Indentation.
|
140
|
-
*/
|
141
|
-
|
142
|
-
.Indent1
|
143
|
-
{
|
144
|
-
margin-left: 40px;
|
145
|
-
}
|
146
|
-
|
147
|
-
.Indent2
|
148
|
-
{
|
149
|
-
margin-left: 80px;
|
150
|
-
}
|
151
|
-
|
152
|
-
.Indent3
|
153
|
-
{
|
154
|
-
margin-left: 120px;
|
155
|
-
}
|
156
|
-
|
157
|
-
/**
|
158
|
-
* Alignment.
|
159
|
-
*/
|
160
|
-
|
161
|
-
.JustifyLeft
|
162
|
-
{
|
163
|
-
text-align: left;
|
164
|
-
}
|
165
|
-
|
166
|
-
.JustifyRight
|
167
|
-
{
|
168
|
-
text-align: right;
|
169
|
-
}
|
170
|
-
|
171
|
-
.JustifyCenter
|
172
|
-
{
|
173
|
-
text-align: center;
|
174
|
-
}
|
175
|
-
|
176
|
-
.JustifyFull
|
177
|
-
{
|
178
|
-
text-align: justify;
|
179
|
-
}
|
180
|
-
|
181
|
-
/**
|
182
|
-
* Other.
|
183
|
-
*/
|
184
|
-
|
185
|
-
code
|
186
|
-
{
|
187
|
-
font-family: courier, monospace;
|
188
|
-
background-color: #eeeeee;
|
189
|
-
padding-left: 1px;
|
190
|
-
padding-right: 1px;
|
191
|
-
border: #c0c0c0 1px solid;
|
192
|
-
}
|
193
|
-
|
194
|
-
kbd
|
195
|
-
{
|
196
|
-
padding: 0px 1px 0px 1px;
|
197
|
-
border-width: 1px 2px 2px 1px;
|
198
|
-
border-style: solid;
|
199
|
-
}
|
200
|
-
|
201
|
-
blockquote
|
202
|
-
{
|
203
|
-
color: #808080;
|
204
|
-
}
|