Fix perm and CRLF
This commit is contained in:
parent
67f3fda984
commit
cf8c180fa4
17
.travis.yml
17
.travis.yml
@ -79,13 +79,17 @@ before_install:
|
||||
install:
|
||||
- |
|
||||
echo "Updating Composer"
|
||||
composer self-update
|
||||
if [ "$TRAVIS_PHP_VERSION" = '5.6' ]; then
|
||||
composer self-update
|
||||
fi
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Installing Parallel Lint"
|
||||
composer -n require jakub-onderka/php-parallel-lint ^0
|
||||
composer -n require jakub-onderka/php-console-highlighter ^0
|
||||
if [ "$TRAVIS_PHP_VERSION" = '5.6' ]; then
|
||||
composer -n require jakub-onderka/php-parallel-lint ^0
|
||||
composer -n require jakub-onderka/php-console-highlighter ^0
|
||||
fi
|
||||
echo
|
||||
|
||||
- |
|
||||
@ -100,13 +104,17 @@ install:
|
||||
|
||||
- |
|
||||
echo "Installing PHP CodeSniffer"
|
||||
composer -n require squizlabs/php_codesniffer ^2
|
||||
if [ "$TRAVIS_PHP_VERSION" = '5.6' ]; then
|
||||
composer -n require squizlabs/php_codesniffer ^2
|
||||
fi
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Adding path of binaries tools installed by composer to the PATH"
|
||||
export PATH="$TRAVIS_BUILD_DIR/htdocs/includes/bin:$PATH"
|
||||
echo
|
||||
cat htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php
|
||||
|
||||
|
||||
before_script:
|
||||
- |
|
||||
@ -288,7 +296,6 @@ script:
|
||||
echo
|
||||
#cat $TRAVIS_BUILD_DIR/upgrade390400-2.log
|
||||
#cat /tmp/dolibarr_install.log
|
||||
cat htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php
|
||||
|
||||
- |
|
||||
echo "Unit testing"
|
||||
|
||||
@ -12,6 +12,9 @@
|
||||
"irc": "irc://chat.freenode.net/dolibarr",
|
||||
"source": "https://github.com/Dolibarr/dolibarr"
|
||||
},
|
||||
"config": {
|
||||
"vendor-dir": "htdocs/includes"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0",
|
||||
"ext-curl": "*",
|
||||
@ -45,8 +48,5 @@
|
||||
"ext-xml": "Excel support",
|
||||
"firephp/firephp-core": "Logging to Firebug console support",
|
||||
"raven/raven": "Sentry logging server support"
|
||||
},
|
||||
"config": {
|
||||
"vendor-dir": "htdocs/includes"
|
||||
}
|
||||
}
|
||||
|
||||
0
htdocs/core/modules/mailings/advthirdparties.modules.php
Executable file → Normal file
0
htdocs/core/modules/mailings/advthirdparties.modules.php
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,54 +1,54 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* This file was added automatically by CKEditor builder.
|
||||
* You may re-use it at any time to build CKEditor again.
|
||||
*
|
||||
* If you would like to build CKEditor online again
|
||||
* (for example to upgrade), visit one the following links:
|
||||
*
|
||||
* (1) http://ckeditor.com/builder
|
||||
* Visit online builder to build CKEditor from scratch.
|
||||
*
|
||||
* (2) http://ckeditor.com/builder/9112f95de78a7f2c3576c61a29c8fc5b
|
||||
* Visit online builder to build CKEditor, starting with the same setup as before.
|
||||
*
|
||||
* (3) http://ckeditor.com/builder/download/9112f95de78a7f2c3576c61a29c8fc5b
|
||||
* Straight download link to the latest version of CKEditor (Optimized) with the same setup as before.
|
||||
*
|
||||
* NOTE:
|
||||
* This file is not used by CKEditor, you may remove it.
|
||||
* Changing this file will not change your CKEditor configuration.
|
||||
*/
|
||||
|
||||
var CKBUILDER_CONFIG = {
|
||||
skin: 'moono',
|
||||
preset: 'full',
|
||||
ignore: [
|
||||
'.bender',
|
||||
'bender.js',
|
||||
'bender-err.log',
|
||||
'bender-out.log',
|
||||
'dev',
|
||||
'.DS_Store',
|
||||
'.editorconfig',
|
||||
'.gitattributes',
|
||||
'.gitignore',
|
||||
'gruntfile.js',
|
||||
'.idea',
|
||||
'.jscsrc',
|
||||
'.jshintignore',
|
||||
'.jshintrc',
|
||||
'less',
|
||||
'.mailmap',
|
||||
'node_modules',
|
||||
'package.json',
|
||||
'README.md',
|
||||
'tests'
|
||||
],
|
||||
/**
|
||||
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* This file was added automatically by CKEditor builder.
|
||||
* You may re-use it at any time to build CKEditor again.
|
||||
*
|
||||
* If you would like to build CKEditor online again
|
||||
* (for example to upgrade), visit one the following links:
|
||||
*
|
||||
* (1) http://ckeditor.com/builder
|
||||
* Visit online builder to build CKEditor from scratch.
|
||||
*
|
||||
* (2) http://ckeditor.com/builder/9112f95de78a7f2c3576c61a29c8fc5b
|
||||
* Visit online builder to build CKEditor, starting with the same setup as before.
|
||||
*
|
||||
* (3) http://ckeditor.com/builder/download/9112f95de78a7f2c3576c61a29c8fc5b
|
||||
* Straight download link to the latest version of CKEditor (Optimized) with the same setup as before.
|
||||
*
|
||||
* NOTE:
|
||||
* This file is not used by CKEditor, you may remove it.
|
||||
* Changing this file will not change your CKEditor configuration.
|
||||
*/
|
||||
|
||||
var CKBUILDER_CONFIG = {
|
||||
skin: 'moono',
|
||||
preset: 'full',
|
||||
ignore: [
|
||||
'.bender',
|
||||
'bender.js',
|
||||
'bender-err.log',
|
||||
'bender-out.log',
|
||||
'dev',
|
||||
'.DS_Store',
|
||||
'.editorconfig',
|
||||
'.gitattributes',
|
||||
'.gitignore',
|
||||
'gruntfile.js',
|
||||
'.idea',
|
||||
'.jscsrc',
|
||||
'.jshintignore',
|
||||
'.jshintrc',
|
||||
'less',
|
||||
'.mailmap',
|
||||
'node_modules',
|
||||
'package.json',
|
||||
'README.md',
|
||||
'tests'
|
||||
],
|
||||
plugins : {
|
||||
'a11yhelp' : 1,
|
||||
'about' : 1,
|
||||
|
||||
@ -1,135 +1,135 @@
|
||||
/*
|
||||
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
body
|
||||
{
|
||||
/* Font */
|
||||
font-family: sans-serif, Arial, Verdana, "Trebuchet MS";
|
||||
font-size: 12px;
|
||||
|
||||
/* Text color */
|
||||
color: #333;
|
||||
|
||||
/* Remove the background color to make it transparent */
|
||||
background-color: #fff;
|
||||
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.cke_editable
|
||||
{
|
||||
font-size: 13px;
|
||||
line-height: 1.6;
|
||||
|
||||
/* Fix for missing scrollbars with RTL texts. (#10488) */
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
blockquote
|
||||
{
|
||||
font-style: italic;
|
||||
font-family: Georgia, Times, "Times New Roman", serif;
|
||||
padding: 2px 0;
|
||||
border-style: solid;
|
||||
border-color: #ccc;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
.cke_contents_ltr blockquote
|
||||
{
|
||||
padding-left: 20px;
|
||||
padding-right: 8px;
|
||||
border-left-width: 5px;
|
||||
}
|
||||
|
||||
.cke_contents_rtl blockquote
|
||||
{
|
||||
padding-left: 8px;
|
||||
padding-right: 20px;
|
||||
border-right-width: 5px;
|
||||
}
|
||||
|
||||
a
|
||||
{
|
||||
color: #0782C1;
|
||||
}
|
||||
|
||||
ol,ul,dl
|
||||
{
|
||||
/* IE7: reset rtl list margin. (#7334) */
|
||||
*margin-right: 0px;
|
||||
/* preserved spaces for list items with text direction other than the list. (#6249,#8049)*/
|
||||
padding: 0 40px;
|
||||
}
|
||||
|
||||
h1,h2,h3,h4,h5,h6
|
||||
{
|
||||
font-weight: normal;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
hr
|
||||
{
|
||||
border: 0px;
|
||||
border-top: 1px solid #ccc;
|
||||
}
|
||||
|
||||
img.right
|
||||
{
|
||||
border: 1px solid #ccc;
|
||||
float: right;
|
||||
margin-left: 15px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
img.left
|
||||
{
|
||||
border: 1px solid #ccc;
|
||||
float: left;
|
||||
margin-right: 15px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
pre
|
||||
{
|
||||
white-space: pre-wrap; /* CSS 2.1 */
|
||||
word-wrap: break-word; /* IE7 */
|
||||
-moz-tab-size: 4;
|
||||
tab-size: 4;
|
||||
}
|
||||
|
||||
.marker
|
||||
{
|
||||
background-color: Yellow;
|
||||
}
|
||||
|
||||
span[lang]
|
||||
{
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
figure
|
||||
{
|
||||
text-align: center;
|
||||
border: solid 1px #ccc;
|
||||
border-radius: 2px;
|
||||
background: rgba(0,0,0,0.05);
|
||||
padding: 10px;
|
||||
margin: 10px 20px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
figure > figcaption
|
||||
{
|
||||
text-align: center;
|
||||
display: block; /* For IE8 */
|
||||
}
|
||||
|
||||
a > img {
|
||||
padding: 1px;
|
||||
margin: 1px;
|
||||
border: none;
|
||||
outline: 1px solid #0782C1;
|
||||
}
|
||||
/*
|
||||
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
body
|
||||
{
|
||||
/* Font */
|
||||
font-family: sans-serif, Arial, Verdana, "Trebuchet MS";
|
||||
font-size: 12px;
|
||||
|
||||
/* Text color */
|
||||
color: #333;
|
||||
|
||||
/* Remove the background color to make it transparent */
|
||||
background-color: #fff;
|
||||
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.cke_editable
|
||||
{
|
||||
font-size: 13px;
|
||||
line-height: 1.6;
|
||||
|
||||
/* Fix for missing scrollbars with RTL texts. (#10488) */
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
blockquote
|
||||
{
|
||||
font-style: italic;
|
||||
font-family: Georgia, Times, "Times New Roman", serif;
|
||||
padding: 2px 0;
|
||||
border-style: solid;
|
||||
border-color: #ccc;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
.cke_contents_ltr blockquote
|
||||
{
|
||||
padding-left: 20px;
|
||||
padding-right: 8px;
|
||||
border-left-width: 5px;
|
||||
}
|
||||
|
||||
.cke_contents_rtl blockquote
|
||||
{
|
||||
padding-left: 8px;
|
||||
padding-right: 20px;
|
||||
border-right-width: 5px;
|
||||
}
|
||||
|
||||
a
|
||||
{
|
||||
color: #0782C1;
|
||||
}
|
||||
|
||||
ol,ul,dl
|
||||
{
|
||||
/* IE7: reset rtl list margin. (#7334) */
|
||||
*margin-right: 0px;
|
||||
/* preserved spaces for list items with text direction other than the list. (#6249,#8049)*/
|
||||
padding: 0 40px;
|
||||
}
|
||||
|
||||
h1,h2,h3,h4,h5,h6
|
||||
{
|
||||
font-weight: normal;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
hr
|
||||
{
|
||||
border: 0px;
|
||||
border-top: 1px solid #ccc;
|
||||
}
|
||||
|
||||
img.right
|
||||
{
|
||||
border: 1px solid #ccc;
|
||||
float: right;
|
||||
margin-left: 15px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
img.left
|
||||
{
|
||||
border: 1px solid #ccc;
|
||||
float: left;
|
||||
margin-right: 15px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
pre
|
||||
{
|
||||
white-space: pre-wrap; /* CSS 2.1 */
|
||||
word-wrap: break-word; /* IE7 */
|
||||
-moz-tab-size: 4;
|
||||
tab-size: 4;
|
||||
}
|
||||
|
||||
.marker
|
||||
{
|
||||
background-color: Yellow;
|
||||
}
|
||||
|
||||
span[lang]
|
||||
{
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
figure
|
||||
{
|
||||
text-align: center;
|
||||
border: solid 1px #ccc;
|
||||
border-radius: 2px;
|
||||
background: rgba(0,0,0,0.05);
|
||||
padding: 10px;
|
||||
margin: 10px 20px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
figure > figcaption
|
||||
{
|
||||
text-align: center;
|
||||
display: block; /* For IE8 */
|
||||
}
|
||||
|
||||
a > img {
|
||||
padding: 1px;
|
||||
margin: 1px;
|
||||
border: none;
|
||||
outline: 1px solid #0782C1;
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,25 +1,25 @@
|
||||
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
|
||||
cs.js Found: 30 Missing: 0
|
||||
cy.js Found: 30 Missing: 0
|
||||
da.js Found: 12 Missing: 18
|
||||
de.js Found: 30 Missing: 0
|
||||
el.js Found: 25 Missing: 5
|
||||
eo.js Found: 30 Missing: 0
|
||||
fa.js Found: 30 Missing: 0
|
||||
fi.js Found: 30 Missing: 0
|
||||
fr.js Found: 30 Missing: 0
|
||||
gu.js Found: 12 Missing: 18
|
||||
he.js Found: 30 Missing: 0
|
||||
it.js Found: 30 Missing: 0
|
||||
mk.js Found: 5 Missing: 25
|
||||
nb.js Found: 30 Missing: 0
|
||||
nl.js Found: 30 Missing: 0
|
||||
no.js Found: 30 Missing: 0
|
||||
pt-br.js Found: 30 Missing: 0
|
||||
ro.js Found: 6 Missing: 24
|
||||
tr.js Found: 30 Missing: 0
|
||||
ug.js Found: 27 Missing: 3
|
||||
vi.js Found: 6 Missing: 24
|
||||
zh-cn.js Found: 30 Missing: 0
|
||||
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
|
||||
cs.js Found: 30 Missing: 0
|
||||
cy.js Found: 30 Missing: 0
|
||||
da.js Found: 12 Missing: 18
|
||||
de.js Found: 30 Missing: 0
|
||||
el.js Found: 25 Missing: 5
|
||||
eo.js Found: 30 Missing: 0
|
||||
fa.js Found: 30 Missing: 0
|
||||
fi.js Found: 30 Missing: 0
|
||||
fr.js Found: 30 Missing: 0
|
||||
gu.js Found: 12 Missing: 18
|
||||
he.js Found: 30 Missing: 0
|
||||
it.js Found: 30 Missing: 0
|
||||
mk.js Found: 5 Missing: 25
|
||||
nb.js Found: 30 Missing: 0
|
||||
nl.js Found: 30 Missing: 0
|
||||
no.js Found: 30 Missing: 0
|
||||
pt-br.js Found: 30 Missing: 0
|
||||
ro.js Found: 6 Missing: 24
|
||||
tr.js Found: 30 Missing: 0
|
||||
ug.js Found: 27 Missing: 3
|
||||
vi.js Found: 6 Missing: 24
|
||||
zh-cn.js Found: 30 Missing: 0
|
||||
|
||||
@ -1,20 +1,20 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
.cke_colordialog_colorcell {
|
||||
width: 12px; /* All cells have equal width which depends on parent width (in this case table parent). Width works more like max-width. */
|
||||
height: 14px;
|
||||
padding: 1px; /* Padding is replaced by border for focused cells. Prevents 'jumping' when adding borders. */
|
||||
}
|
||||
|
||||
.cke_colordialog_colorcell.cke_colordialog_focused_light,
|
||||
.cke_colordialog_colorcell.cke_colordialog_focused_dark {
|
||||
padding: 0; /* Shrink cell to allow 1px border indicating focus. */
|
||||
border: 1px dotted #000;
|
||||
}
|
||||
|
||||
.cke_colordialog_colorcell.cke_colordialog_focused_dark {
|
||||
border-color: #FFF;
|
||||
}
|
||||
/**
|
||||
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
.cke_colordialog_colorcell {
|
||||
width: 12px; /* All cells have equal width which depends on parent width (in this case table parent). Width works more like max-width. */
|
||||
height: 14px;
|
||||
padding: 1px; /* Padding is replaced by border for focused cells. Prevents 'jumping' when adding borders. */
|
||||
}
|
||||
|
||||
.cke_colordialog_colorcell.cke_colordialog_focused_light,
|
||||
.cke_colordialog_colorcell.cke_colordialog_focused_dark {
|
||||
padding: 0; /* Shrink cell to allow 1px border indicating focus. */
|
||||
border: 1px dotted #000;
|
||||
}
|
||||
|
||||
.cke_colordialog_colorcell.cke_colordialog_focused_dark {
|
||||
border-color: #FFF;
|
||||
}
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
<script>
|
||||
|
||||
// Prevent from DOM clobbering.
|
||||
if ( typeof window.opener._cke_htmlToLoad == 'string' ) {
|
||||
var doc = document;
|
||||
doc.open();
|
||||
doc.write( window.opener._cke_htmlToLoad );
|
||||
doc.close();
|
||||
|
||||
delete window.opener._cke_htmlToLoad;
|
||||
}
|
||||
|
||||
</script>
|
||||
<script>
|
||||
|
||||
// Prevent from DOM clobbering.
|
||||
if ( typeof window.opener._cke_htmlToLoad == 'string' ) {
|
||||
var doc = document;
|
||||
doc.open();
|
||||
doc.write( window.opener._cke_htmlToLoad );
|
||||
doc.close();
|
||||
|
||||
delete window.opener._cke_htmlToLoad;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@ -1,20 +1,20 @@
|
||||
SCAYT plugin for CKEditor 4 Changelog
|
||||
====================
|
||||
### CKEditor 4.5.6
|
||||
|
||||
New Features:
|
||||
* CKEditor [language addon](http://ckeditor.com/addon/language) support
|
||||
* CKEditor [placeholder addon](http://ckeditor.com/addon/placeholder) support
|
||||
* Drag and Drop support
|
||||
* *Experimental* GRAYT functionality http://www.webspellchecker.net/samples/scayt-ckeditor-plugin.html#25
|
||||
|
||||
Fixed issues:
|
||||
* [#98](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/98) SCAYT Affects Dialog Double Click. Fixed in SCAYT Core.
|
||||
* [#102](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/102) SCAYT Core performance enhancements
|
||||
* [#104](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/104) SCAYT's spans leak into the clipboard and after pasting
|
||||
* [#105](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/105) Javascript error fired in case of multiple instances of CKEditor in one page
|
||||
* [#107](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/107) SCAYT should not check non-editable parts of content
|
||||
* [#108](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/108) Latest SCAYT copies id of editor element to the iframe
|
||||
* SCAYT stops working when CKEditor Undo plug-in not enabled
|
||||
* Issue with pasting SCAYT markup in CKEditor
|
||||
* [#32](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/32) SCAYT stops working after pressing Cancel button in WSC dialog
|
||||
SCAYT plugin for CKEditor 4 Changelog
|
||||
====================
|
||||
### CKEditor 4.5.6
|
||||
|
||||
New Features:
|
||||
* CKEditor [language addon](http://ckeditor.com/addon/language) support
|
||||
* CKEditor [placeholder addon](http://ckeditor.com/addon/placeholder) support
|
||||
* Drag and Drop support
|
||||
* *Experimental* GRAYT functionality http://www.webspellchecker.net/samples/scayt-ckeditor-plugin.html#25
|
||||
|
||||
Fixed issues:
|
||||
* [#98](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/98) SCAYT Affects Dialog Double Click. Fixed in SCAYT Core.
|
||||
* [#102](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/102) SCAYT Core performance enhancements
|
||||
* [#104](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/104) SCAYT's spans leak into the clipboard and after pasting
|
||||
* [#105](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/105) Javascript error fired in case of multiple instances of CKEditor in one page
|
||||
* [#107](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/107) SCAYT should not check non-editable parts of content
|
||||
* [#108](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/108) Latest SCAYT copies id of editor element to the iframe
|
||||
* SCAYT stops working when CKEditor Undo plug-in not enabled
|
||||
* Issue with pasting SCAYT markup in CKEditor
|
||||
* [#32](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/32) SCAYT stops working after pressing Cancel button in WSC dialog
|
||||
|
||||
@ -1,28 +1,28 @@
|
||||
Software License Agreement
|
||||
==========================
|
||||
|
||||
**CKEditor SCAYT Plugin**
|
||||
Copyright © 2012, [CKSource](http://cksource.com) - Frederico Knabben. All rights reserved.
|
||||
|
||||
Licensed under the terms of any of the following licenses at your choice:
|
||||
|
||||
* GNU General Public License Version 2 or later (the "GPL"):
|
||||
http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
* GNU Lesser General Public License Version 2.1 or later (the "LGPL"):
|
||||
http://www.gnu.org/licenses/lgpl.html
|
||||
|
||||
* Mozilla Public License Version 1.1 or later (the "MPL"):
|
||||
http://www.mozilla.org/MPL/MPL-1.1.html
|
||||
|
||||
You are not required to, but if you want to explicitly declare the 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.
|
||||
|
||||
Sources of Intellectual Property Included in this plugin
|
||||
--------------------------------------------------------
|
||||
|
||||
Where not otherwise indicated, all plugin content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, the plugin will incorporate work done by developers outside of CKSource with their express permission.
|
||||
|
||||
Trademarks
|
||||
----------
|
||||
|
||||
CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
|
||||
Software License Agreement
|
||||
==========================
|
||||
|
||||
**CKEditor SCAYT Plugin**
|
||||
Copyright © 2012, [CKSource](http://cksource.com) - Frederico Knabben. All rights reserved.
|
||||
|
||||
Licensed under the terms of any of the following licenses at your choice:
|
||||
|
||||
* GNU General Public License Version 2 or later (the "GPL"):
|
||||
http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
* GNU Lesser General Public License Version 2.1 or later (the "LGPL"):
|
||||
http://www.gnu.org/licenses/lgpl.html
|
||||
|
||||
* Mozilla Public License Version 1.1 or later (the "MPL"):
|
||||
http://www.mozilla.org/MPL/MPL-1.1.html
|
||||
|
||||
You are not required to, but if you want to explicitly declare the 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.
|
||||
|
||||
Sources of Intellectual Property Included in this plugin
|
||||
--------------------------------------------------------
|
||||
|
||||
Where not otherwise indicated, all plugin content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, the plugin will incorporate work done by developers outside of CKSource with their express permission.
|
||||
|
||||
Trademarks
|
||||
----------
|
||||
|
||||
CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
|
||||
|
||||
@ -1,25 +1,25 @@
|
||||
CKEditor SCAYT Plugin
|
||||
=====================
|
||||
|
||||
This plugin brings Spell Check As You Type (SCAYT) into up to CKEditor 4+.
|
||||
|
||||
SCAYT is a "installation-less", using the web-services of [WebSpellChecker.net](http://www.webspellchecker.net/). It's an out of the box solution.
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
1. Clone/copy this repository contents in a new "plugins/scayt" folder in your CKEditor installation.
|
||||
2. Enable the "scayt" plugin in the CKEditor configuration file (config.js):
|
||||
|
||||
config.extraPlugins = 'scayt';
|
||||
|
||||
That's all. SCAYT will appear on the editor toolbar and will be ready to use.
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html).
|
||||
|
||||
See LICENSE.md for more information.
|
||||
|
||||
Developed in cooperation with [WebSpellChecker.net](http://www.webspellchecker.net/).
|
||||
CKEditor SCAYT Plugin
|
||||
=====================
|
||||
|
||||
This plugin brings Spell Check As You Type (SCAYT) into up to CKEditor 4+.
|
||||
|
||||
SCAYT is a "installation-less", using the web-services of [WebSpellChecker.net](http://www.webspellchecker.net/). It's an out of the box solution.
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
1. Clone/copy this repository contents in a new "plugins/scayt" folder in your CKEditor installation.
|
||||
2. Enable the "scayt" plugin in the CKEditor configuration file (config.js):
|
||||
|
||||
config.extraPlugins = 'scayt';
|
||||
|
||||
That's all. SCAYT will appear on the editor toolbar and will be ready to use.
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html).
|
||||
|
||||
See LICENSE.md for more information.
|
||||
|
||||
Developed in cooperation with [WebSpellChecker.net](http://www.webspellchecker.net/).
|
||||
|
||||
@ -1,71 +1,71 @@
|
||||
a
|
||||
{
|
||||
text-decoration:none;
|
||||
padding: 2px 4px 4px 6px;
|
||||
display : block;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
margin : 0px;
|
||||
}
|
||||
|
||||
a.cke_scayt_toogle:hover,
|
||||
a.cke_scayt_toogle:focus,
|
||||
a.cke_scayt_toogle:active
|
||||
{
|
||||
border-color: #316ac5;
|
||||
background-color: #dff1ff;
|
||||
color : #000;
|
||||
cursor: pointer;
|
||||
margin : 0px;
|
||||
}
|
||||
a.cke_scayt_toogle {
|
||||
color : #316ac5;
|
||||
border-color: #fff;
|
||||
}
|
||||
.scayt_enabled a.cke_scayt_item {
|
||||
color : #316ac5;
|
||||
border-color: #fff;
|
||||
margin : 0px;
|
||||
}
|
||||
.scayt_disabled a.cke_scayt_item {
|
||||
color : gray;
|
||||
border-color : #fff;
|
||||
}
|
||||
.scayt_enabled a.cke_scayt_item:hover,
|
||||
.scayt_enabled a.cke_scayt_item:focus,
|
||||
.scayt_enabled a.cke_scayt_item:active
|
||||
{
|
||||
border-color: #316ac5;
|
||||
background-color: #dff1ff;
|
||||
color : #000;
|
||||
cursor: pointer;
|
||||
}
|
||||
.scayt_disabled a.cke_scayt_item:hover,
|
||||
.scayt_disabled a.cke_scayt_item:focus,
|
||||
.scayt_disabled a.cke_scayt_item:active
|
||||
{
|
||||
border-color: gray;
|
||||
background-color: #dff1ff;
|
||||
color : gray;
|
||||
cursor: no-drop;
|
||||
}
|
||||
.cke_scayt_set_on, .cke_scayt_set_off
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
.scayt_enabled .cke_scayt_set_on
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
.scayt_disabled .cke_scayt_set_on
|
||||
{
|
||||
display: inline;
|
||||
}
|
||||
.scayt_disabled .cke_scayt_set_off
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
.scayt_enabled .cke_scayt_set_off
|
||||
{
|
||||
display: inline;
|
||||
}
|
||||
a
|
||||
{
|
||||
text-decoration:none;
|
||||
padding: 2px 4px 4px 6px;
|
||||
display : block;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
margin : 0px;
|
||||
}
|
||||
|
||||
a.cke_scayt_toogle:hover,
|
||||
a.cke_scayt_toogle:focus,
|
||||
a.cke_scayt_toogle:active
|
||||
{
|
||||
border-color: #316ac5;
|
||||
background-color: #dff1ff;
|
||||
color : #000;
|
||||
cursor: pointer;
|
||||
margin : 0px;
|
||||
}
|
||||
a.cke_scayt_toogle {
|
||||
color : #316ac5;
|
||||
border-color: #fff;
|
||||
}
|
||||
.scayt_enabled a.cke_scayt_item {
|
||||
color : #316ac5;
|
||||
border-color: #fff;
|
||||
margin : 0px;
|
||||
}
|
||||
.scayt_disabled a.cke_scayt_item {
|
||||
color : gray;
|
||||
border-color : #fff;
|
||||
}
|
||||
.scayt_enabled a.cke_scayt_item:hover,
|
||||
.scayt_enabled a.cke_scayt_item:focus,
|
||||
.scayt_enabled a.cke_scayt_item:active
|
||||
{
|
||||
border-color: #316ac5;
|
||||
background-color: #dff1ff;
|
||||
color : #000;
|
||||
cursor: pointer;
|
||||
}
|
||||
.scayt_disabled a.cke_scayt_item:hover,
|
||||
.scayt_disabled a.cke_scayt_item:focus,
|
||||
.scayt_disabled a.cke_scayt_item:active
|
||||
{
|
||||
border-color: gray;
|
||||
background-color: #dff1ff;
|
||||
color : gray;
|
||||
cursor: no-drop;
|
||||
}
|
||||
.cke_scayt_set_on, .cke_scayt_set_off
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
.scayt_enabled .cke_scayt_set_on
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
.scayt_disabled .cke_scayt_set_on
|
||||
{
|
||||
display: inline;
|
||||
}
|
||||
.scayt_disabled .cke_scayt_set_off
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
.scayt_enabled .cke_scayt_set_off
|
||||
{
|
||||
display: inline;
|
||||
}
|
||||
|
||||
@ -1,20 +1,20 @@
|
||||
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
|
||||
cs.js Found: 118 Missing: 0
|
||||
cy.js Found: 118 Missing: 0
|
||||
de.js Found: 118 Missing: 0
|
||||
el.js Found: 16 Missing: 102
|
||||
eo.js Found: 118 Missing: 0
|
||||
et.js Found: 31 Missing: 87
|
||||
fa.js Found: 24 Missing: 94
|
||||
fi.js Found: 23 Missing: 95
|
||||
fr.js Found: 118 Missing: 0
|
||||
hr.js Found: 23 Missing: 95
|
||||
it.js Found: 118 Missing: 0
|
||||
nb.js Found: 118 Missing: 0
|
||||
nl.js Found: 118 Missing: 0
|
||||
no.js Found: 118 Missing: 0
|
||||
tr.js Found: 118 Missing: 0
|
||||
ug.js Found: 39 Missing: 79
|
||||
zh-cn.js Found: 118 Missing: 0
|
||||
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
|
||||
cs.js Found: 118 Missing: 0
|
||||
cy.js Found: 118 Missing: 0
|
||||
de.js Found: 118 Missing: 0
|
||||
el.js Found: 16 Missing: 102
|
||||
eo.js Found: 118 Missing: 0
|
||||
et.js Found: 31 Missing: 87
|
||||
fa.js Found: 24 Missing: 94
|
||||
fi.js Found: 23 Missing: 95
|
||||
fr.js Found: 118 Missing: 0
|
||||
hr.js Found: 23 Missing: 95
|
||||
it.js Found: 118 Missing: 0
|
||||
nb.js Found: 118 Missing: 0
|
||||
nl.js Found: 118 Missing: 0
|
||||
no.js Found: 118 Missing: 0
|
||||
tr.js Found: 118 Missing: 0
|
||||
ug.js Found: 39 Missing: 79
|
||||
zh-cn.js Found: 118 Missing: 0
|
||||
|
||||
@ -1,84 +1,84 @@
|
||||
/*
|
||||
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
.cke_tpl_list
|
||||
{
|
||||
border: #dcdcdc 2px solid;
|
||||
background-color: #ffffff;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
width: 100%;
|
||||
height: 220px;
|
||||
}
|
||||
|
||||
.cke_tpl_item
|
||||
{
|
||||
margin: 5px;
|
||||
padding: 7px;
|
||||
border: #eeeeee 1px solid;
|
||||
*width: 88%;
|
||||
}
|
||||
|
||||
.cke_tpl_preview
|
||||
{
|
||||
border-collapse: separate;
|
||||
text-indent:0;
|
||||
width: 100%;
|
||||
}
|
||||
.cke_tpl_preview td
|
||||
{
|
||||
padding: 2px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.cke_tpl_preview .cke_tpl_preview_img
|
||||
{
|
||||
width: 100px;
|
||||
}
|
||||
.cke_tpl_preview span
|
||||
{
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.cke_tpl_title
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.cke_tpl_list a:hover .cke_tpl_item,
|
||||
.cke_tpl_list a:focus .cke_tpl_item,
|
||||
.cke_tpl_list a:active .cke_tpl_item
|
||||
{
|
||||
border: #ff9933 1px solid;
|
||||
background-color: #fffacd;
|
||||
}
|
||||
|
||||
.cke_tpl_list a:hover *,
|
||||
.cke_tpl_list a:focus *,
|
||||
.cke_tpl_list a:active *
|
||||
{
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* IE Quirks contextual selectors children will not get :hover transition until
|
||||
the hover style of the link itself contains certain CSS declarations. */
|
||||
.cke_browser_quirks .cke_tpl_list a:active,
|
||||
.cke_browser_quirks .cke_tpl_list a:hover,
|
||||
.cke_browser_quirks .cke_tpl_list a:focus
|
||||
{
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
.cke_hc .cke_tpl_list a:hover .cke_tpl_item,
|
||||
.cke_hc .cke_tpl_list a:focus .cke_tpl_item,
|
||||
.cke_hc .cke_tpl_list a:active .cke_tpl_item
|
||||
{
|
||||
border-width: 3px;
|
||||
}
|
||||
|
||||
.cke_tpl_empty, .cke_tpl_loading
|
||||
{
|
||||
text-align: center;
|
||||
padding: 5px;
|
||||
}
|
||||
/*
|
||||
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
.cke_tpl_list
|
||||
{
|
||||
border: #dcdcdc 2px solid;
|
||||
background-color: #ffffff;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
width: 100%;
|
||||
height: 220px;
|
||||
}
|
||||
|
||||
.cke_tpl_item
|
||||
{
|
||||
margin: 5px;
|
||||
padding: 7px;
|
||||
border: #eeeeee 1px solid;
|
||||
*width: 88%;
|
||||
}
|
||||
|
||||
.cke_tpl_preview
|
||||
{
|
||||
border-collapse: separate;
|
||||
text-indent:0;
|
||||
width: 100%;
|
||||
}
|
||||
.cke_tpl_preview td
|
||||
{
|
||||
padding: 2px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.cke_tpl_preview .cke_tpl_preview_img
|
||||
{
|
||||
width: 100px;
|
||||
}
|
||||
.cke_tpl_preview span
|
||||
{
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.cke_tpl_title
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.cke_tpl_list a:hover .cke_tpl_item,
|
||||
.cke_tpl_list a:focus .cke_tpl_item,
|
||||
.cke_tpl_list a:active .cke_tpl_item
|
||||
{
|
||||
border: #ff9933 1px solid;
|
||||
background-color: #fffacd;
|
||||
}
|
||||
|
||||
.cke_tpl_list a:hover *,
|
||||
.cke_tpl_list a:focus *,
|
||||
.cke_tpl_list a:active *
|
||||
{
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* IE Quirks contextual selectors children will not get :hover transition until
|
||||
the hover style of the link itself contains certain CSS declarations. */
|
||||
.cke_browser_quirks .cke_tpl_list a:active,
|
||||
.cke_browser_quirks .cke_tpl_list a:hover,
|
||||
.cke_browser_quirks .cke_tpl_list a:focus
|
||||
{
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
.cke_hc .cke_tpl_list a:hover .cke_tpl_item,
|
||||
.cke_hc .cke_tpl_list a:focus .cke_tpl_item,
|
||||
.cke_hc .cke_tpl_list a:active .cke_tpl_item
|
||||
{
|
||||
border-width: 3px;
|
||||
}
|
||||
|
||||
.cke_tpl_empty, .cke_tpl_loading
|
||||
{
|
||||
text-align: center;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
@ -1,28 +1,28 @@
|
||||
Software License Agreement
|
||||
==========================
|
||||
|
||||
**CKEditor WSC Plugin**
|
||||
Copyright © 2012, [CKSource](http://cksource.com) - Frederico Knabben. All rights reserved.
|
||||
|
||||
Licensed under the terms of any of the following licenses at your choice:
|
||||
|
||||
* GNU General Public License Version 2 or later (the "GPL"):
|
||||
http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
* GNU Lesser General Public License Version 2.1 or later (the "LGPL"):
|
||||
http://www.gnu.org/licenses/lgpl.html
|
||||
|
||||
* Mozilla Public License Version 1.1 or later (the "MPL"):
|
||||
http://www.mozilla.org/MPL/MPL-1.1.html
|
||||
|
||||
You are not required to, but if you want to explicitly declare the 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.
|
||||
|
||||
Sources of Intellectual Property Included in this plugin
|
||||
--------------------------------------------------------
|
||||
|
||||
Where not otherwise indicated, all plugin content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, the plugin will incorporate work done by developers outside of CKSource with their express permission.
|
||||
|
||||
Trademarks
|
||||
----------
|
||||
|
||||
CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
|
||||
Software License Agreement
|
||||
==========================
|
||||
|
||||
**CKEditor WSC Plugin**
|
||||
Copyright © 2012, [CKSource](http://cksource.com) - Frederico Knabben. All rights reserved.
|
||||
|
||||
Licensed under the terms of any of the following licenses at your choice:
|
||||
|
||||
* GNU General Public License Version 2 or later (the "GPL"):
|
||||
http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
* GNU Lesser General Public License Version 2.1 or later (the "LGPL"):
|
||||
http://www.gnu.org/licenses/lgpl.html
|
||||
|
||||
* Mozilla Public License Version 1.1 or later (the "MPL"):
|
||||
http://www.mozilla.org/MPL/MPL-1.1.html
|
||||
|
||||
You are not required to, but if you want to explicitly declare the 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.
|
||||
|
||||
Sources of Intellectual Property Included in this plugin
|
||||
--------------------------------------------------------
|
||||
|
||||
Where not otherwise indicated, all plugin content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, the plugin will incorporate work done by developers outside of CKSource with their express permission.
|
||||
|
||||
Trademarks
|
||||
----------
|
||||
|
||||
CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
|
||||
|
||||
@ -1,25 +1,25 @@
|
||||
CKEditor WebSpellChecker Plugin
|
||||
===============================
|
||||
|
||||
This plugin brings Web Spell Checker (WSC) into CKEditor.
|
||||
|
||||
WSC is "installation-less", using the web-services of [WebSpellChecker.net](http://www.webspellchecker.net/). It's an out of the box solution.
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
1. Clone/copy this repository contents in a new "plugins/wsc" folder in your CKEditor installation.
|
||||
2. Enable the "wsc" plugin in the CKEditor configuration file (config.js):
|
||||
|
||||
config.extraPlugins = 'wsc';
|
||||
|
||||
That's all. WSC will appear on the editor toolbar and will be ready to use.
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html).
|
||||
|
||||
See LICENSE.md for more information.
|
||||
|
||||
Developed in cooperation with [WebSpellChecker.net](http://www.webspellchecker.net/).
|
||||
CKEditor WebSpellChecker Plugin
|
||||
===============================
|
||||
|
||||
This plugin brings Web Spell Checker (WSC) into CKEditor.
|
||||
|
||||
WSC is "installation-less", using the web-services of [WebSpellChecker.net](http://www.webspellchecker.net/). It's an out of the box solution.
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
1. Clone/copy this repository contents in a new "plugins/wsc" folder in your CKEditor installation.
|
||||
2. Enable the "wsc" plugin in the CKEditor configuration file (config.js):
|
||||
|
||||
config.extraPlugins = 'wsc';
|
||||
|
||||
That's all. WSC will appear on the editor toolbar and will be ready to use.
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html).
|
||||
|
||||
See LICENSE.md for more information.
|
||||
|
||||
Developed in cooperation with [WebSpellChecker.net](http://www.webspellchecker.net/).
|
||||
|
||||
@ -1,66 +1,66 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<script type="text/javascript">
|
||||
|
||||
function gup( name )
|
||||
{
|
||||
name = name.replace( /[\[]/, '\\\[' ).replace( /[\]]/, '\\\]' ) ;
|
||||
var regexS = '[\\?&]' + name + '=([^&#]*)' ;
|
||||
var regex = new RegExp( regexS ) ;
|
||||
var results = regex.exec( window.location.href ) ;
|
||||
|
||||
if ( results )
|
||||
return results[ 1 ] ;
|
||||
else
|
||||
return '' ;
|
||||
}
|
||||
|
||||
var interval;
|
||||
|
||||
function sendData2Master()
|
||||
{
|
||||
var destination = window.parent.parent ;
|
||||
try
|
||||
{
|
||||
if ( destination.XDTMaster )
|
||||
{
|
||||
var t = destination.XDTMaster.read( [ gup( 'cmd' ), gup( 'data' ) ] ) ;
|
||||
window.clearInterval( interval ) ;
|
||||
}
|
||||
}
|
||||
catch (e) {}
|
||||
}
|
||||
|
||||
function OnMessage (event) {
|
||||
var message = event.data;
|
||||
var destination = window.parent.parent;
|
||||
destination.XDTMaster.read( [ 'end', message, 'fpm' ] ) ;
|
||||
}
|
||||
|
||||
function listenPostMessage() {
|
||||
if (window.addEventListener) { // all browsers except IE before version 9
|
||||
window.addEventListener ("message", OnMessage, false);
|
||||
}else {
|
||||
if (window.attachEvent) { // IE before version 9
|
||||
window.attachEvent("onmessage", OnMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onLoad()
|
||||
{
|
||||
interval = window.setInterval( sendData2Master, 100 );
|
||||
listenPostMessage();
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="onLoad()"><p></p></body>
|
||||
</html>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<script type="text/javascript">
|
||||
|
||||
function gup( name )
|
||||
{
|
||||
name = name.replace( /[\[]/, '\\\[' ).replace( /[\]]/, '\\\]' ) ;
|
||||
var regexS = '[\\?&]' + name + '=([^&#]*)' ;
|
||||
var regex = new RegExp( regexS ) ;
|
||||
var results = regex.exec( window.location.href ) ;
|
||||
|
||||
if ( results )
|
||||
return results[ 1 ] ;
|
||||
else
|
||||
return '' ;
|
||||
}
|
||||
|
||||
var interval;
|
||||
|
||||
function sendData2Master()
|
||||
{
|
||||
var destination = window.parent.parent ;
|
||||
try
|
||||
{
|
||||
if ( destination.XDTMaster )
|
||||
{
|
||||
var t = destination.XDTMaster.read( [ gup( 'cmd' ), gup( 'data' ) ] ) ;
|
||||
window.clearInterval( interval ) ;
|
||||
}
|
||||
}
|
||||
catch (e) {}
|
||||
}
|
||||
|
||||
function OnMessage (event) {
|
||||
var message = event.data;
|
||||
var destination = window.parent.parent;
|
||||
destination.XDTMaster.read( [ 'end', message, 'fpm' ] ) ;
|
||||
}
|
||||
|
||||
function listenPostMessage() {
|
||||
if (window.addEventListener) { // all browsers except IE before version 9
|
||||
window.addEventListener ("message", OnMessage, false);
|
||||
}else {
|
||||
if (window.attachEvent) { // IE before version 9
|
||||
window.attachEvent("onmessage", OnMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onLoad()
|
||||
{
|
||||
interval = window.setInterval( sendData2Master, 100 );
|
||||
listenPostMessage();
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="onLoad()"><p></p></body>
|
||||
</html>
|
||||
|
||||
@ -1,52 +1,52 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<script type="text/javascript">
|
||||
|
||||
function doLoadScript( url )
|
||||
{
|
||||
if ( !url )
|
||||
return false ;
|
||||
|
||||
var s = document.createElement( "script" ) ;
|
||||
s.type = "text/javascript" ;
|
||||
s.src = url ;
|
||||
document.getElementsByTagName( "head" )[ 0 ].appendChild( s ) ;
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
var opener;
|
||||
function tryLoad()
|
||||
{
|
||||
opener = window.parent;
|
||||
|
||||
// get access to global parameters
|
||||
var oParams = window.opener.oldFramesetPageParams;
|
||||
|
||||
// make frameset rows string prepare
|
||||
var sFramesetRows = ( parseInt( oParams.firstframeh, 10 ) || '30') + ",*," + ( parseInt( oParams.thirdframeh, 10 ) || '150' ) + ',0' ;
|
||||
document.getElementById( 'itFrameset' ).rows = sFramesetRows ;
|
||||
|
||||
// dynamic including init frames and crossdomain transport code
|
||||
// from config sproxy_js_frameset url
|
||||
var addScriptUrl = oParams.sproxy_js_frameset ;
|
||||
doLoadScript( addScriptUrl ) ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<frameset id="itFrameset" onload="tryLoad();" border="0" rows="30,*,*,0">
|
||||
<frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="0" marginwidth="2" src="" name="navbar"></frame>
|
||||
<frame scrolling="auto" framespacing="0" frameborder="0" noresize="noresize" marginheight="0" marginwidth="0" src="" name="mid"></frame>
|
||||
<frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="1" marginwidth="1" src="" name="bot"></frame>
|
||||
<frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="1" marginwidth="1" src="" name="spellsuggestall"></frame>
|
||||
</frameset>
|
||||
</html>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<script type="text/javascript">
|
||||
|
||||
function doLoadScript( url )
|
||||
{
|
||||
if ( !url )
|
||||
return false ;
|
||||
|
||||
var s = document.createElement( "script" ) ;
|
||||
s.type = "text/javascript" ;
|
||||
s.src = url ;
|
||||
document.getElementsByTagName( "head" )[ 0 ].appendChild( s ) ;
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
var opener;
|
||||
function tryLoad()
|
||||
{
|
||||
opener = window.parent;
|
||||
|
||||
// get access to global parameters
|
||||
var oParams = window.opener.oldFramesetPageParams;
|
||||
|
||||
// make frameset rows string prepare
|
||||
var sFramesetRows = ( parseInt( oParams.firstframeh, 10 ) || '30') + ",*," + ( parseInt( oParams.thirdframeh, 10 ) || '150' ) + ',0' ;
|
||||
document.getElementById( 'itFrameset' ).rows = sFramesetRows ;
|
||||
|
||||
// dynamic including init frames and crossdomain transport code
|
||||
// from config sproxy_js_frameset url
|
||||
var addScriptUrl = oParams.sproxy_js_frameset ;
|
||||
doLoadScript( addScriptUrl ) ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<frameset id="itFrameset" onload="tryLoad();" border="0" rows="30,*,*,0">
|
||||
<frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="0" marginwidth="2" src="" name="navbar"></frame>
|
||||
<frame scrolling="auto" framespacing="0" frameborder="0" noresize="noresize" marginheight="0" marginwidth="0" src="" name="mid"></frame>
|
||||
<frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="1" marginwidth="1" src="" name="bot"></frame>
|
||||
<frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="1" marginwidth="1" src="" name="spellsuggestall"></frame>
|
||||
</frameset>
|
||||
</html>
|
||||
|
||||
@ -1,82 +1,82 @@
|
||||
/*
|
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
html, body
|
||||
{
|
||||
background-color: transparent;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
body
|
||||
{
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
body, td, input, select, textarea
|
||||
{
|
||||
font-size: 11px;
|
||||
font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana;
|
||||
}
|
||||
|
||||
.midtext
|
||||
{
|
||||
padding:0px;
|
||||
margin:10px;
|
||||
}
|
||||
|
||||
.midtext p
|
||||
{
|
||||
padding:0px;
|
||||
margin:10px;
|
||||
}
|
||||
|
||||
.Button
|
||||
{
|
||||
border: #737357 1px solid;
|
||||
color: #3b3b1f;
|
||||
background-color: #c7c78f;
|
||||
}
|
||||
|
||||
.PopupTabArea
|
||||
{
|
||||
color: #737357;
|
||||
background-color: #e3e3c7;
|
||||
}
|
||||
|
||||
.PopupTitleBorder
|
||||
{
|
||||
border-bottom: #d5d59d 1px solid;
|
||||
}
|
||||
.PopupTabEmptyArea
|
||||
{
|
||||
padding-left: 10px;
|
||||
border-bottom: #d5d59d 1px solid;
|
||||
}
|
||||
|
||||
.PopupTab, .PopupTabSelected
|
||||
{
|
||||
border-right: #d5d59d 1px solid;
|
||||
border-top: #d5d59d 1px solid;
|
||||
border-left: #d5d59d 1px solid;
|
||||
padding: 3px 5px 3px 5px;
|
||||
color: #737357;
|
||||
}
|
||||
|
||||
.PopupTab
|
||||
{
|
||||
margin-top: 1px;
|
||||
border-bottom: #d5d59d 1px solid;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.PopupTabSelected
|
||||
{
|
||||
font-weight: bold;
|
||||
cursor: default;
|
||||
padding-top: 4px;
|
||||
border-bottom: #f1f1e3 1px solid;
|
||||
background-color: #f1f1e3;
|
||||
}
|
||||
/*
|
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
html, body
|
||||
{
|
||||
background-color: transparent;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
body
|
||||
{
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
body, td, input, select, textarea
|
||||
{
|
||||
font-size: 11px;
|
||||
font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana;
|
||||
}
|
||||
|
||||
.midtext
|
||||
{
|
||||
padding:0px;
|
||||
margin:10px;
|
||||
}
|
||||
|
||||
.midtext p
|
||||
{
|
||||
padding:0px;
|
||||
margin:10px;
|
||||
}
|
||||
|
||||
.Button
|
||||
{
|
||||
border: #737357 1px solid;
|
||||
color: #3b3b1f;
|
||||
background-color: #c7c78f;
|
||||
}
|
||||
|
||||
.PopupTabArea
|
||||
{
|
||||
color: #737357;
|
||||
background-color: #e3e3c7;
|
||||
}
|
||||
|
||||
.PopupTitleBorder
|
||||
{
|
||||
border-bottom: #d5d59d 1px solid;
|
||||
}
|
||||
.PopupTabEmptyArea
|
||||
{
|
||||
padding-left: 10px;
|
||||
border-bottom: #d5d59d 1px solid;
|
||||
}
|
||||
|
||||
.PopupTab, .PopupTabSelected
|
||||
{
|
||||
border-right: #d5d59d 1px solid;
|
||||
border-top: #d5d59d 1px solid;
|
||||
border-left: #d5d59d 1px solid;
|
||||
padding: 3px 5px 3px 5px;
|
||||
color: #737357;
|
||||
}
|
||||
|
||||
.PopupTab
|
||||
{
|
||||
margin-top: 1px;
|
||||
border-bottom: #d5d59d 1px solid;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.PopupTabSelected
|
||||
{
|
||||
font-weight: bold;
|
||||
cursor: default;
|
||||
padding-top: 4px;
|
||||
border-bottom: #f1f1e3 1px solid;
|
||||
background-color: #f1f1e3;
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1,128 +1,128 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CKEditor Sample</title>
|
||||
<script src="../ckeditor.js"></script>
|
||||
<script src="js/sample.js"></script>
|
||||
<link rel="stylesheet" href="css/samples.css">
|
||||
<link rel="stylesheet" href="toolbarconfigurator/lib/codemirror/neo.css">
|
||||
</head>
|
||||
<body id="main">
|
||||
|
||||
<nav class="navigation-a">
|
||||
<div class="grid-container">
|
||||
<ul class="navigation-a-left grid-width-70">
|
||||
<li><a href="http://ckeditor.com">Project Homepage</a></li>
|
||||
<li><a href="http://dev.ckeditor.com/">I found a bug</a></li>
|
||||
<li><a href="http://github.com/ckeditor/ckeditor-dev" class="icon-pos-right icon-navigation-a-github">Fork CKEditor on GitHub</a></li>
|
||||
</ul>
|
||||
<ul class="navigation-a-right grid-width-30">
|
||||
<li><a href="http://ckeditor.com/blog-list">CKEditor Blog</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<header class="header-a">
|
||||
<div class="grid-container">
|
||||
<h1 class="header-a-logo grid-width-30">
|
||||
<a href="index.html"><img src="img/logo.png" alt="CKEditor Sample"></a>
|
||||
</h1>
|
||||
|
||||
<nav class="navigation-b grid-width-70">
|
||||
<ul>
|
||||
<li><a href="index.html" class="button-a button-a-background">Start</a></li>
|
||||
<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>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<div class="adjoined-top">
|
||||
<div class="grid-container">
|
||||
<div class="content grid-width-100">
|
||||
<h1>Congratulations!</h1>
|
||||
<p>
|
||||
If you can see CKEditor below, it means that the installation succeeded.
|
||||
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.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="adjoined-bottom">
|
||||
<div class="grid-container">
|
||||
<div class="grid-width-100">
|
||||
<div id="editor">
|
||||
<h1>Hello world!</h1>
|
||||
<p>I'm an instance of <a href="http://ckeditor.com">CKEditor</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid-container">
|
||||
<div class="content grid-width-100">
|
||||
<section id="sample-customize">
|
||||
<h2>Customize Your Editor</h2>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<span style="padding-right: 0.1px;">};</span></code></pre>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Toolbar Configuration</h2>
|
||||
<p>If you want to reorder toolbar buttons or remove some of them, check <a href="toolbarconfigurator/index.html">this handy tool</a>!</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>More Samples!</h2>
|
||||
<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>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Developer's Guide</h2>
|
||||
<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>
|
||||
<ul>
|
||||
<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>
|
||||
<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>
|
||||
</ul>
|
||||
<p>When you have the basics sorted out, feel free to browse some more advanced sections like:</p>
|
||||
<ul>
|
||||
<li><a href="http://docs.ckeditor.com/#!/guide/dev_features">Functionality Overview</a> – Descriptions and samples of various editor features.</li>
|
||||
<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>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>CKEditor JavaScript API</h2>
|
||||
<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>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="footer-a grid-container">
|
||||
<div class="grid-container">
|
||||
<p class="grid-width-100">
|
||||
CKEditor – The text editor for the Internet – <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p class="grid-width-100" id="copy">
|
||||
Copyright © 2003-2016, <a class="samples" href="http://cksource.com/">CKSource</a> – Frederico Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script>
|
||||
initSample();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CKEditor Sample</title>
|
||||
<script src="../ckeditor.js"></script>
|
||||
<script src="js/sample.js"></script>
|
||||
<link rel="stylesheet" href="css/samples.css">
|
||||
<link rel="stylesheet" href="toolbarconfigurator/lib/codemirror/neo.css">
|
||||
</head>
|
||||
<body id="main">
|
||||
|
||||
<nav class="navigation-a">
|
||||
<div class="grid-container">
|
||||
<ul class="navigation-a-left grid-width-70">
|
||||
<li><a href="http://ckeditor.com">Project Homepage</a></li>
|
||||
<li><a href="http://dev.ckeditor.com/">I found a bug</a></li>
|
||||
<li><a href="http://github.com/ckeditor/ckeditor-dev" class="icon-pos-right icon-navigation-a-github">Fork CKEditor on GitHub</a></li>
|
||||
</ul>
|
||||
<ul class="navigation-a-right grid-width-30">
|
||||
<li><a href="http://ckeditor.com/blog-list">CKEditor Blog</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<header class="header-a">
|
||||
<div class="grid-container">
|
||||
<h1 class="header-a-logo grid-width-30">
|
||||
<a href="index.html"><img src="img/logo.png" alt="CKEditor Sample"></a>
|
||||
</h1>
|
||||
|
||||
<nav class="navigation-b grid-width-70">
|
||||
<ul>
|
||||
<li><a href="index.html" class="button-a button-a-background">Start</a></li>
|
||||
<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>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<div class="adjoined-top">
|
||||
<div class="grid-container">
|
||||
<div class="content grid-width-100">
|
||||
<h1>Congratulations!</h1>
|
||||
<p>
|
||||
If you can see CKEditor below, it means that the installation succeeded.
|
||||
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.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="adjoined-bottom">
|
||||
<div class="grid-container">
|
||||
<div class="grid-width-100">
|
||||
<div id="editor">
|
||||
<h1>Hello world!</h1>
|
||||
<p>I'm an instance of <a href="http://ckeditor.com">CKEditor</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid-container">
|
||||
<div class="content grid-width-100">
|
||||
<section id="sample-customize">
|
||||
<h2>Customize Your Editor</h2>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<span style="padding-right: 0.1px;">};</span></code></pre>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Toolbar Configuration</h2>
|
||||
<p>If you want to reorder toolbar buttons or remove some of them, check <a href="toolbarconfigurator/index.html">this handy tool</a>!</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>More Samples!</h2>
|
||||
<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>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Developer's Guide</h2>
|
||||
<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>
|
||||
<ul>
|
||||
<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>
|
||||
<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>
|
||||
</ul>
|
||||
<p>When you have the basics sorted out, feel free to browse some more advanced sections like:</p>
|
||||
<ul>
|
||||
<li><a href="http://docs.ckeditor.com/#!/guide/dev_features">Functionality Overview</a> – Descriptions and samples of various editor features.</li>
|
||||
<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>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>CKEditor JavaScript API</h2>
|
||||
<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>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="footer-a grid-container">
|
||||
<div class="grid-container">
|
||||
<p class="grid-width-100">
|
||||
CKEditor – The text editor for the Internet – <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p class="grid-width-100" id="copy">
|
||||
Copyright © 2003-2016, <a class="samples" href="http://cksource.com/">CKSource</a> – Frederico Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script>
|
||||
initSample();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -1,53 +1,53 @@
|
||||
/**
|
||||
* Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/* exported initSample */
|
||||
|
||||
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 )
|
||||
CKEDITOR.tools.enableHtml5Elements( document );
|
||||
|
||||
// The trick to keep the editor in the sample quite small
|
||||
// unless user specified own height.
|
||||
CKEDITOR.config.height = 150;
|
||||
CKEDITOR.config.width = 'auto';
|
||||
|
||||
var initSample = ( function() {
|
||||
var wysiwygareaAvailable = isWysiwygareaAvailable(),
|
||||
isBBCodeBuiltIn = !!CKEDITOR.plugins.get( 'bbcode' );
|
||||
|
||||
return function() {
|
||||
var editorElement = CKEDITOR.document.getById( 'editor' );
|
||||
|
||||
// :(((
|
||||
if ( isBBCodeBuiltIn ) {
|
||||
editorElement.setHtml(
|
||||
'Hello world!\n\n' +
|
||||
'I\'m an instance of [url=http://ckeditor.com]CKEditor[/url].'
|
||||
);
|
||||
}
|
||||
|
||||
// Depending on the wysiwygare plugin availability initialize classic or inline editor.
|
||||
if ( wysiwygareaAvailable ) {
|
||||
CKEDITOR.replace( 'editor' );
|
||||
} else {
|
||||
editorElement.setAttribute( 'contenteditable', 'true' );
|
||||
CKEDITOR.inline( 'editor' );
|
||||
|
||||
// TODO we can consider displaying some info box that
|
||||
// without wysiwygarea the classic editor may not work.
|
||||
}
|
||||
};
|
||||
|
||||
function isWysiwygareaAvailable() {
|
||||
// If in development mode, then the wysiwygarea must be available.
|
||||
// Split REV into two strings so builder does not replace it :D.
|
||||
if ( CKEDITOR.revision == ( '%RE' + 'V%' ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return !!CKEDITOR.plugins.get( 'wysiwygarea' );
|
||||
}
|
||||
} )();
|
||||
|
||||
/**
|
||||
* Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
/* exported initSample */
|
||||
|
||||
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 )
|
||||
CKEDITOR.tools.enableHtml5Elements( document );
|
||||
|
||||
// The trick to keep the editor in the sample quite small
|
||||
// unless user specified own height.
|
||||
CKEDITOR.config.height = 150;
|
||||
CKEDITOR.config.width = 'auto';
|
||||
|
||||
var initSample = ( function() {
|
||||
var wysiwygareaAvailable = isWysiwygareaAvailable(),
|
||||
isBBCodeBuiltIn = !!CKEDITOR.plugins.get( 'bbcode' );
|
||||
|
||||
return function() {
|
||||
var editorElement = CKEDITOR.document.getById( 'editor' );
|
||||
|
||||
// :(((
|
||||
if ( isBBCodeBuiltIn ) {
|
||||
editorElement.setHtml(
|
||||
'Hello world!\n\n' +
|
||||
'I\'m an instance of [url=http://ckeditor.com]CKEditor[/url].'
|
||||
);
|
||||
}
|
||||
|
||||
// Depending on the wysiwygare plugin availability initialize classic or inline editor.
|
||||
if ( wysiwygareaAvailable ) {
|
||||
CKEDITOR.replace( 'editor' );
|
||||
} else {
|
||||
editorElement.setAttribute( 'contenteditable', 'true' );
|
||||
CKEDITOR.inline( 'editor' );
|
||||
|
||||
// TODO we can consider displaying some info box that
|
||||
// without wysiwygarea the classic editor may not work.
|
||||
}
|
||||
};
|
||||
|
||||
function isWysiwygareaAvailable() {
|
||||
// If in development mode, then the wysiwygarea must be available.
|
||||
// Split REV into two strings so builder does not replace it :D.
|
||||
if ( CKEDITOR.revision == ( '%RE' + 'V%' ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return !!CKEDITOR.plugins.get( 'wysiwygarea' );
|
||||
}
|
||||
} )();
|
||||
|
||||
|
||||
@ -1,85 +1,85 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Ajax — CKEditor Sample</title>
|
||||
<script src="../../ckeditor.js"></script>
|
||||
<link rel="stylesheet" href="sample.css">
|
||||
<script>
|
||||
|
||||
var editor, html = '';
|
||||
|
||||
function createEditor() {
|
||||
if ( editor )
|
||||
return;
|
||||
|
||||
// Create a new editor inside the <div id="editor">, setting its value to html
|
||||
var config = {};
|
||||
editor = CKEDITOR.appendTo( 'editor', config, html );
|
||||
}
|
||||
|
||||
function removeEditor() {
|
||||
if ( !editor )
|
||||
return;
|
||||
|
||||
// Retrieve the editor contents. In an Ajax application, this data would be
|
||||
// sent to the server or used in any other way.
|
||||
document.getElementById( 'editorcontents' ).innerHTML = html = editor.getData();
|
||||
document.getElementById( 'contents' ).style.display = '';
|
||||
|
||||
// Destroy the editor.
|
||||
editor.destroy();
|
||||
editor = null;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="index.html">CKEditor Samples</a> » Create and Destroy Editor Instances for Ajax Applications
|
||||
</h1>
|
||||
<div class="warning deprecated">
|
||||
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>.
|
||||
</div>
|
||||
<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><div></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>
|
||||
<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">
|
||||
</p>
|
||||
<!-- This div will hold the editor. -->
|
||||
<div id="editor">
|
||||
</div>
|
||||
<div id="contents" style="display: none">
|
||||
<p>
|
||||
Edited Contents:
|
||||
</p>
|
||||
<!-- This div will be used to display the editor contents. -->
|
||||
<div id="editorcontents">
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2016, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Ajax — CKEditor Sample</title>
|
||||
<script src="../../ckeditor.js"></script>
|
||||
<link rel="stylesheet" href="sample.css">
|
||||
<script>
|
||||
|
||||
var editor, html = '';
|
||||
|
||||
function createEditor() {
|
||||
if ( editor )
|
||||
return;
|
||||
|
||||
// Create a new editor inside the <div id="editor">, setting its value to html
|
||||
var config = {};
|
||||
editor = CKEDITOR.appendTo( 'editor', config, html );
|
||||
}
|
||||
|
||||
function removeEditor() {
|
||||
if ( !editor )
|
||||
return;
|
||||
|
||||
// Retrieve the editor contents. In an Ajax application, this data would be
|
||||
// sent to the server or used in any other way.
|
||||
document.getElementById( 'editorcontents' ).innerHTML = html = editor.getData();
|
||||
document.getElementById( 'contents' ).style.display = '';
|
||||
|
||||
// Destroy the editor.
|
||||
editor.destroy();
|
||||
editor = null;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="index.html">CKEditor Samples</a> » Create and Destroy Editor Instances for Ajax Applications
|
||||
</h1>
|
||||
<div class="warning deprecated">
|
||||
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>.
|
||||
</div>
|
||||
<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><div></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>
|
||||
<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">
|
||||
</p>
|
||||
<!-- This div will hold the editor. -->
|
||||
<div id="editor">
|
||||
</div>
|
||||
<div id="contents" style="display: none">
|
||||
<p>
|
||||
Edited Contents:
|
||||
</p>
|
||||
<!-- This div will be used to display the editor contents. -->
|
||||
<div id="editorcontents">
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2016, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -1,210 +1,210 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>API Usage — CKEditor Sample</title>
|
||||
<script src="../../ckeditor.js"></script>
|
||||
<link href="sample.css" rel="stylesheet">
|
||||
<script>
|
||||
|
||||
// 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 = 'Instance <code>' + ev.editor.name + '<\/code> loaded.';
|
||||
|
||||
// Show this sample buttons.
|
||||
document.getElementById( 'eButtons' ).style.display = 'block';
|
||||
});
|
||||
|
||||
function InsertHTML() {
|
||||
// Get the editor instance that we want to interact with.
|
||||
var editor = CKEDITOR.instances.editor1;
|
||||
var value = document.getElementById( 'htmlArea' ).value;
|
||||
|
||||
// Check the active editing mode.
|
||||
if ( editor.mode == 'wysiwyg' )
|
||||
{
|
||||
// Insert HTML code.
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertHtml
|
||||
editor.insertHtml( value );
|
||||
}
|
||||
else
|
||||
alert( 'You must be in WYSIWYG mode!' );
|
||||
}
|
||||
|
||||
function InsertText() {
|
||||
// Get the editor instance that we want to interact with.
|
||||
var editor = CKEDITOR.instances.editor1;
|
||||
var value = document.getElementById( 'txtArea' ).value;
|
||||
|
||||
// Check the active editing mode.
|
||||
if ( editor.mode == 'wysiwyg' )
|
||||
{
|
||||
// Insert as plain text.
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertText
|
||||
editor.insertText( value );
|
||||
}
|
||||
else
|
||||
alert( 'You must be in WYSIWYG mode!' );
|
||||
}
|
||||
|
||||
function SetContents() {
|
||||
// Get the editor instance that we want to interact with.
|
||||
var editor = CKEDITOR.instances.editor1;
|
||||
var value = document.getElementById( 'htmlArea' ).value;
|
||||
|
||||
// Set editor contents (replace current contents).
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setData
|
||||
editor.setData( value );
|
||||
}
|
||||
|
||||
function GetContents() {
|
||||
// Get the editor instance that you want to interact with.
|
||||
var editor = CKEDITOR.instances.editor1;
|
||||
|
||||
// Get editor contents
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-getData
|
||||
alert( editor.getData() );
|
||||
}
|
||||
|
||||
function ExecuteCommand( commandName ) {
|
||||
// Get the editor instance that we want to interact with.
|
||||
var editor = CKEDITOR.instances.editor1;
|
||||
|
||||
// Check the active editing mode.
|
||||
if ( editor.mode == 'wysiwyg' )
|
||||
{
|
||||
// Execute the command.
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-execCommand
|
||||
editor.execCommand( commandName );
|
||||
}
|
||||
else
|
||||
alert( 'You must be in WYSIWYG mode!' );
|
||||
}
|
||||
|
||||
function CheckDirty() {
|
||||
// Get the editor instance that we want to interact with.
|
||||
var editor = CKEDITOR.instances.editor1;
|
||||
// Checks whether the current editor contents present changes when compared
|
||||
// to the contents loaded into the editor at startup
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-checkDirty
|
||||
alert( editor.checkDirty() );
|
||||
}
|
||||
|
||||
function ResetDirty() {
|
||||
// Get the editor instance that we want to interact with.
|
||||
var editor = CKEDITOR.instances.editor1;
|
||||
// Resets the "dirty state" of the editor (see CheckDirty())
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-resetDirty
|
||||
editor.resetDirty();
|
||||
alert( 'The "IsDirty" status has been reset' );
|
||||
}
|
||||
|
||||
function Focus() {
|
||||
CKEDITOR.instances.editor1.focus();
|
||||
}
|
||||
|
||||
function onFocus() {
|
||||
document.getElementById( 'eMessage' ).innerHTML = '<b>' + this.name + ' is focused </b>';
|
||||
}
|
||||
|
||||
function onBlur() {
|
||||
document.getElementById( 'eMessage' ).innerHTML = this.name + ' lost focus';
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="index.html">CKEditor Samples</a> » Using CKEditor JavaScript API
|
||||
</h1>
|
||||
<div class="warning deprecated">
|
||||
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>.
|
||||
</div>
|
||||
<div class="description">
|
||||
<p>
|
||||
This sample shows how to use the
|
||||
<a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.editor">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>
|
||||
<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="../../../samples/sample_posteddata.php" method="post">
|
||||
<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>
|
||||
|
||||
<script>
|
||||
// Replace the <textarea id="editor1"> with an CKEditor instance.
|
||||
CKEDITOR.replace( 'editor1', {
|
||||
on: {
|
||||
focus: onFocus,
|
||||
blur: onBlur,
|
||||
|
||||
// Check for availability of corresponding plugins.
|
||||
pluginsLoaded: function( evt ) {
|
||||
var doc = CKEDITOR.document, ed = evt.editor;
|
||||
if ( !ed.getCommand( 'bold' ) )
|
||||
doc.getById( 'exec-bold' ).hide();
|
||||
if ( !ed.getCommand( 'link' ) )
|
||||
doc.getById( 'exec-link' ).hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<p id="eMessage">
|
||||
</p>
|
||||
|
||||
<div id="eButtons" style="display: none">
|
||||
<input id="exec-bold" onclick="ExecuteCommand('bold');" type="button" value="Execute "bold" Command">
|
||||
<input id="exec-link" onclick="ExecuteCommand('link');" type="button" value="Execute "link" Command">
|
||||
<input onclick="Focus();" type="button" value="Focus">
|
||||
<br><br>
|
||||
<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 (HTML)">
|
||||
<br>
|
||||
<textarea cols="100" id="htmlArea" rows="3"><h2>Test</h2><p>This is some <a href="/Test1.html">sample</a> HTML code.</p></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>
|
||||
<br>
|
||||
<input onclick="CheckDirty();" type="button" value="checkDirty()">
|
||||
<input onclick="ResetDirty();" type="button" value="resetDirty()">
|
||||
</div>
|
||||
</form>
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2016, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>API Usage — CKEditor Sample</title>
|
||||
<script src="../../ckeditor.js"></script>
|
||||
<link href="sample.css" rel="stylesheet">
|
||||
<script>
|
||||
|
||||
// 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 = 'Instance <code>' + ev.editor.name + '<\/code> loaded.';
|
||||
|
||||
// Show this sample buttons.
|
||||
document.getElementById( 'eButtons' ).style.display = 'block';
|
||||
});
|
||||
|
||||
function InsertHTML() {
|
||||
// Get the editor instance that we want to interact with.
|
||||
var editor = CKEDITOR.instances.editor1;
|
||||
var value = document.getElementById( 'htmlArea' ).value;
|
||||
|
||||
// Check the active editing mode.
|
||||
if ( editor.mode == 'wysiwyg' )
|
||||
{
|
||||
// Insert HTML code.
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertHtml
|
||||
editor.insertHtml( value );
|
||||
}
|
||||
else
|
||||
alert( 'You must be in WYSIWYG mode!' );
|
||||
}
|
||||
|
||||
function InsertText() {
|
||||
// Get the editor instance that we want to interact with.
|
||||
var editor = CKEDITOR.instances.editor1;
|
||||
var value = document.getElementById( 'txtArea' ).value;
|
||||
|
||||
// Check the active editing mode.
|
||||
if ( editor.mode == 'wysiwyg' )
|
||||
{
|
||||
// Insert as plain text.
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertText
|
||||
editor.insertText( value );
|
||||
}
|
||||
else
|
||||
alert( 'You must be in WYSIWYG mode!' );
|
||||
}
|
||||
|
||||
function SetContents() {
|
||||
// Get the editor instance that we want to interact with.
|
||||
var editor = CKEDITOR.instances.editor1;
|
||||
var value = document.getElementById( 'htmlArea' ).value;
|
||||
|
||||
// Set editor contents (replace current contents).
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setData
|
||||
editor.setData( value );
|
||||
}
|
||||
|
||||
function GetContents() {
|
||||
// Get the editor instance that you want to interact with.
|
||||
var editor = CKEDITOR.instances.editor1;
|
||||
|
||||
// Get editor contents
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-getData
|
||||
alert( editor.getData() );
|
||||
}
|
||||
|
||||
function ExecuteCommand( commandName ) {
|
||||
// Get the editor instance that we want to interact with.
|
||||
var editor = CKEDITOR.instances.editor1;
|
||||
|
||||
// Check the active editing mode.
|
||||
if ( editor.mode == 'wysiwyg' )
|
||||
{
|
||||
// Execute the command.
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-execCommand
|
||||
editor.execCommand( commandName );
|
||||
}
|
||||
else
|
||||
alert( 'You must be in WYSIWYG mode!' );
|
||||
}
|
||||
|
||||
function CheckDirty() {
|
||||
// Get the editor instance that we want to interact with.
|
||||
var editor = CKEDITOR.instances.editor1;
|
||||
// Checks whether the current editor contents present changes when compared
|
||||
// to the contents loaded into the editor at startup
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-checkDirty
|
||||
alert( editor.checkDirty() );
|
||||
}
|
||||
|
||||
function ResetDirty() {
|
||||
// Get the editor instance that we want to interact with.
|
||||
var editor = CKEDITOR.instances.editor1;
|
||||
// Resets the "dirty state" of the editor (see CheckDirty())
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-resetDirty
|
||||
editor.resetDirty();
|
||||
alert( 'The "IsDirty" status has been reset' );
|
||||
}
|
||||
|
||||
function Focus() {
|
||||
CKEDITOR.instances.editor1.focus();
|
||||
}
|
||||
|
||||
function onFocus() {
|
||||
document.getElementById( 'eMessage' ).innerHTML = '<b>' + this.name + ' is focused </b>';
|
||||
}
|
||||
|
||||
function onBlur() {
|
||||
document.getElementById( 'eMessage' ).innerHTML = this.name + ' lost focus';
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="index.html">CKEditor Samples</a> » Using CKEditor JavaScript API
|
||||
</h1>
|
||||
<div class="warning deprecated">
|
||||
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>.
|
||||
</div>
|
||||
<div class="description">
|
||||
<p>
|
||||
This sample shows how to use the
|
||||
<a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.editor">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>
|
||||
<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="../../../samples/sample_posteddata.php" method="post">
|
||||
<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>
|
||||
|
||||
<script>
|
||||
// Replace the <textarea id="editor1"> with an CKEditor instance.
|
||||
CKEDITOR.replace( 'editor1', {
|
||||
on: {
|
||||
focus: onFocus,
|
||||
blur: onBlur,
|
||||
|
||||
// Check for availability of corresponding plugins.
|
||||
pluginsLoaded: function( evt ) {
|
||||
var doc = CKEDITOR.document, ed = evt.editor;
|
||||
if ( !ed.getCommand( 'bold' ) )
|
||||
doc.getById( 'exec-bold' ).hide();
|
||||
if ( !ed.getCommand( 'link' ) )
|
||||
doc.getById( 'exec-link' ).hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<p id="eMessage">
|
||||
</p>
|
||||
|
||||
<div id="eButtons" style="display: none">
|
||||
<input id="exec-bold" onclick="ExecuteCommand('bold');" type="button" value="Execute "bold" Command">
|
||||
<input id="exec-link" onclick="ExecuteCommand('link');" type="button" value="Execute "link" Command">
|
||||
<input onclick="Focus();" type="button" value="Focus">
|
||||
<br><br>
|
||||
<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 (HTML)">
|
||||
<br>
|
||||
<textarea cols="100" id="htmlArea" rows="3"><h2>Test</h2><p>This is some <a href="/Test1.html">sample</a> HTML code.</p></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>
|
||||
<br>
|
||||
<input onclick="CheckDirty();" type="button" value="checkDirty()">
|
||||
<input onclick="ResetDirty();" type="button" value="resetDirty()">
|
||||
</div>
|
||||
</form>
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2016, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -1,59 +1,59 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Append To Page Element Using JavaScript Code — CKEditor Sample</title>
|
||||
<script src="../../ckeditor.js"></script>
|
||||
<link rel="stylesheet" href="sample.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="index.html">CKEditor Samples</a> » Append To Page Element Using JavaScript Code
|
||||
</h1>
|
||||
<div class="warning deprecated">
|
||||
This sample is not maintained anymore. Check out the <a href="http://sdk.ckeditor.com/">brand new samples in CKEditor SDK</a>.
|
||||
</div>
|
||||
<div id="section1">
|
||||
<div class="description">
|
||||
<p>
|
||||
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>,
|
||||
a target container to be replaced is no longer necessary. A new editor
|
||||
instance is inserted directly wherever it is desired.
|
||||
</p>
|
||||
<pre class="samples">CKEDITOR.appendTo( '<em>container_id</em>',
|
||||
{ /* Configuration options to be used. */ }
|
||||
'Editor content to be used.'
|
||||
);</pre>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
// This call can be placed at any point after the
|
||||
// DOM element to append CKEditor to or inside the <head><script>
|
||||
// in a window.onload event handler.
|
||||
|
||||
// Append a CKEditor instance using the default configuration and the
|
||||
// provided content to the <div> element of ID "section1".
|
||||
CKEDITOR.appendTo( 'section1',
|
||||
null,
|
||||
'<p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>'
|
||||
);
|
||||
|
||||
</script>
|
||||
</div>
|
||||
<br>
|
||||
<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 © 2003-2016, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Append To Page Element Using JavaScript Code — CKEditor Sample</title>
|
||||
<script src="../../ckeditor.js"></script>
|
||||
<link rel="stylesheet" href="sample.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="index.html">CKEditor Samples</a> » Append To Page Element Using JavaScript Code
|
||||
</h1>
|
||||
<div class="warning deprecated">
|
||||
This sample is not maintained anymore. Check out the <a href="http://sdk.ckeditor.com/">brand new samples in CKEditor SDK</a>.
|
||||
</div>
|
||||
<div id="section1">
|
||||
<div class="description">
|
||||
<p>
|
||||
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>,
|
||||
a target container to be replaced is no longer necessary. A new editor
|
||||
instance is inserted directly wherever it is desired.
|
||||
</p>
|
||||
<pre class="samples">CKEDITOR.appendTo( '<em>container_id</em>',
|
||||
{ /* Configuration options to be used. */ }
|
||||
'Editor content to be used.'
|
||||
);</pre>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
// This call can be placed at any point after the
|
||||
// DOM element to append CKEditor to or inside the <head><script>
|
||||
// in a window.onload event handler.
|
||||
|
||||
// Append a CKEditor instance using the default configuration and the
|
||||
// provided content to the <div> element of ID "section1".
|
||||
CKEDITOR.appendTo( 'section1',
|
||||
null,
|
||||
'<p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>'
|
||||
);
|
||||
|
||||
</script>
|
||||
</div>
|
||||
<br>
|
||||
<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 © 2003-2016, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -1,204 +1,204 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*
|
||||
* Styles used by the XHTML 1.1 sample page (xhtml.html).
|
||||
*/
|
||||
|
||||
/**
|
||||
* Basic definitions for the editing area.
|
||||
*/
|
||||
body
|
||||
{
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
font-size: 80%;
|
||||
color: #000000;
|
||||
background-color: #ffffff;
|
||||
padding: 5px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Core styles.
|
||||
*/
|
||||
|
||||
.Bold
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.Italic
|
||||
{
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.Underline
|
||||
{
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.StrikeThrough
|
||||
{
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.Subscript
|
||||
{
|
||||
vertical-align: sub;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.Superscript
|
||||
{
|
||||
vertical-align: super;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
/**
|
||||
* Font faces.
|
||||
*/
|
||||
|
||||
.FontComic
|
||||
{
|
||||
font-family: 'Comic Sans MS';
|
||||
}
|
||||
|
||||
.FontCourier
|
||||
{
|
||||
font-family: 'Courier New';
|
||||
}
|
||||
|
||||
.FontTimes
|
||||
{
|
||||
font-family: 'Times New Roman';
|
||||
}
|
||||
|
||||
/**
|
||||
* Font sizes.
|
||||
*/
|
||||
|
||||
.FontSmaller
|
||||
{
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.FontLarger
|
||||
{
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
.FontSmall
|
||||
{
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
.FontBig
|
||||
{
|
||||
font-size: 14pt;
|
||||
}
|
||||
|
||||
.FontDouble
|
||||
{
|
||||
font-size: 200%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Font colors.
|
||||
*/
|
||||
.FontColor1
|
||||
{
|
||||
color: #ff9900;
|
||||
}
|
||||
|
||||
.FontColor2
|
||||
{
|
||||
color: #0066cc;
|
||||
}
|
||||
|
||||
.FontColor3
|
||||
{
|
||||
color: #ff0000;
|
||||
}
|
||||
|
||||
.FontColor1BG
|
||||
{
|
||||
background-color: #ff9900;
|
||||
}
|
||||
|
||||
.FontColor2BG
|
||||
{
|
||||
background-color: #0066cc;
|
||||
}
|
||||
|
||||
.FontColor3BG
|
||||
{
|
||||
background-color: #ff0000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indentation.
|
||||
*/
|
||||
|
||||
.Indent1
|
||||
{
|
||||
margin-left: 40px;
|
||||
}
|
||||
|
||||
.Indent2
|
||||
{
|
||||
margin-left: 80px;
|
||||
}
|
||||
|
||||
.Indent3
|
||||
{
|
||||
margin-left: 120px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Alignment.
|
||||
*/
|
||||
|
||||
.JustifyLeft
|
||||
{
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.JustifyRight
|
||||
{
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.JustifyCenter
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.JustifyFull
|
||||
{
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
/**
|
||||
* Other.
|
||||
*/
|
||||
|
||||
code
|
||||
{
|
||||
font-family: courier, monospace;
|
||||
background-color: #eeeeee;
|
||||
padding-left: 1px;
|
||||
padding-right: 1px;
|
||||
border: #c0c0c0 1px solid;
|
||||
}
|
||||
|
||||
kbd
|
||||
{
|
||||
padding: 0px 1px 0px 1px;
|
||||
border-width: 1px 2px 2px 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
blockquote
|
||||
{
|
||||
color: #808080;
|
||||
}
|
||||
/*
|
||||
* Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*
|
||||
* Styles used by the XHTML 1.1 sample page (xhtml.html).
|
||||
*/
|
||||
|
||||
/**
|
||||
* Basic definitions for the editing area.
|
||||
*/
|
||||
body
|
||||
{
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
font-size: 80%;
|
||||
color: #000000;
|
||||
background-color: #ffffff;
|
||||
padding: 5px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Core styles.
|
||||
*/
|
||||
|
||||
.Bold
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.Italic
|
||||
{
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.Underline
|
||||
{
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.StrikeThrough
|
||||
{
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.Subscript
|
||||
{
|
||||
vertical-align: sub;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.Superscript
|
||||
{
|
||||
vertical-align: super;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
/**
|
||||
* Font faces.
|
||||
*/
|
||||
|
||||
.FontComic
|
||||
{
|
||||
font-family: 'Comic Sans MS';
|
||||
}
|
||||
|
||||
.FontCourier
|
||||
{
|
||||
font-family: 'Courier New';
|
||||
}
|
||||
|
||||
.FontTimes
|
||||
{
|
||||
font-family: 'Times New Roman';
|
||||
}
|
||||
|
||||
/**
|
||||
* Font sizes.
|
||||
*/
|
||||
|
||||
.FontSmaller
|
||||
{
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.FontLarger
|
||||
{
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
.FontSmall
|
||||
{
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
.FontBig
|
||||
{
|
||||
font-size: 14pt;
|
||||
}
|
||||
|
||||
.FontDouble
|
||||
{
|
||||
font-size: 200%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Font colors.
|
||||
*/
|
||||
.FontColor1
|
||||
{
|
||||
color: #ff9900;
|
||||
}
|
||||
|
||||
.FontColor2
|
||||
{
|
||||
color: #0066cc;
|
||||
}
|
||||
|
||||
.FontColor3
|
||||
{
|
||||
color: #ff0000;
|
||||
}
|
||||
|
||||
.FontColor1BG
|
||||
{
|
||||
background-color: #ff9900;
|
||||
}
|
||||
|
||||
.FontColor2BG
|
||||
{
|
||||
background-color: #0066cc;
|
||||
}
|
||||
|
||||
.FontColor3BG
|
||||
{
|
||||
background-color: #ff0000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indentation.
|
||||
*/
|
||||
|
||||
.Indent1
|
||||
{
|
||||
margin-left: 40px;
|
||||
}
|
||||
|
||||
.Indent2
|
||||
{
|
||||
margin-left: 80px;
|
||||
}
|
||||
|
||||
.Indent3
|
||||
{
|
||||
margin-left: 120px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Alignment.
|
||||
*/
|
||||
|
||||
.JustifyLeft
|
||||
{
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.JustifyRight
|
||||
{
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.JustifyCenter
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.JustifyFull
|
||||
{
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
/**
|
||||
* Other.
|
||||
*/
|
||||
|
||||
code
|
||||
{
|
||||
font-family: courier, monospace;
|
||||
background-color: #eeeeee;
|
||||
padding-left: 1px;
|
||||
padding-right: 1px;
|
||||
border: #c0c0c0 1px solid;
|
||||
}
|
||||
|
||||
kbd
|
||||
{
|
||||
padding: 0px 1px 0px 1px;
|
||||
border-width: 1px 2px 2px 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
blockquote
|
||||
{
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
@ -1,59 +1,59 @@
|
||||
<!DOCTYPE html>
|
||||
<?php
|
||||
/*
|
||||
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Sample — CKEditor</title>
|
||||
<link rel="stylesheet" href="sample.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
CKEditor — Posted Data
|
||||
</h1>
|
||||
<table border="1" cellspacing="0" id="outputSample">
|
||||
<colgroup><col width="120"></colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field Name</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
|
||||
if (!empty($_POST))
|
||||
{
|
||||
foreach ( $_POST as $key => $value )
|
||||
{
|
||||
if ( ( !is_string($value) && !is_numeric($value) ) || !is_string($key) )
|
||||
continue;
|
||||
|
||||
if ( get_magic_quotes_gpc() )
|
||||
$value = htmlspecialchars( stripslashes((string)$value) );
|
||||
else
|
||||
$value = htmlspecialchars( (string)$value );
|
||||
?>
|
||||
<tr>
|
||||
<th style="vertical-align: top"><?php echo htmlspecialchars( (string)$key ); ?></th>
|
||||
<td><pre class="samples"><?php echo $value; ?></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 © 2003-2016, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html>
|
||||
<?php
|
||||
/*
|
||||
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Sample — CKEditor</title>
|
||||
<link rel="stylesheet" href="sample.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
CKEditor — Posted Data
|
||||
</h1>
|
||||
<table border="1" cellspacing="0" id="outputSample">
|
||||
<colgroup><col width="120"></colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field Name</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
|
||||
if (!empty($_POST))
|
||||
{
|
||||
foreach ( $_POST as $key => $value )
|
||||
{
|
||||
if ( ( !is_string($value) && !is_numeric($value) ) || !is_string($key) )
|
||||
continue;
|
||||
|
||||
if ( get_magic_quotes_gpc() )
|
||||
$value = htmlspecialchars( stripslashes((string)$value) );
|
||||
else
|
||||
$value = htmlspecialchars( (string)$value );
|
||||
?>
|
||||
<tr>
|
||||
<th style="vertical-align: top"><?php echo htmlspecialchars( (string)$key ); ?></th>
|
||||
<td><pre class="samples"><?php echo $value; ?></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 © 2003-2016, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1,48 +1,48 @@
|
||||
/**
|
||||
* Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.dialog.add( 'myDialog', function() {
|
||||
return {
|
||||
title: 'My Dialog',
|
||||
minWidth: 400,
|
||||
minHeight: 200,
|
||||
contents: [
|
||||
{
|
||||
id: 'tab1',
|
||||
label: 'First Tab',
|
||||
title: 'First Tab',
|
||||
elements: [
|
||||
{
|
||||
id: 'input1',
|
||||
type: 'text',
|
||||
label: 'Text Field'
|
||||
},
|
||||
{
|
||||
id: 'select1',
|
||||
type: 'select',
|
||||
label: 'Select Field',
|
||||
items: [
|
||||
[ 'option1', 'value1' ],
|
||||
[ 'option2', 'value2' ]
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'tab2',
|
||||
label: 'Second Tab',
|
||||
title: 'Second Tab',
|
||||
elements: [
|
||||
{
|
||||
id: 'button1',
|
||||
type: 'button',
|
||||
label: 'Button Field'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
} );
|
||||
|
||||
/**
|
||||
* Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.dialog.add( 'myDialog', function() {
|
||||
return {
|
||||
title: 'My Dialog',
|
||||
minWidth: 400,
|
||||
minHeight: 200,
|
||||
contents: [
|
||||
{
|
||||
id: 'tab1',
|
||||
label: 'First Tab',
|
||||
title: 'First Tab',
|
||||
elements: [
|
||||
{
|
||||
id: 'input1',
|
||||
type: 'text',
|
||||
label: 'Text Field'
|
||||
},
|
||||
{
|
||||
id: 'select1',
|
||||
type: 'select',
|
||||
label: 'Select Field',
|
||||
items: [
|
||||
[ 'option1', 'value1' ],
|
||||
[ 'option2', 'value2' ]
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'tab2',
|
||||
label: 'Second Tab',
|
||||
title: 'Second Tab',
|
||||
elements: [
|
||||
{
|
||||
id: 'button1',
|
||||
type: 'button',
|
||||
label: 'Button Field'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
} );
|
||||
|
||||
|
||||
@ -1,190 +1,190 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Using API to Customize Dialog Windows — CKEditor Sample</title>
|
||||
<script src="../../../ckeditor.js"></script>
|
||||
<link rel="stylesheet" href="../../../samples/old/sample.css">
|
||||
<meta name="ckeditor-sample-name" content="Using the JavaScript API to customize dialog windows">
|
||||
<meta name="ckeditor-sample-group" content="Advanced Samples">
|
||||
<meta name="ckeditor-sample-description" content="Using the dialog windows API to customize dialog windows without changing the original editor code.">
|
||||
<style>
|
||||
|
||||
.cke_button__mybutton_icon
|
||||
{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.cke_button__mybutton_label
|
||||
{
|
||||
display: inline !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script>
|
||||
|
||||
CKEDITOR.on( 'instanceCreated', function( ev ){
|
||||
var editor = ev.editor;
|
||||
|
||||
// Listen for the "pluginsLoaded" event, so we are sure that the
|
||||
// "dialog" plugin has been loaded and we are able to do our
|
||||
// customizations.
|
||||
editor.on( 'pluginsLoaded', function() {
|
||||
|
||||
// If our custom dialog has not been registered, do that now.
|
||||
if ( !CKEDITOR.dialog.exists( 'myDialog' ) ) {
|
||||
// We need to do the following trick to find out the dialog
|
||||
// definition file URL path. In the real world, you would simply
|
||||
// point to an absolute path directly, like "/mydir/mydialog.js".
|
||||
var href = document.location.href.split( '/' );
|
||||
href.pop();
|
||||
href.push( 'assets/my_dialog.js' );
|
||||
href = href.join( '/' );
|
||||
|
||||
// Finally, register the dialog.
|
||||
CKEDITOR.dialog.add( 'myDialog', href );
|
||||
}
|
||||
|
||||
// Register the command used to open the dialog.
|
||||
editor.addCommand( 'myDialogCmd', new CKEDITOR.dialogCommand( 'myDialog' ) );
|
||||
|
||||
// Add the a custom toolbar buttons, which fires the above
|
||||
// command..
|
||||
editor.ui.add( 'MyButton', CKEDITOR.UI_BUTTON, {
|
||||
label: 'My Dialog',
|
||||
command: 'myDialogCmd'
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// When opening a dialog, its "definition" is created for it, for
|
||||
// each editor instance. The "dialogDefinition" event is then
|
||||
// fired. We should use this event to make customizations to the
|
||||
// definition of existing dialogs.
|
||||
CKEDITOR.on( 'dialogDefinition', function( ev ) {
|
||||
// Take the dialog name and its definition from the event data.
|
||||
var dialogName = ev.data.name;
|
||||
var dialogDefinition = ev.data.definition;
|
||||
|
||||
// Check if the definition is from the dialog we're
|
||||
// interested on (the "Link" dialog).
|
||||
if ( dialogName == 'myDialog' && ev.editor.name == 'editor2' ) {
|
||||
// Get a reference to the "Link Info" tab.
|
||||
var infoTab = dialogDefinition.getContents( 'tab1' );
|
||||
|
||||
// Add a new text field to the "tab1" tab page.
|
||||
infoTab.add( {
|
||||
type: 'text',
|
||||
label: 'My Custom Field',
|
||||
id: 'customField',
|
||||
'default': 'Sample!',
|
||||
validate: function() {
|
||||
if ( ( /\d/ ).test( this.getValue() ) )
|
||||
return 'My Custom Field must not contain digits';
|
||||
}
|
||||
});
|
||||
|
||||
// Remove the "select1" field from the "tab1" tab.
|
||||
infoTab.remove( 'select1' );
|
||||
|
||||
// Set the default value for "input1" field.
|
||||
var input1 = infoTab.get( 'input1' );
|
||||
input1[ 'default' ] = 'www.example.com';
|
||||
|
||||
// Remove the "tab2" tab page.
|
||||
dialogDefinition.removeContents( 'tab2' );
|
||||
|
||||
// Add a new tab to the "Link" dialog.
|
||||
dialogDefinition.addContents( {
|
||||
id: 'customTab',
|
||||
label: 'My Tab',
|
||||
accessKey: 'M',
|
||||
elements: [
|
||||
{
|
||||
id: 'myField1',
|
||||
type: 'text',
|
||||
label: 'My Text Field'
|
||||
},
|
||||
{
|
||||
id: 'myField2',
|
||||
type: 'text',
|
||||
label: 'Another Text Field'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
// Provide the focus handler to start initial focus in "customField" field.
|
||||
dialogDefinition.onFocus = function() {
|
||||
var urlField = this.getContentElement( 'tab1', 'customField' );
|
||||
urlField.select();
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
var config = {
|
||||
extraPlugins: 'dialog',
|
||||
toolbar: [ [ 'MyButton' ] ]
|
||||
};
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="../../../samples/old/index.html">CKEditor Samples</a> » Using CKEditor Dialog API
|
||||
</h1>
|
||||
<div class="warning deprecated">
|
||||
This sample is not maintained anymore. Check out the <a href="http://sdk.ckeditor.com/">brand new samples in CKEditor SDK</a>.
|
||||
</div>
|
||||
<div class="description">
|
||||
<p>
|
||||
This sample shows how to use the
|
||||
<a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.dialog">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>
|
||||
<p>
|
||||
For details on how to create this setup check the source code of this sample page.
|
||||
</p>
|
||||
</div>
|
||||
<p>A custom dialog is added to the editors using the <code>pluginsLoaded</code> event, from an external <a target="_blank" href="assets/my_dialog.js">dialog definition file</a>:</p>
|
||||
<ol>
|
||||
<li><strong>Creating a custom dialog window</strong> – "My Dialog" dialog window opened with the "My Dialog" toolbar button.</li>
|
||||
<li><strong>Creating a custom button</strong> – Add button to open the dialog with "My Dialog" toolbar button.</li>
|
||||
</ol>
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<script>
|
||||
// Replace the <textarea id="editor1"> with an CKEditor instance.
|
||||
CKEDITOR.replace( 'editor1', config );
|
||||
</script>
|
||||
<p>The below editor modify the dialog definition of the above added dialog using the <code>dialogDefinition</code> event:</p>
|
||||
<ol>
|
||||
<li><strong>Adding dialog tab</strong> – Add new tab "My Tab" to dialog window.</li>
|
||||
<li><strong>Removing a dialog window tab</strong> – Remove "Second Tab" page from the dialog window.</li>
|
||||
<li><strong>Adding dialog window fields</strong> – Add "My Custom Field" to the dialog window.</li>
|
||||
<li><strong>Removing dialog window field</strong> – Remove "Select Field" selection field from the dialog window.</li>
|
||||
<li><strong>Setting default values for dialog window fields</strong> – Set default value of "Text Field" text field. </li>
|
||||
<li><strong>Setup initial focus for dialog window</strong> – Put initial focus on "My Custom Field" text field. </li>
|
||||
</ol>
|
||||
<textarea cols="80" id="editor2" name="editor2" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<script>
|
||||
|
||||
// Replace the <textarea id="editor1"> with an CKEditor instance.
|
||||
CKEDITOR.replace( 'editor2', config );
|
||||
|
||||
</script>
|
||||
<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 © 2003-2016, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Using API to Customize Dialog Windows — CKEditor Sample</title>
|
||||
<script src="../../../ckeditor.js"></script>
|
||||
<link rel="stylesheet" href="../../../samples/old/sample.css">
|
||||
<meta name="ckeditor-sample-name" content="Using the JavaScript API to customize dialog windows">
|
||||
<meta name="ckeditor-sample-group" content="Advanced Samples">
|
||||
<meta name="ckeditor-sample-description" content="Using the dialog windows API to customize dialog windows without changing the original editor code.">
|
||||
<style>
|
||||
|
||||
.cke_button__mybutton_icon
|
||||
{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.cke_button__mybutton_label
|
||||
{
|
||||
display: inline !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script>
|
||||
|
||||
CKEDITOR.on( 'instanceCreated', function( ev ){
|
||||
var editor = ev.editor;
|
||||
|
||||
// Listen for the "pluginsLoaded" event, so we are sure that the
|
||||
// "dialog" plugin has been loaded and we are able to do our
|
||||
// customizations.
|
||||
editor.on( 'pluginsLoaded', function() {
|
||||
|
||||
// If our custom dialog has not been registered, do that now.
|
||||
if ( !CKEDITOR.dialog.exists( 'myDialog' ) ) {
|
||||
// We need to do the following trick to find out the dialog
|
||||
// definition file URL path. In the real world, you would simply
|
||||
// point to an absolute path directly, like "/mydir/mydialog.js".
|
||||
var href = document.location.href.split( '/' );
|
||||
href.pop();
|
||||
href.push( 'assets/my_dialog.js' );
|
||||
href = href.join( '/' );
|
||||
|
||||
// Finally, register the dialog.
|
||||
CKEDITOR.dialog.add( 'myDialog', href );
|
||||
}
|
||||
|
||||
// Register the command used to open the dialog.
|
||||
editor.addCommand( 'myDialogCmd', new CKEDITOR.dialogCommand( 'myDialog' ) );
|
||||
|
||||
// Add the a custom toolbar buttons, which fires the above
|
||||
// command..
|
||||
editor.ui.add( 'MyButton', CKEDITOR.UI_BUTTON, {
|
||||
label: 'My Dialog',
|
||||
command: 'myDialogCmd'
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// When opening a dialog, its "definition" is created for it, for
|
||||
// each editor instance. The "dialogDefinition" event is then
|
||||
// fired. We should use this event to make customizations to the
|
||||
// definition of existing dialogs.
|
||||
CKEDITOR.on( 'dialogDefinition', function( ev ) {
|
||||
// Take the dialog name and its definition from the event data.
|
||||
var dialogName = ev.data.name;
|
||||
var dialogDefinition = ev.data.definition;
|
||||
|
||||
// Check if the definition is from the dialog we're
|
||||
// interested on (the "Link" dialog).
|
||||
if ( dialogName == 'myDialog' && ev.editor.name == 'editor2' ) {
|
||||
// Get a reference to the "Link Info" tab.
|
||||
var infoTab = dialogDefinition.getContents( 'tab1' );
|
||||
|
||||
// Add a new text field to the "tab1" tab page.
|
||||
infoTab.add( {
|
||||
type: 'text',
|
||||
label: 'My Custom Field',
|
||||
id: 'customField',
|
||||
'default': 'Sample!',
|
||||
validate: function() {
|
||||
if ( ( /\d/ ).test( this.getValue() ) )
|
||||
return 'My Custom Field must not contain digits';
|
||||
}
|
||||
});
|
||||
|
||||
// Remove the "select1" field from the "tab1" tab.
|
||||
infoTab.remove( 'select1' );
|
||||
|
||||
// Set the default value for "input1" field.
|
||||
var input1 = infoTab.get( 'input1' );
|
||||
input1[ 'default' ] = 'www.example.com';
|
||||
|
||||
// Remove the "tab2" tab page.
|
||||
dialogDefinition.removeContents( 'tab2' );
|
||||
|
||||
// Add a new tab to the "Link" dialog.
|
||||
dialogDefinition.addContents( {
|
||||
id: 'customTab',
|
||||
label: 'My Tab',
|
||||
accessKey: 'M',
|
||||
elements: [
|
||||
{
|
||||
id: 'myField1',
|
||||
type: 'text',
|
||||
label: 'My Text Field'
|
||||
},
|
||||
{
|
||||
id: 'myField2',
|
||||
type: 'text',
|
||||
label: 'Another Text Field'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
// Provide the focus handler to start initial focus in "customField" field.
|
||||
dialogDefinition.onFocus = function() {
|
||||
var urlField = this.getContentElement( 'tab1', 'customField' );
|
||||
urlField.select();
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
var config = {
|
||||
extraPlugins: 'dialog',
|
||||
toolbar: [ [ 'MyButton' ] ]
|
||||
};
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="../../../samples/old/index.html">CKEditor Samples</a> » Using CKEditor Dialog API
|
||||
</h1>
|
||||
<div class="warning deprecated">
|
||||
This sample is not maintained anymore. Check out the <a href="http://sdk.ckeditor.com/">brand new samples in CKEditor SDK</a>.
|
||||
</div>
|
||||
<div class="description">
|
||||
<p>
|
||||
This sample shows how to use the
|
||||
<a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.dialog">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>
|
||||
<p>
|
||||
For details on how to create this setup check the source code of this sample page.
|
||||
</p>
|
||||
</div>
|
||||
<p>A custom dialog is added to the editors using the <code>pluginsLoaded</code> event, from an external <a target="_blank" href="assets/my_dialog.js">dialog definition file</a>:</p>
|
||||
<ol>
|
||||
<li><strong>Creating a custom dialog window</strong> – "My Dialog" dialog window opened with the "My Dialog" toolbar button.</li>
|
||||
<li><strong>Creating a custom button</strong> – Add button to open the dialog with "My Dialog" toolbar button.</li>
|
||||
</ol>
|
||||
<textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<script>
|
||||
// Replace the <textarea id="editor1"> with an CKEditor instance.
|
||||
CKEDITOR.replace( 'editor1', config );
|
||||
</script>
|
||||
<p>The below editor modify the dialog definition of the above added dialog using the <code>dialogDefinition</code> event:</p>
|
||||
<ol>
|
||||
<li><strong>Adding dialog tab</strong> – Add new tab "My Tab" to dialog window.</li>
|
||||
<li><strong>Removing a dialog window tab</strong> – Remove "Second Tab" page from the dialog window.</li>
|
||||
<li><strong>Adding dialog window fields</strong> – Add "My Custom Field" to the dialog window.</li>
|
||||
<li><strong>Removing dialog window field</strong> – Remove "Select Field" selection field from the dialog window.</li>
|
||||
<li><strong>Setting default values for dialog window fields</strong> – Set default value of "Text Field" text field. </li>
|
||||
<li><strong>Setup initial focus for dialog window</strong> – Put initial focus on "My Custom Field" text field. </li>
|
||||
</ol>
|
||||
<textarea cols="80" id="editor2" name="editor2" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
|
||||
<script>
|
||||
|
||||
// Replace the <textarea id="editor1"> with an CKEditor instance.
|
||||
CKEDITOR.replace( 'editor2', config );
|
||||
|
||||
</script>
|
||||
<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 © 2003-2016, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -1,144 +1,144 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Replace DIV — CKEditor Sample</title>
|
||||
<script src="../../ckeditor.js"></script>
|
||||
<link href="sample.css" rel="stylesheet">
|
||||
<style>
|
||||
|
||||
div.editable
|
||||
{
|
||||
border: solid 2px transparent;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
div.editable:hover
|
||||
{
|
||||
border-color: black;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script>
|
||||
|
||||
// Uncomment the following code to test the "Timeout Loading Method".
|
||||
// CKEDITOR.loadFullCoreTimeout = 5;
|
||||
|
||||
window.onload = function() {
|
||||
// Listen to the double click event.
|
||||
if ( window.addEventListener )
|
||||
document.body.addEventListener( 'dblclick', onDoubleClick, false );
|
||||
else if ( window.attachEvent )
|
||||
document.body.attachEvent( 'ondblclick', onDoubleClick );
|
||||
|
||||
};
|
||||
|
||||
function onDoubleClick( ev ) {
|
||||
// Get the element which fired the event. This is not necessarily the
|
||||
// element to which the event has been attached.
|
||||
var element = ev.target || ev.srcElement;
|
||||
|
||||
// Find out the div that holds this element.
|
||||
var name;
|
||||
|
||||
do {
|
||||
element = element.parentNode;
|
||||
}
|
||||
while ( element && ( name = element.nodeName.toLowerCase() ) &&
|
||||
( name != 'div' || element.className.indexOf( 'editable' ) == -1 ) && name != 'body' );
|
||||
|
||||
if ( name == 'div' && element.className.indexOf( 'editable' ) != -1 )
|
||||
replaceDiv( element );
|
||||
}
|
||||
|
||||
var editor;
|
||||
|
||||
function replaceDiv( div ) {
|
||||
if ( editor )
|
||||
editor.destroy();
|
||||
|
||||
editor = CKEDITOR.replace( div );
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="index.html">CKEditor Samples</a> » Replace DIV with CKEditor on the Fly
|
||||
</h1>
|
||||
<div class="warning deprecated">
|
||||
This sample is not maintained anymore. Check out the <a href="http://sdk.ckeditor.com/">brand new samples in CKEditor SDK</a>.
|
||||
</div>
|
||||
<div class="description">
|
||||
<p>
|
||||
This sample shows how to automatically replace <code><div></code> elements
|
||||
with a CKEditor instance on the fly, following user's doubleclick. The content
|
||||
that was previously placed inside the <code><div></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>
|
||||
<p>
|
||||
Double-click any of the following <code><div></code> elements to transform them into
|
||||
editor instances.
|
||||
</p>
|
||||
<div class="editable">
|
||||
<h3>
|
||||
Part 1
|
||||
</h3>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi
|
||||
semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna
|
||||
rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla
|
||||
nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce
|
||||
eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus.
|
||||
</p>
|
||||
</div>
|
||||
<div class="editable">
|
||||
<h3>
|
||||
Part 2
|
||||
</h3>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi
|
||||
semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna
|
||||
rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla
|
||||
nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce
|
||||
eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus.
|
||||
</p>
|
||||
<p>
|
||||
Donec velit. Mauris massa. Vestibulum non nulla. Nam suscipit arcu nec elit. Phasellus
|
||||
sollicitudin iaculis ante. Ut non mauris et sapien tincidunt adipiscing. Vestibulum
|
||||
vitae leo. Suspendisse nec mi tristique nulla laoreet vulputate.
|
||||
</p>
|
||||
</div>
|
||||
<div class="editable">
|
||||
<h3>
|
||||
Part 3
|
||||
</h3>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi
|
||||
semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna
|
||||
rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla
|
||||
nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce
|
||||
eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus.
|
||||
</p>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2016, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Replace DIV — CKEditor Sample</title>
|
||||
<script src="../../ckeditor.js"></script>
|
||||
<link href="sample.css" rel="stylesheet">
|
||||
<style>
|
||||
|
||||
div.editable
|
||||
{
|
||||
border: solid 2px transparent;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
div.editable:hover
|
||||
{
|
||||
border-color: black;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script>
|
||||
|
||||
// Uncomment the following code to test the "Timeout Loading Method".
|
||||
// CKEDITOR.loadFullCoreTimeout = 5;
|
||||
|
||||
window.onload = function() {
|
||||
// Listen to the double click event.
|
||||
if ( window.addEventListener )
|
||||
document.body.addEventListener( 'dblclick', onDoubleClick, false );
|
||||
else if ( window.attachEvent )
|
||||
document.body.attachEvent( 'ondblclick', onDoubleClick );
|
||||
|
||||
};
|
||||
|
||||
function onDoubleClick( ev ) {
|
||||
// Get the element which fired the event. This is not necessarily the
|
||||
// element to which the event has been attached.
|
||||
var element = ev.target || ev.srcElement;
|
||||
|
||||
// Find out the div that holds this element.
|
||||
var name;
|
||||
|
||||
do {
|
||||
element = element.parentNode;
|
||||
}
|
||||
while ( element && ( name = element.nodeName.toLowerCase() ) &&
|
||||
( name != 'div' || element.className.indexOf( 'editable' ) == -1 ) && name != 'body' );
|
||||
|
||||
if ( name == 'div' && element.className.indexOf( 'editable' ) != -1 )
|
||||
replaceDiv( element );
|
||||
}
|
||||
|
||||
var editor;
|
||||
|
||||
function replaceDiv( div ) {
|
||||
if ( editor )
|
||||
editor.destroy();
|
||||
|
||||
editor = CKEDITOR.replace( div );
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="samples">
|
||||
<a href="index.html">CKEditor Samples</a> » Replace DIV with CKEditor on the Fly
|
||||
</h1>
|
||||
<div class="warning deprecated">
|
||||
This sample is not maintained anymore. Check out the <a href="http://sdk.ckeditor.com/">brand new samples in CKEditor SDK</a>.
|
||||
</div>
|
||||
<div class="description">
|
||||
<p>
|
||||
This sample shows how to automatically replace <code><div></code> elements
|
||||
with a CKEditor instance on the fly, following user's doubleclick. The content
|
||||
that was previously placed inside the <code><div></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>
|
||||
<p>
|
||||
Double-click any of the following <code><div></code> elements to transform them into
|
||||
editor instances.
|
||||
</p>
|
||||
<div class="editable">
|
||||
<h3>
|
||||
Part 1
|
||||
</h3>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi
|
||||
semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna
|
||||
rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla
|
||||
nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce
|
||||
eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus.
|
||||
</p>
|
||||
</div>
|
||||
<div class="editable">
|
||||
<h3>
|
||||
Part 2
|
||||
</h3>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi
|
||||
semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna
|
||||
rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla
|
||||
nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce
|
||||
eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus.
|
||||
</p>
|
||||
<p>
|
||||
Donec velit. Mauris massa. Vestibulum non nulla. Nam suscipit arcu nec elit. Phasellus
|
||||
sollicitudin iaculis ante. Ut non mauris et sapien tincidunt adipiscing. Vestibulum
|
||||
vitae leo. Suspendisse nec mi tristique nulla laoreet vulputate.
|
||||
</p>
|
||||
</div>
|
||||
<div class="editable">
|
||||
<h3>
|
||||
Part 3
|
||||
</h3>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi
|
||||
semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna
|
||||
rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla
|
||||
nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce
|
||||
eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus.
|
||||
</p>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<hr>
|
||||
<p>
|
||||
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
||||
</p>
|
||||
<p id="copy">
|
||||
Copyright © 2003-2016, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
||||
Knabben. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user