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