tenon 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tenon/version.rb +1 -1
- metadata +1 -60
- data/app/assets/javascripts/ckeditor/samples/css/samples.css +0 -1640
- data/app/assets/javascripts/ckeditor/samples/img/github-top.png +0 -0
- data/app/assets/javascripts/ckeditor/samples/img/header-bg.png +0 -0
- data/app/assets/javascripts/ckeditor/samples/img/header-separator.png +0 -0
- data/app/assets/javascripts/ckeditor/samples/img/logo.png +0 -0
- data/app/assets/javascripts/ckeditor/samples/img/navigation-tip.png +0 -0
- data/app/assets/javascripts/ckeditor/samples/index.html +0 -128
- data/app/assets/javascripts/ckeditor/samples/js/sample.js +0 -53
- data/app/assets/javascripts/ckeditor/samples/js/sf.js +0 -17
- data/app/assets/javascripts/ckeditor/samples/old/ajax.html +0 -85
- data/app/assets/javascripts/ckeditor/samples/old/api.html +0 -210
- data/app/assets/javascripts/ckeditor/samples/old/appendto.html +0 -59
- data/app/assets/javascripts/ckeditor/samples/old/assets/inlineall/logo.png +0 -0
- data/app/assets/javascripts/ckeditor/samples/old/assets/outputxhtml/outputxhtml.css +0 -204
- data/app/assets/javascripts/ckeditor/samples/old/assets/posteddata.php +0 -59
- data/app/assets/javascripts/ckeditor/samples/old/assets/sample.jpg +0 -0
- data/app/assets/javascripts/ckeditor/samples/old/assets/uilanguages/languages.js +0 -7
- data/app/assets/javascripts/ckeditor/samples/old/datafiltering.html +0 -508
- data/app/assets/javascripts/ckeditor/samples/old/dialog/assets/my_dialog.js +0 -48
- data/app/assets/javascripts/ckeditor/samples/old/dialog/dialog.html +0 -190
- data/app/assets/javascripts/ckeditor/samples/old/divreplace.html +0 -144
- data/app/assets/javascripts/ckeditor/samples/old/enterkey/enterkey.html +0 -106
- data/app/assets/javascripts/ckeditor/samples/old/index.html +0 -125
- data/app/assets/javascripts/ckeditor/samples/old/inlineall.html +0 -314
- data/app/assets/javascripts/ckeditor/samples/old/inlinebycode.html +0 -124
- data/app/assets/javascripts/ckeditor/samples/old/inlinetextarea.html +0 -113
- data/app/assets/javascripts/ckeditor/samples/old/jquery.html +0 -103
- data/app/assets/javascripts/ckeditor/samples/old/readonly.html +0 -76
- data/app/assets/javascripts/ckeditor/samples/old/replacebyclass.html +0 -60
- data/app/assets/javascripts/ckeditor/samples/old/replacebycode.html +0 -59
- data/app/assets/javascripts/ckeditor/samples/old/sample.css +0 -357
- data/app/assets/javascripts/ckeditor/samples/old/sample.js +0 -50
- data/app/assets/javascripts/ckeditor/samples/old/sample_posteddata.php +0 -16
- data/app/assets/javascripts/ckeditor/samples/old/sourcedialog/sourcedialog.html +0 -121
- data/app/assets/javascripts/ckeditor/samples/old/tabindex.html +0 -78
- data/app/assets/javascripts/ckeditor/samples/old/toolbar/toolbar.html +0 -235
- data/app/assets/javascripts/ckeditor/samples/old/uicolor.html +0 -72
- data/app/assets/javascripts/ckeditor/samples/old/uilanguages.html +0 -122
- data/app/assets/javascripts/ckeditor/samples/old/wysiwygarea/fullpage.html +0 -80
- data/app/assets/javascripts/ckeditor/samples/old/xhtmlstyle.html +0 -234
- data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/css/fontello.css +0 -55
- data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/LICENSE.txt +0 -10
- data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/config.json +0 -28
- data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.eot +0 -0
- data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.svg +0 -14
- data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.ttf +0 -0
- data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.woff +0 -0
- data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/index.html +0 -446
- data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/abstracttoolbarmodifier.js +0 -13
- data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/fulltoolbareditor.js +0 -9
- data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/toolbarmodifier.js +0 -33
- data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/toolbartextmodifier.js +0 -14
- data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/LICENSE +0 -19
- data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/codemirror.css +0 -325
- data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/codemirror.js +0 -288
- data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/javascript.js +0 -25
- data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/neo.css +0 -36
- data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/show-hint.css +0 -38
- data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/show-hint.js +0 -16
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,128 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<!--
|
3
|
-
Copyright (c) 2003-2015, 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>CKEditor Sample</title>
|
10
|
-
<script src="../ckeditor.js"></script>
|
11
|
-
<script src="js/sample.js"></script>
|
12
|
-
<link rel="stylesheet" href="css/samples.css">
|
13
|
-
<link rel="stylesheet" href="toolbarconfigurator/lib/codemirror/neo.css">
|
14
|
-
</head>
|
15
|
-
<body id="main">
|
16
|
-
|
17
|
-
<nav class="navigation-a">
|
18
|
-
<div class="grid-container">
|
19
|
-
<ul class="navigation-a-left grid-width-70">
|
20
|
-
<li><a href="http://ckeditor.com">Project Homepage</a></li>
|
21
|
-
<li><a href="http://dev.ckeditor.com/">I found a bug</a></li>
|
22
|
-
<li><a href="http://github.com/ckeditor/ckeditor-dev" class="icon-pos-right icon-navigation-a-github">Fork CKEditor on GitHub</a></li>
|
23
|
-
</ul>
|
24
|
-
<ul class="navigation-a-right grid-width-30">
|
25
|
-
<li><a href="http://ckeditor.com/blog-list">CKEditor Blog</a></li>
|
26
|
-
</ul>
|
27
|
-
</div>
|
28
|
-
</nav>
|
29
|
-
|
30
|
-
<header class="header-a">
|
31
|
-
<div class="grid-container">
|
32
|
-
<h1 class="header-a-logo grid-width-30">
|
33
|
-
<a href="index.html"><img src="img/logo.png" alt="CKEditor Sample"></a>
|
34
|
-
</h1>
|
35
|
-
|
36
|
-
<nav class="navigation-b grid-width-70">
|
37
|
-
<ul>
|
38
|
-
<li><a href="index.html" class="button-a button-a-background">Start</a></li>
|
39
|
-
<li><a href="toolbarconfigurator/index.html" class="button-a">Toolbar configurator <span class="balloon-a balloon-a-nw">Edit your toolbar now!</span></a></li>
|
40
|
-
</ul>
|
41
|
-
</nav>
|
42
|
-
</div>
|
43
|
-
</header>
|
44
|
-
|
45
|
-
<main>
|
46
|
-
<div class="adjoined-top">
|
47
|
-
<div class="grid-container">
|
48
|
-
<div class="content grid-width-100">
|
49
|
-
<h1>Congratulations!</h1>
|
50
|
-
<p>
|
51
|
-
If you can see CKEditor below, it means that the installation succeeded.
|
52
|
-
You can now try out your new editor version, see its features, and when you are ready to move on, check some of the <a href="#sample-customize">most useful resources</a> recommended below.
|
53
|
-
</p>
|
54
|
-
</div>
|
55
|
-
</div>
|
56
|
-
</div>
|
57
|
-
<div class="adjoined-bottom">
|
58
|
-
<div class="grid-container">
|
59
|
-
<div class="grid-width-100">
|
60
|
-
<div id="editor">
|
61
|
-
<h1>Hello world!</h1>
|
62
|
-
<p>I'm an instance of <a href="http://ckeditor.com">CKEditor</a>.</p>
|
63
|
-
</div>
|
64
|
-
</div>
|
65
|
-
</div>
|
66
|
-
</div>
|
67
|
-
|
68
|
-
<div class="grid-container">
|
69
|
-
<div class="content grid-width-100">
|
70
|
-
<section id="sample-customize">
|
71
|
-
<h2>Customize Your Editor</h2>
|
72
|
-
<p>Modular build and <a href="http://docs.ckeditor.com/#!/guide/dev_configuration">numerous configuration options</a> give you nearly endless possibilities to customize CKEditor. Replace the content of your <code><a href="../config.js">config.js</a></code> file with the following code and refresh this page (<strong>remember to clear the browser cache</strong>)!</p>
|
73
|
-
<pre class="cm-s-neo CodeMirror"><code><span style="padding-right: 0.1px;"><span class="cm-variable">CKEDITOR</span>.<span class="cm-property">editorConfig</span> <span class="cm-operator">=</span> <span class="cm-keyword">function</span>( <span class="cm-def">config</span> ) {</span>
|
74
|
-
<span style="padding-right: 0.1px;"><span class="cm-tab"> </span><span class="cm-variable-2">config</span>.<span class="cm-property">language</span> <span class="cm-operator">=</span> <span class="cm-string">'es'</span>;</span>
|
75
|
-
<span style="padding-right: 0.1px;"><span class="cm-tab"> </span><span class="cm-variable-2">config</span>.<span class="cm-property">uiColor</span> <span class="cm-operator">=</span> <span class="cm-string">'#F7B42C'</span>;</span>
|
76
|
-
<span style="padding-right: 0.1px;"><span class="cm-tab"> </span><span class="cm-variable-2">config</span>.<span class="cm-property">height</span> <span class="cm-operator">=</span> <span class="cm-number">300</span>;</span>
|
77
|
-
<span style="padding-right: 0.1px;"><span class="cm-tab"> </span><span class="cm-variable-2">config</span>.<span class="cm-property">toolbarCanCollapse</span> <span class="cm-operator">=</span> <span class="cm-atom">true</span>;</span>
|
78
|
-
<span style="padding-right: 0.1px;">};</span></code></pre>
|
79
|
-
</section>
|
80
|
-
|
81
|
-
<section>
|
82
|
-
<h2>Toolbar Configuration</h2>
|
83
|
-
<p>If you want to reorder toolbar buttons or remove some of them, check <a href="toolbarconfigurator/index.html">this handy tool</a>!</p>
|
84
|
-
</section>
|
85
|
-
|
86
|
-
<section>
|
87
|
-
<h2>More Samples!</h2>
|
88
|
-
<p>Visit the <a href="http://sdk.ckeditor.com">CKEditor SDK</a> for a huge collection of samples showcasing editor features, with source code readily available to copy and use in your own implementation.</p>
|
89
|
-
</section>
|
90
|
-
|
91
|
-
<section>
|
92
|
-
<h2>Developer's Guide</h2>
|
93
|
-
<p>The most important resource for all developers working with CKEditor, integrating it with their websites and applications, and customizing to their needs. You can start from here:</p>
|
94
|
-
<ul>
|
95
|
-
<li><a href="http://docs.ckeditor.com/#!/guide/dev_installation">Getting Started</a> – Explains most crucial editor concepts and practices as well as the installation process and integration with your website.</li>
|
96
|
-
<li><a href="http://docs.ckeditor.com/#!/guide/dev_advanced_installation">Advanced Installation Concepts</a> – Describes how to upgrade, install additional components (plugins, skins), or create a custom build.</li>
|
97
|
-
</ul>
|
98
|
-
<p>When you have the basics sorted out, feel free to browse some more advanced sections like:</p>
|
99
|
-
<ul>
|
100
|
-
<li><a href="http://docs.ckeditor.com/#!/guide/dev_features">Functionality Overview</a> – Descriptions and samples of various editor features.</li>
|
101
|
-
<li><a href="http://docs.ckeditor.com/#!/guide/plugin_sdk_intro">Plugin SDK</a>, <a href="http://docs.ckeditor.com/#!/guide/widget_sdk_intro">Widget SDK</a>, and <a href="http://docs.ckeditor.com/#!/guide/skin_sdk_intro">Skin SDK</a> – Useful when you want to create your own editor components.</li>
|
102
|
-
</ul>
|
103
|
-
</section>
|
104
|
-
|
105
|
-
<section>
|
106
|
-
<h2>CKEditor JavaScript API</h2>
|
107
|
-
<p>CKEditor boasts a rich <a href="http://docs.ckeditor.com/#!/api">JavaScript API</a> that you can use to adjust the editor to your needs and integrate it with your website or application.</p>
|
108
|
-
</section>
|
109
|
-
</div>
|
110
|
-
</div>
|
111
|
-
</main>
|
112
|
-
|
113
|
-
<footer class="footer-a grid-container">
|
114
|
-
<div class="grid-container">
|
115
|
-
<p class="grid-width-100">
|
116
|
-
CKEditor – The text editor for the Internet – <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
117
|
-
</p>
|
118
|
-
<p class="grid-width-100" id="copy">
|
119
|
-
Copyright © 2003-2015, <a class="samples" href="http://cksource.com/">CKSource</a> – Frederico Knabben. All rights reserved.
|
120
|
-
</p>
|
121
|
-
</div>
|
122
|
-
</footer>
|
123
|
-
<script>
|
124
|
-
initSample();
|
125
|
-
</script>
|
126
|
-
|
127
|
-
</body>
|
128
|
-
</html>
|
@@ -1,53 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
3
|
-
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
4
|
-
*/
|
5
|
-
|
6
|
-
/* exported initSample */
|
7
|
-
|
8
|
-
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 )
|
9
|
-
CKEDITOR.tools.enableHtml5Elements( document );
|
10
|
-
|
11
|
-
// The trick to keep the editor in the sample quite small
|
12
|
-
// unless user specified own height.
|
13
|
-
CKEDITOR.config.height = 150;
|
14
|
-
CKEDITOR.config.width = 'auto';
|
15
|
-
|
16
|
-
var initSample = ( function() {
|
17
|
-
var wysiwygareaAvailable = isWysiwygareaAvailable(),
|
18
|
-
isBBCodeBuiltIn = !!CKEDITOR.plugins.get( 'bbcode' );
|
19
|
-
|
20
|
-
return function() {
|
21
|
-
var editorElement = CKEDITOR.document.getById( 'editor' );
|
22
|
-
|
23
|
-
// :(((
|
24
|
-
if ( isBBCodeBuiltIn ) {
|
25
|
-
editorElement.setHtml(
|
26
|
-
'Hello world!\n\n' +
|
27
|
-
'I\'m an instance of [url=http://ckeditor.com]CKEditor[/url].'
|
28
|
-
);
|
29
|
-
}
|
30
|
-
|
31
|
-
// Depending on the wysiwygare plugin availability initialize classic or inline editor.
|
32
|
-
if ( wysiwygareaAvailable ) {
|
33
|
-
CKEDITOR.replace( 'editor' );
|
34
|
-
} else {
|
35
|
-
editorElement.setAttribute( 'contenteditable', 'true' );
|
36
|
-
CKEDITOR.inline( 'editor' );
|
37
|
-
|
38
|
-
// TODO we can consider displaying some info box that
|
39
|
-
// without wysiwygarea the classic editor may not work.
|
40
|
-
}
|
41
|
-
};
|
42
|
-
|
43
|
-
function isWysiwygareaAvailable() {
|
44
|
-
// If in development mode, then the wysiwygarea must be available.
|
45
|
-
// Split REV into two strings so builder does not replace it :D.
|
46
|
-
if ( CKEDITOR.revision == ( '%RE' + 'V%' ) ) {
|
47
|
-
return true;
|
48
|
-
}
|
49
|
-
|
50
|
-
return !!CKEDITOR.plugins.get( 'wysiwygarea' );
|
51
|
-
}
|
52
|
-
} )();
|
53
|
-
|
@@ -1,17 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
3
|
-
For licensing, see LICENSE.md or http://ckeditor.com/license
|
4
|
-
*/
|
5
|
-
var SF=function(){function d(a){return(a=a.attributes?a.attributes.getNamedItem("class"):null)?a.value.split(" "):[]}function c(a){var e=document.createAttribute("class");e.value=a.join(" ");return e}var b={attachListener:function(a,e,b){if(a.addEventListener)a.addEventListener(e,b,!1);else if(a.attachEvent)a.attachEvent("on"+e,function(){b.apply(a,arguments)});else throw Error("Could not attach event.");}};b.indexOf=function(){var a=Array.prototype.indexOf;return"function"===a?function(e,b){return a.call(e,
|
6
|
-
b)}:function(a,b){for(var c=a.length,d=0;d<c;d++)if(a[d]===b)return d;return-1}}();b.accept=function(a,e){var c;a.children?(c=a.children,e(a)):"number"===typeof a.length&&(c=a);for(var d=c?c.length||0:0;d--;)b.accept(c[d],e)};b.getByClass=function(){var a=document.getElementsByClassName;return"function"===typeof a?function(e,b){"string"===typeof e&&(b=e,e=document);return a.call(e,b)}:function(a,c){"string"===typeof a&&(c=a,a=document.getElementsByTagName("html")[0]);var d=[];b.accept(a,function(a){b.classList.contains(a,
|
7
|
-
c)&&d.push(a)});return d}}();b.classList={};b.classList.add=function(a,b){var f=d(a);f.push(b);a.attributes.setNamedItem(c(f))};b.classList.remove=function(a,e){var f=d(a,e),n=b.indexOf(f,e);-1!==n&&(f.splice(n,1),a.attributes.setNamedItem(c(f)))};b.classList.contains=function(a,c){return-1!==b.indexOf(d(a),c)};b.classList.toggle=function(a,b){this.contains(a,b)?this.remove(a,b):this.add(a,b)};return b}();"use strict";
|
8
|
-
(function(){function d(c){for(var b in c)delete c[b]}SF.modal=function(c){function b(a){27==a.keyCode&&f.close()}c.modalClass="modal content";c.closeClass="modal-close";c.modalStyles=d;c.closeStyles=d;var a=c.afterCreate,e=c.afterClose;c.afterCreate=function(c){a&&a(c);window.addEventListener("keydown",b)};c.afterClose=function(a){e&&e(a);window.removeEventListener("keydown",b)};var f=(new picoModal(c)).afterCreate(c.afterCreate).afterClose(c.afterClose);return f}})();"use strict";
|
9
|
-
(function(){for(var d=SF.getByClass("toggler"),c=d.length;c--;)SF.attachListener(d[c],"click",function(){var b=SF.classList.contains(this,"icon-toggler-expanded")||SF.classList.contains(this,"icon-toggler-collapsed"),a=document.getElementById(this.getAttribute("data-for"));SF.classList.toggle(this,"collapsed");SF.classList.contains(this,"collapsed")?(SF.classList.add(a,"collapsed"),b&&(SF.classList.remove(this,"icon-toggler-expanded"),SF.classList.add(this,"icon-toggler-collapsed"))):(SF.classList.remove(a,
|
10
|
-
"collapsed"),b&&(SF.classList.remove(this,"icon-toggler-collapsed"),SF.classList.add(this,"icon-toggler-expanded")))})})();"use strict";(function(){for(var d=SF.getByClass("tree-a"),c=d.length;c--;)SF.attachListener(d[c],"click",function(b){b=b.target||b.srcElement;"H2"!==b.nodeName||SF.classList.contains(b,"tree-a-no-sub")||SF.classList.toggle(b,"tree-a-active")})})();
|
11
|
-
(function(d,c){function b(a){return"object"===typeof Node?a instanceof Node:a&&"object"===typeof a&&"number"===typeof a.nodeType}function a(){var a=[];return{watch:a.push.bind(a),trigger:function(b){for(var c=!0,d={preventDefault:function(){c=!1}},e=0;e<a.length;e++)a[e](b,d);return c}}}function e(a){this.elem=a}function f(a,b){return e.div().clazz("pico-overlay").clazz(a("overlayClass","")).stylize({display:"block",position:"fixed",top:"0px",left:"0px",height:"100%",width:"100%",zIndex:1E4}).stylize(a("overlayStyles",
|
12
|
-
{opacity:.5,background:"#000"})).onClick(function(){a("overlayClose",!0)&&b()})}function n(a,b){var c=a("width","auto");"number"===typeof c&&(c=""+c+"px");return e.div().clazz("pico-content").clazz(a("modalClass","")).stylize({display:"block",position:"fixed",zIndex:10001,left:"50%",top:"50px",width:c,"-ms-transform":"translateX(-50%)","-moz-transform":"translateX(-50%)","-webkit-transform":"translateX(-50%)","-o-transform":"translateX(-50%)",transform:"translateX(-50%)"}).stylize(a("modalStyles",
|
13
|
-
{backgroundColor:"white",padding:"20px",borderRadius:"5px"})).html(a("content")).attr("role","dialog").onClick(function(a){(new e(a.target)).anyAncestor(function(a){return/\bpico-close\b/.test(a.elem.className)})&&b()})}function p(a){return function(){return a().elem}}function k(c){function e(a,b){var d=c[a];"function"===typeof d&&(d=d(b));return void 0===d?b:d}function k(){l().hide();m().hide();v.trigger(h)}function q(){w.trigger(h)&&k()}function g(a){return function(){a.apply(this,arguments);return h}}
|
14
|
-
function r(a){if(!t){var c=n(e,q),b=f(e,q),d;d=e("closeButton",!0)?c.child().html(e("closeHtml","\x26#xD7;")).clazz("pico-close").clazz(e("closeClass")).stylize(e("closeStyles",{borderRadius:"2px",cursor:"pointer",height:"15px",width:"15px",position:"absolute",top:"5px",right:"5px",fontSize:"16px",textAlign:"center",lineHeight:"15px",background:"#CCC"})):void 0;t={modal:c,overlay:b,close:d};x.trigger(h)}return t[a]}if("string"===typeof c||b(c))c={content:c};var x=a(),y=a(),z=a(),w=a(),v=a(),t,m=r.bind(d,
|
15
|
-
"modal"),l=r.bind(d,"overlay"),u=r.bind(d,"close"),h={modalElem:p(m),closeElem:p(u),overlayElem:p(l),show:function(){y.trigger(h)&&(l().show(),u(),m().show(),z.trigger(h));return this},close:g(q),forceClose:g(k),destroy:function(){m=m().destroy();l=l().destroy();u=void 0},options:function(a){c=a},afterCreate:g(x.watch),beforeShow:g(y.watch),afterShow:g(z.watch),beforeClose:g(w.watch),afterClose:g(v.watch)};return h}e.div=function(a){var b=c.createElement("div");(a||c.body).appendChild(b);return new e(b)};
|
16
|
-
e.prototype={child:function(){return e.div(this.elem)},stylize:function(a){a=a||{};"undefined"!==typeof a.opacity&&(a.filter="alpha(opacity\x3d"+100*a.opacity+")");for(var b in a)a.hasOwnProperty(b)&&(this.elem.style[b]=a[b]);return this},clazz:function(a){this.elem.className+=" "+a;return this},html:function(a){b(a)?this.elem.appendChild(a):this.elem.innerHTML=a;return this},onClick:function(a){this.elem.addEventListener("click",a);return this},destroy:function(){c.body.removeChild(this.elem)},hide:function(){this.elem.style.display=
|
17
|
-
"none"},show:function(){this.elem.style.display="block"},attr:function(a,b){this.elem.setAttribute(a,b);return this},anyAncestor:function(a){for(var b=this.elem;b;){if(a(new e(b)))return!0;b=b.parentNode}return!1}};"function"===typeof d.define&&d.define.amd?d.define(function(){return k}):d.picoModal=k})(window,document);
|
@@ -1,85 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<!--
|
3
|
-
Copyright (c) 2003-2015, 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>Ajax — CKEditor Sample</title>
|
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="warning deprecated">
|
46
|
-
This sample is not maintained anymore. Check out its <a href="http://sdk.ckeditor.com/samples/saveajax.html">brand new version in CKEditor SDK</a>.
|
47
|
-
</div>
|
48
|
-
<div class="description">
|
49
|
-
<p>
|
50
|
-
This sample shows how to create and destroy CKEditor instances on the fly. After the removal of CKEditor the content created inside the editing
|
51
|
-
area will be displayed in a <code><div></code> element.
|
52
|
-
</p>
|
53
|
-
<p>
|
54
|
-
For details of how to create this setup check the source code of this sample page
|
55
|
-
for JavaScript code responsible for the creation and destruction of a CKEditor instance.
|
56
|
-
</p>
|
57
|
-
</div>
|
58
|
-
<p>Click the buttons to create and remove a CKEditor instance.</p>
|
59
|
-
<p>
|
60
|
-
<input onclick="createEditor();" type="button" value="Create Editor">
|
61
|
-
<input onclick="removeEditor();" type="button" value="Remove Editor">
|
62
|
-
</p>
|
63
|
-
<!-- This div will hold the editor. -->
|
64
|
-
<div id="editor">
|
65
|
-
</div>
|
66
|
-
<div id="contents" style="display: none">
|
67
|
-
<p>
|
68
|
-
Edited Contents:
|
69
|
-
</p>
|
70
|
-
<!-- This div will be used to display the editor contents. -->
|
71
|
-
<div id="editorcontents">
|
72
|
-
</div>
|
73
|
-
</div>
|
74
|
-
<div id="footer">
|
75
|
-
<hr>
|
76
|
-
<p>
|
77
|
-
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
78
|
-
</p>
|
79
|
-
<p id="copy">
|
80
|
-
Copyright © 2003-2015, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
81
|
-
Knabben. All rights reserved.
|
82
|
-
</p>
|
83
|
-
</div>
|
84
|
-
</body>
|
85
|
-
</html>
|
@@ -1,210 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<!--
|
3
|
-
Copyright (c) 2003-2015, 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="warning deprecated">
|
128
|
-
This sample is not maintained anymore. Check out its <a href="http://sdk.ckeditor.com/samples/api.html">brand new version in CKEditor SDK</a>.
|
129
|
-
</div>
|
130
|
-
<div class="description">
|
131
|
-
<p>
|
132
|
-
This sample shows how to use the
|
133
|
-
<a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.editor">CKEditor JavaScript API</a>
|
134
|
-
to interact with the editor at runtime.
|
135
|
-
</p>
|
136
|
-
<p>
|
137
|
-
For details on how to create this setup check the source code of this sample page.
|
138
|
-
</p>
|
139
|
-
</div>
|
140
|
-
|
141
|
-
<!-- This <div> holds alert messages to be display in the sample page. -->
|
142
|
-
<div id="alerts">
|
143
|
-
<noscript>
|
144
|
-
<p>
|
145
|
-
<strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
|
146
|
-
support, like yours, you should still see the contents (HTML data) and you should
|
147
|
-
be able to edit it normally, without a rich editor interface.
|
148
|
-
</p>
|
149
|
-
</noscript>
|
150
|
-
</div>
|
151
|
-
<form action="../../../samples/sample_posteddata.php" method="post">
|
152
|
-
<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>
|
153
|
-
|
154
|
-
<script>
|
155
|
-
// Replace the <textarea id="editor1"> with an CKEditor instance.
|
156
|
-
CKEDITOR.replace( 'editor1', {
|
157
|
-
on: {
|
158
|
-
focus: onFocus,
|
159
|
-
blur: onBlur,
|
160
|
-
|
161
|
-
// Check for availability of corresponding plugins.
|
162
|
-
pluginsLoaded: function( evt ) {
|
163
|
-
var doc = CKEDITOR.document, ed = evt.editor;
|
164
|
-
if ( !ed.getCommand( 'bold' ) )
|
165
|
-
doc.getById( 'exec-bold' ).hide();
|
166
|
-
if ( !ed.getCommand( 'link' ) )
|
167
|
-
doc.getById( 'exec-link' ).hide();
|
168
|
-
}
|
169
|
-
}
|
170
|
-
});
|
171
|
-
</script>
|
172
|
-
|
173
|
-
<p id="eMessage">
|
174
|
-
</p>
|
175
|
-
|
176
|
-
<div id="eButtons" style="display: none">
|
177
|
-
<input id="exec-bold" onclick="ExecuteCommand('bold');" type="button" value="Execute "bold" Command">
|
178
|
-
<input id="exec-link" onclick="ExecuteCommand('link');" type="button" value="Execute "link" Command">
|
179
|
-
<input onclick="Focus();" type="button" value="Focus">
|
180
|
-
<br><br>
|
181
|
-
<input onclick="InsertHTML();" type="button" value="Insert HTML">
|
182
|
-
<input onclick="SetContents();" type="button" value="Set Editor Contents">
|
183
|
-
<input onclick="GetContents();" type="button" value="Get Editor Contents (HTML)">
|
184
|
-
<br>
|
185
|
-
<textarea cols="100" id="htmlArea" rows="3"><h2>Test</h2><p>This is some <a href="/Test1.html">sample</a> HTML code.</p></textarea>
|
186
|
-
<br>
|
187
|
-
<br>
|
188
|
-
<input onclick="InsertText();" type="button" value="Insert Text">
|
189
|
-
<br>
|
190
|
-
<textarea cols="100" id="txtArea" rows="3"> First line with some leading whitespaces.
|
191
|
-
|
192
|
-
Second line of text preceded by two line breaks.</textarea>
|
193
|
-
<br>
|
194
|
-
<br>
|
195
|
-
<input onclick="CheckDirty();" type="button" value="checkDirty()">
|
196
|
-
<input onclick="ResetDirty();" type="button" value="resetDirty()">
|
197
|
-
</div>
|
198
|
-
</form>
|
199
|
-
<div id="footer">
|
200
|
-
<hr>
|
201
|
-
<p>
|
202
|
-
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
203
|
-
</p>
|
204
|
-
<p id="copy">
|
205
|
-
Copyright © 2003-2015, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
206
|
-
Knabben. All rights reserved.
|
207
|
-
</p>
|
208
|
-
</div>
|
209
|
-
</body>
|
210
|
-
</html>
|
@@ -1,59 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<!--
|
3
|
-
Copyright (c) 2003-2015, 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>Append To Page Element Using JavaScript Code — CKEditor Sample</title>
|
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 class="warning deprecated">
|
18
|
-
This sample is not maintained anymore. Check out the <a href="http://sdk.ckeditor.com/">brand new samples in CKEditor SDK</a>.
|
19
|
-
</div>
|
20
|
-
<div id="section1">
|
21
|
-
<div class="description">
|
22
|
-
<p>
|
23
|
-
The <code><a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR-method-appendTo">CKEDITOR.appendTo()</a></code> method serves to to place editors inside existing DOM elements. Unlike <code><a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR-method-replace">CKEDITOR.replace()</a></code>,
|
24
|
-
a target container to be replaced is no longer necessary. A new editor
|
25
|
-
instance is inserted directly wherever it is desired.
|
26
|
-
</p>
|
27
|
-
<pre class="samples">CKEDITOR.appendTo( '<em>container_id</em>',
|
28
|
-
{ /* Configuration options to be used. */ }
|
29
|
-
'Editor content to be used.'
|
30
|
-
);</pre>
|
31
|
-
</div>
|
32
|
-
<script>
|
33
|
-
|
34
|
-
// This call can be placed at any point after the
|
35
|
-
// DOM element to append CKEditor to or inside the <head><script>
|
36
|
-
// in a window.onload event handler.
|
37
|
-
|
38
|
-
// Append a CKEditor instance using the default configuration and the
|
39
|
-
// provided content to the <div> element of ID "section1".
|
40
|
-
CKEDITOR.appendTo( 'section1',
|
41
|
-
null,
|
42
|
-
'<p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>'
|
43
|
-
);
|
44
|
-
|
45
|
-
</script>
|
46
|
-
</div>
|
47
|
-
<br>
|
48
|
-
<div id="footer">
|
49
|
-
<hr>
|
50
|
-
<p>
|
51
|
-
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
52
|
-
</p>
|
53
|
-
<p id="copy">
|
54
|
-
Copyright © 2003-2015, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
55
|
-
Knabben. All rights reserved.
|
56
|
-
</p>
|
57
|
-
</div>
|
58
|
-
</body>
|
59
|
-
</html>
|
Binary file
|