ckeditor update

This commit is contained in:
Roland Gruber 2018-06-17 18:07:19 +02:00
parent 4df34f631c
commit d707c525a4
2594 changed files with 60101 additions and 15743 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
CKEditor 4 CKEditor 4
========== ==========
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
http://ckeditor.com - See LICENSE.md for license information. http://ckeditor.com - See LICENSE.md for license information.
CKEditor is a text editor to be used inside web pages. It's not a replacement CKEditor is a text editor to be used inside web pages. It's not a replacement

View File

@ -1,5 +1,5 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, 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
*/ */
@ -13,10 +13,10 @@
* (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/b11ca976088575bbef24d7a5e73d9fcf * (2) http://ckeditor.com/builder/c89ee2a4001bbd918a755f095348a0bd
* 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/b11ca976088575bbef24d7a5e73d9fcf * (3) http://ckeditor.com/builder/download/c89ee2a4001bbd918a755f095348a0bd
* 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:
@ -25,16 +25,34 @@
*/ */
var CKBUILDER_CONFIG = { var CKBUILDER_CONFIG = {
skin: 'Moono_blue', skin: 'kama',
preset: 'standard', preset: 'standard',
ignore: [ ignore: [
'dev', '.DS_Store',
'.gitignore', '.bender',
'.editorconfig',
'.gitattributes', '.gitattributes',
'README.md', '.gitignore',
'.mailmap' '.idea',
'.jscsrc',
'.jshintignore',
'.jshintrc',
'.mailmap',
'.travis.yml',
'bender-err.log',
'bender-out.log',
'bender.ci.js',
'bender.js',
'dev',
'gruntfile.js',
'less',
'node_modules',
'package.json',
'tests'
], ],
plugins : { plugins : {
'a11yhelp' : 1,
'about' : 1,
'basicstyles' : 1, 'basicstyles' : 1,
'blockquote' : 1, 'blockquote' : 1,
'clipboard' : 1, 'clipboard' : 1,
@ -42,34 +60,40 @@ var CKBUILDER_CONFIG = {
'elementspath' : 1, 'elementspath' : 1,
'enterkey' : 1, 'enterkey' : 1,
'entities' : 1, 'entities' : 1,
'filebrowser' : 1,
'floatingspace' : 1, 'floatingspace' : 1,
'font' : 1,
'format' : 1, 'format' : 1,
'horizontalrule' : 1, 'horizontalrule' : 1,
'htmlwriter' : 1, 'htmlwriter' : 1,
'image' : 1, 'image' : 1,
'indentlist' : 1, 'indentlist' : 1,
'justify' : 1,
'link' : 1, 'link' : 1,
'list' : 1, 'list' : 1,
'magicline' : 1, 'magicline' : 1,
'maximize' : 1, 'maximize' : 1,
'pastefromword' : 1,
'pastetext' : 1,
'removeformat' : 1, 'removeformat' : 1,
'resize' : 1, 'resize' : 1,
'scayt' : 1,
'showborders' : 1, 'showborders' : 1,
'sourcearea' : 1, 'sourcearea' : 1,
'specialchar' : 1, 'specialchar' : 1,
'stylescombo' : 1, 'stylescombo' : 1,
'tab' : 1, 'tab' : 1,
'table' : 1, 'table' : 1,
'tableselection' : 1,
'tabletools' : 1, 'tabletools' : 1,
'toolbar' : 1, 'toolbar' : 1,
'undo' : 1, 'undo' : 1,
'uploadimage' : 1,
'wsc' : 1,
'wysiwygarea' : 1 'wysiwygarea' : 1
}, },
languages : { languages : {
'af' : 1, 'af' : 1,
'ar' : 1, 'ar' : 1,
'az' : 1,
'bg' : 1, 'bg' : 1,
'bn' : 1, 'bn' : 1,
'bs' : 1, 'bs' : 1,
@ -78,6 +102,7 @@ var CKBUILDER_CONFIG = {
'cy' : 1, 'cy' : 1,
'da' : 1, 'da' : 1,
'de' : 1, 'de' : 1,
'de-ch' : 1,
'el' : 1, 'el' : 1,
'en' : 1, 'en' : 1,
'en-au' : 1, 'en-au' : 1,
@ -85,6 +110,7 @@ var CKBUILDER_CONFIG = {
'en-gb' : 1, 'en-gb' : 1,
'eo' : 1, 'eo' : 1,
'es' : 1, 'es' : 1,
'es-mx' : 1,
'et' : 1, 'et' : 1,
'eu' : 1, 'eu' : 1,
'fa' : 1, 'fa' : 1,
@ -114,6 +140,7 @@ var CKBUILDER_CONFIG = {
'nb' : 1, 'nb' : 1,
'nl' : 1, 'nl' : 1,
'no' : 1, 'no' : 1,
'oc' : 1,
'pl' : 1, 'pl' : 1,
'pt' : 1, 'pt' : 1,
'pt-br' : 1, 'pt-br' : 1,
@ -128,6 +155,7 @@ var CKBUILDER_CONFIG = {
'sv' : 1, 'sv' : 1,
'th' : 1, 'th' : 1,
'tr' : 1, 'tr' : 1,
'tt' : 1,
'ug' : 1, 'ug' : 1,
'uk' : 1, 'uk' : 1,
'vi' : 1, 'vi' : 1,

View File

@ -1,12 +1,17 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
// Compressed version of core/ckeditor_base.js. See original for instructions. // Compressed version of core/ckeditor_base.js. See original for instructions.
/*jsl:ignore*/ /* jshint ignore:start */
window.CKEDITOR||(window.CKEDITOR=function(){var b={timestamp:"",version:"%VERSION%",revision:"%REV%",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var a=window.CKEDITOR_BASEPATH||"";if(!a)for(var b=document.getElementsByTagName("script"),c=0;c<b.length;c++){var d=b[c].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(d){a=d[1];break}}-1==a.indexOf(":/")&&"//"!=a.slice(0,2)&&(a=0===a.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+a:location.href.match(/^[^\?]*\/(?:)/)[0]+a);if(!a)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return a}(),getUrl:function(a){-1==a.indexOf(":/")&&0!==a.indexOf("/")&&(a=this.basePath+a);this.timestamp&&"/"!=a.charAt(a.length-1)&&!/[&?]t=/.test(a)&&(a+=(0<=a.indexOf("?")?"&":"?")+"t="+this.timestamp);return a},domReady:function(){function a(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",a,!1),b()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",a),b())}catch(d){}}function b(){for(var a;a=c.shift();)a()}var c=[];return function(b){c.push(b);"complete"===document.readyState&&setTimeout(a,1);if(1==c.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",a,!1),window.addEventListener("load",a,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",a);window.attachEvent("onload",a);b=!1;try{b=!window.frameElement}catch(e){}if(document.documentElement.doScroll&&b){var f=function(){try{document.documentElement.doScroll("left")}catch(b){setTimeout(f,1);return}a()};f()}}}}()},e=window.CKEDITOR_GETURL;if(e){var g=b.getUrl;b.getUrl=function(a){return e.call(b,a)||g.call(b,a)}}return b}()); /* jscs:disable */
/*jsl:end*/ window.CKEDITOR||(window.CKEDITOR=function(){var e=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,b={timestamp:"",version:"%VERSION%",revision:"%REV%",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:e},status:"unloaded",basePath:function(){var a=window.CKEDITOR_BASEPATH||"";if(!a)for(var b=document.getElementsByTagName("script"),c=0;c<b.length;c++){var f=b[c].src.match(e);if(f){a=f[1];break}}-1==a.indexOf(":/")&&"//"!=a.slice(0,2)&&(a=0===a.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+
a:location.href.match(/^[^\?]*\/(?:)/)[0]+a);if(!a)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return a}(),getUrl:function(a){-1==a.indexOf(":/")&&0!==a.indexOf("/")&&(a=this.basePath+a);this.timestamp&&"/"!=a.charAt(a.length-1)&&!/[&?]t=/.test(a)&&(a+=(0<=a.indexOf("?")?"&":"?")+"t="+this.timestamp);return a},domReady:function(){function a(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",
a,!1),b()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",a),b())}catch(f){}}function b(){for(var a;a=c.shift();)a()}var c=[];return function(b){c.push(b);"complete"===document.readyState&&setTimeout(a,1);if(1==c.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",a,!1),window.addEventListener("load",a,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",a);window.attachEvent("onload",a);b=!1;try{b=
!window.frameElement}catch(e){}if(document.documentElement.doScroll&&b){var d=function(){try{document.documentElement.doScroll("left")}catch(b){setTimeout(d,1);return}a()};d()}}}}()},d=window.CKEDITOR_GETURL;if(d){var g=b.getUrl;b.getUrl=function(a){return d.call(b,a)||g.call(b,a)}}return b}());
/* jscs:enable */
/* jshint ignore:end */
if ( CKEDITOR.loader ) if ( CKEDITOR.loader )
CKEDITOR.loader.load( 'ckeditor' ); CKEDITOR.loader.load( 'ckeditor' );
@ -20,8 +25,9 @@ else {
script.type = 'text/javascript'; script.type = 'text/javascript';
script.src = CKEDITOR.getUrl( 'core/loader.js' ); script.src = CKEDITOR.getUrl( 'core/loader.js' );
document.body.appendChild( script ); document.body.appendChild( script );
} else } else {
document.write( '<script type="text/javascript" src="' + CKEDITOR.getUrl( 'core/loader.js' ) + '"></script>' ); document.write( '<script type="text/javascript" src="' + CKEDITOR.getUrl( 'core/loader.js' ) + '"></script>' );
}
} }
@ -36,7 +42,7 @@ else {
* *
* CKEDITOR.skinName = 'myskin,/customstuff/myskin/'; * CKEDITOR.skinName = 'myskin,/customstuff/myskin/';
* *
* @cfg {String} [skinName='moono'] * @cfg {String} [skinName='moono-lisa']
* @member CKEDITOR * @member CKEDITOR
*/ */
CKEDITOR.skinName = 'moono'; CKEDITOR.skinName = 'moono-lisa';

View File

@ -1,40 +1,37 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.html or http://ckeditor.com/license * For licensing, see https://ckeditor.com/legal/ckeditor-oss-license
*/ */
CKEDITOR.editorConfig = function( config ) { CKEDITOR.editorConfig = function( config ) {
// %REMOVE_START% // %REMOVE_START%
// The configuration options below are needed when running CKEditor from source files. // The configuration options below are needed when running CKEditor from source files.
config.plugins = 'basicstyles,blockquote,dialogui,dialog,clipboard,panel,floatpanel,menu,contextmenu,button,toolbar,enterkey,entities,floatingspace,listblock,richcombo,format,horizontalrule,htmlwriter,wysiwygarea,image,indent,indentlist,fakeobjects,link,list,magicline,maximize,removeformat,sourcearea,specialchar,stylescombo,tab,table,tabletools,undo,font,justify,showborders,iframe,panelbutton,colorbutton'; config.plugins = 'dialogui,dialog,basicstyles,blockquote,notification,button,toolbar,clipboard,panel,floatpanel,menu,contextmenu,resize,elementspath,enterkey,entities,popup,filetools,filebrowser,floatingspace,listblock,richcombo,format,horizontalrule,htmlwriter,wysiwygarea,image,indent,indentlist,fakeobjects,link,list,magicline,maximize,pastetext,removeformat,showborders,sourcearea,specialchar,menubutton,stylescombo,tab,table,tabletools,tableselection,undo,lineutils,widgetselection,widget,notificationaggregator,iframe,justify,font,panelbutton,colordialog,colorbutton,youtube';
config.skin = 'kama'; config.skin = 'kama';
// %REMOVE_END% // %REMOVE_END%
// Define changes to default configuration here. // Define changes to default configuration here.
// For the complete reference: // For complete reference see:
// http://docs.ckeditor.com/#!/api/CKEDITOR.config // http://docs.ckeditor.com/#!/api/CKEDITOR.config
// The toolbar groups arrangement, optimized for two toolbar rows. // The toolbar groups arrangement, optimized for two toolbar rows.
config.toolbarGroups = [ config.toolbarGroups = [
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] }, { name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] }, { name: 'editing', groups: [ 'find', 'selection' ] },
{ name: 'links' }, { name: 'links' },
{ name: 'insert' }, { name: 'insert' },
{ name: 'forms' },
{ name: 'tools' }, { name: 'tools' },
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] }, { name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
{ name: 'others' }, { name: 'others' },
'/',
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] }, { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
{ name: 'styles' },
{ name: 'colors' }, { name: 'colors' },
{ name: 'about' } { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
{ name: 'styles' }
]; ];
// Se the most common block elements. // Set the most common block elements.
config.format_tags = 'p;h1;h2;h3;pre'; config.format_tags = 'p;h1;h2;h3;pre';
config.height = 100; config.height = 150;
}; };

View File

@ -1,6 +1,6 @@
/* /*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
body body
@ -22,6 +22,9 @@ body
{ {
font-size: 13px; font-size: 13px;
line-height: 1.6; line-height: 1.6;
/* Fix for missing scrollbars with RTL texts. (#10488) */
word-wrap: break-word;
} }
blockquote blockquote
@ -93,6 +96,8 @@ 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;
tab-size: 4;
} }
.marker .marker
@ -108,16 +113,95 @@ span[lang]
figure figure
{ {
text-align: center; text-align: center;
border: solid 1px #ccc; outline: solid 1px #ccc;
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: block; /* For IE8 */ display: inline-block;
} }
figure figcaption figure > figcaption
{ {
text-align: center; text-align: center;
display: block; /* For IE8 */ display: block; /* For IE8 */
} }
a > img {
padding: 1px;
margin: 1px;
border: none;
outline: 1px solid #0782C1;
}
/* Widget Styles */
.code-featured
{
border: 5px solid red;
}
.math-featured
{
padding: 20px;
box-shadow: 0 0 2px rgba(200, 0, 0, 1);
background-color: rgba(255, 0, 0, 0.05);
margin: 10px;
}
.image-clean
{
border: 0;
background: none;
padding: 0;
}
.image-clean > figcaption
{
font-size: .9em;
text-align: right;
}
.image-grayscale
{
background-color: white;
color: #666;
}
.image-grayscale img, img.image-grayscale
{
filter: grayscale(100%);
}
.embed-240p
{
max-width: 426px;
max-height: 240px;
margin:0 auto;
}
.embed-360p
{
max-width: 640px;
max-height: 360px;
margin:0 auto;
}
.embed-480p
{
max-width: 854px;
max-height: 480px;
margin:0 auto;
}
.embed-720p
{
max-width: 1280px;
max-height: 720px;
margin:0 auto;
}
.embed-1080p
{
max-width: 1920px;
max-height: 1080px;
margin:0 auto;
}

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -8,7 +8,7 @@
*/ */
( function() { ( function() {
// Disable HC detection in WebKit. (#5429) // Disable HC detection in WebKit. (https://dev.ckeditor.com/ticket/5429)
if ( CKEDITOR.env.webkit ) if ( CKEDITOR.env.webkit )
CKEDITOR.env.hc = false; CKEDITOR.env.hc = false;
else { else {
@ -19,13 +19,13 @@
hcDetect.appendTo( CKEDITOR.document.getHead() ); hcDetect.appendTo( CKEDITOR.document.getHead() );
// Update CKEDITOR.env. // Update CKEDITOR.env.
// Catch exception needed sometimes for FF. (#4230) // Catch exception needed sometimes for FF. (https://dev.ckeditor.com/ticket/4230)
try { try {
var top = hcDetect.getComputedStyle( 'border-top-color' ), var top = hcDetect.getComputedStyle( 'border-top-color' ),
right = hcDetect.getComputedStyle( 'border-right-color' ); right = hcDetect.getComputedStyle( 'border-right-color' );
// We need to check if getComputedStyle returned any value, because on FF // We need to check if getComputedStyle returned any value, because on FF
// it returnes empty string if CKEditor is loaded in hidden iframe. (#11121) // it returnes empty string if CKEditor is loaded in hidden iframe. (https://dev.ckeditor.com/ticket/11121)
CKEDITOR.env.hc = !!( top && top == right ); CKEDITOR.env.hc = !!( top && top == right );
} catch ( e ) { } catch ( e ) {
CKEDITOR.env.hc = false; CKEDITOR.env.hc = false;

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -126,7 +126,7 @@ CKEDITOR.remove = function( editor ) {
}; };
/** /**
* Returns a string will all CSS rules passed to the {@link CKEDITOR#addCss} method. * Returns a string with all CSS rules passed to the {@link CKEDITOR#addCss} method.
* *
* @returns {String} A string containing CSS rules. * @returns {String} A string containing CSS rules.
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -9,9 +9,7 @@
*/ */
// #### Compressed Code // #### Compressed Code
// Must be updated on changes in the script as well as updated in the ckeditor.js file. // Compressed code in ckeditor.js must be be updated on changes in the script.
// window.CKEDITOR||(window.CKEDITOR=function(){var b={timestamp:"",version:"%VERSION%",revision:"%REV%",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var a=window.CKEDITOR_BASEPATH||"";if(!a)for(var b=document.getElementsByTagName("script"),c=0;c<b.length;c++){var d=b[c].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(d){a=d[1];break}}-1==a.indexOf(":/")&&"//"!=a.slice(0,2)&&(a=0===a.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+a:location.href.match(/^[^\?]*\/(?:)/)[0]+a);if(!a)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return a}(),getUrl:function(a){-1==a.indexOf(":/")&&0!==a.indexOf("/")&&(a=this.basePath+a);this.timestamp&&"/"!=a.charAt(a.length-1)&&!/[&?]t=/.test(a)&&(a+=(0<=a.indexOf("?")?"&":"?")+"t="+this.timestamp);return a},domReady:function(){function a(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",a,!1),b()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",a),b())}catch(d){}}function b(){for(var a;a=c.shift();)a()}var c=[];return function(b){c.push(b);"complete"===document.readyState&&setTimeout(a,1);if(1==c.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",a,!1),window.addEventListener("load",a,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",a);window.attachEvent("onload",a);b=!1;try{b=!window.frameElement}catch(e){}if(document.documentElement.doScroll&&b){var f=function(){try{document.documentElement.doScroll("left")}catch(b){setTimeout(f,1);return}a()};f()}}}}()},e=window.CKEDITOR_GETURL;if(e){var g=b.getUrl;b.getUrl=function(a){return e.call(b,a)||g.call(b,a)}}return b}());
// The Closure Compiler online service should be used when updating this manually: // The Closure Compiler online service should be used when updating this manually:
// http://closure-compiler.appspot.com/ // http://closure-compiler.appspot.com/
@ -25,6 +23,8 @@ if ( !window.CKEDITOR ) {
* @singleton * @singleton
*/ */
window.CKEDITOR = ( function() { window.CKEDITOR = ( function() {
var basePathSrcPattern = /(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i;
var CKEDITOR = { var CKEDITOR = {
/** /**
@ -33,6 +33,10 @@ if ( !window.CKEDITOR ) {
* by the editor code, guaranteeing clean cache results when * by the editor code, guaranteeing clean cache results when
* upgrading. * upgrading.
* *
* **Note:** There is [a known issue where "icons.png" does not include
* timestamp](https://dev.ckeditor.com/ticket/10685) and might get cached.
* We are working on having it fixed.
*
* alert( CKEDITOR.timestamp ); // e.g. '87dm' * alert( CKEDITOR.timestamp ); // e.g. '87dm'
*/ */
timestamp: '', // %REMOVE_LINE% timestamp: '', // %REMOVE_LINE%
@ -41,7 +45,7 @@ if ( !window.CKEDITOR ) {
// for each release and generated by the releaser. // for each release and generated by the releaser.
// (Base 36 value of each component of YYMMDDHH - 4 chars total - e.g. 87bm == 08071122) // (Base 36 value of each component of YYMMDDHH - 4 chars total - e.g. 87bm == 08071122)
timestamp: '%TIMESTAMP%', timestamp: '%TIMESTAMP%',
*/ // %REMOVE_LINE% // %REMOVE_LINE% */
/** /**
* Contains the CKEditor version number. * Contains the CKEditor version number.
@ -76,7 +80,8 @@ if ( !window.CKEDITOR ) {
* @private * @private
*/ */
_: { _: {
pending: [] pending: [],
basePathSrcPattern: basePathSrcPattern
}, },
/** /**
@ -111,9 +116,6 @@ if ( !window.CKEDITOR ) {
* @property {String} * @property {String}
*/ */
basePath: ( function() { basePath: ( function() {
// ATTENTION: fixes to this code must be ported to
// var basePath in "core/loader.js".
// Find out the editor directory path, based on its <script> tag. // Find out the editor directory path, based on its <script> tag.
var path = window.CKEDITOR_BASEPATH || ''; var path = window.CKEDITOR_BASEPATH || '';
@ -121,7 +123,7 @@ if ( !window.CKEDITOR ) {
var scripts = document.getElementsByTagName( 'script' ); var scripts = document.getElementsByTagName( 'script' );
for ( var i = 0; i < scripts.length; i++ ) { for ( var i = 0; i < scripts.length; i++ ) {
var match = scripts[ i ].src.match( /(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i ); var match = scripts[ i ].src.match( basePathSrcPattern );
if ( match ) { if ( match ) {
path = match[ 1 ]; path = match[ 1 ];
@ -193,7 +195,7 @@ if ( !window.CKEDITOR ) {
* @todo * @todo
*/ */
domReady: ( function() { domReady: ( function() {
// Based on the original jQuery code. // Based on the original jQuery code (available under the MIT license, see LICENSE.md).
var callbacks = []; var callbacks = [];
@ -260,6 +262,10 @@ if ( !window.CKEDITOR ) {
} catch ( e ) {} } catch ( e ) {}
if ( document.documentElement.doScroll && toplevel ) { if ( document.documentElement.doScroll && toplevel ) {
scrollCheck();
}
}
function scrollCheck() { function scrollCheck() {
try { try {
document.documentElement.doScroll( 'left' ); document.documentElement.doScroll( 'left' );
@ -269,9 +275,6 @@ if ( !window.CKEDITOR ) {
} }
onReady(); onReady();
} }
scrollCheck();
}
}
}; };
} )() } )()
@ -308,7 +311,7 @@ if ( !window.CKEDITOR ) {
* @param {CKEDITOR.config} config A configuration object containing the * @param {CKEDITOR.config} config A configuration object containing the
* settings defined for a {@link CKEDITOR.editor} instance up to this * settings defined for a {@link CKEDITOR.editor} instance up to this
* function call. Note that not all settings may still be available. See * function call. Note that not all settings may still be available. See
* [Configuration Loading Order](http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Setting_Configurations#Configuration_Loading_Order) * [Configuration Loading Order](https://docs.ckeditor.com/ckeditor4/docs/#!/guide/dev_configuration)
* for details. * for details.
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -13,6 +13,7 @@
* } ); * } );
* *
* @class * @class
* @extends CKEDITOR.commandDefinition
* @mixins CKEDITOR.event * @mixins CKEDITOR.event
* @constructor Creates a command class instance. * @constructor Creates a command class instance.
* @param {CKEDITOR.editor} editor The editor instance this command will be * @param {CKEDITOR.editor} editor The editor instance this command will be
@ -35,6 +36,9 @@ CKEDITOR.command = function( editor, commandDefinition ) {
* *
* command.exec(); // The command gets executed. * command.exec(); // The command gets executed.
* *
* **Note:** You should use the {@link CKEDITOR.editor#execCommand} method instead of calling
* `command.exec()` directly.
*
* @param {Object} [data] Any data to pass to the command. Depends on the * @param {Object} [data] Any data to pass to the command. Depends on the
* command implementation and requirements. * command implementation and requirements.
* @returns {Boolean} A boolean indicating that the command has been successfully executed. * @returns {Boolean} A boolean indicating that the command has been successfully executed.
@ -43,7 +47,7 @@ CKEDITOR.command = function( editor, commandDefinition ) {
if ( this.state == CKEDITOR.TRISTATE_DISABLED || !this.checkAllowed() ) if ( this.state == CKEDITOR.TRISTATE_DISABLED || !this.checkAllowed() )
return false; return false;
if ( this.editorFocus ) // Give editor focus if necessary (#4355). if ( this.editorFocus ) // Give editor focus if necessary (https://dev.ckeditor.com/ticket/4355).
editor.focus(); editor.focus();
if ( this.fire( 'exec' ) === false ) if ( this.fire( 'exec' ) === false )

View File

@ -1,10 +1,10 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
* @fileOverview Defines the "virtual" {@link CKEDITOR.commandDefinition} class, * @fileOverview Defines the "virtual" {@link CKEDITOR.commandDefinition} class
* which contains the defintion of a command. This file is for * which contains the defintion of a command. This file is for
* documentation purposes only. * documentation purposes only.
*/ */
@ -27,14 +27,14 @@
* } ); * } );
* *
* @method exec * @method exec
* @param {CKEDITOR.editor} editor The editor within which run the command. * @param {CKEDITOR.editor} editor The editor within which to run the command.
* @param {Object} [data] Additional data to be used to execute the command. * @param {Object} [data] Additional data to be used to execute the command.
* @returns {Boolean} Whether the command has been successfully executed. * @returns {Boolean} Whether the command has been successfully executed.
* Defaults to `true`, if nothing is returned. * Defaults to `true` if nothing is returned.
*/ */
/** /**
* Whether the command need to be hooked into the redo/undo system. * Whether the command needs to be hooked into the redo/undo system.
* *
* editorInstance.addCommand( 'alertName', { * editorInstance.addCommand( 'alertName', {
* exec: function( editor ) { * exec: function( editor ) {
@ -52,14 +52,18 @@
* command itself manually, and that the return value of this command is not to * command itself manually, and that the return value of this command is not to
* be returned by the {@link #exec} function. * be returned by the {@link #exec} function.
* *
* editorInstance.addCommand( 'loadOptions', { * editorInstance.addCommand( 'loadoptions', {
* exec: function( editor ) { * exec: function( editor ) {
* var cmd = this;
* // Asynchronous operation below. * // Asynchronous operation below.
* CKEDITOR.ajax.loadXml( 'data.xml', function() { * CKEDITOR.ajax.loadXml( 'data.xml', function() {
* editor.fire( 'afterCommandExec' ); * editor.fire( 'afterCommandExec', {
* name: 'loadoptions',
* command: cmd
* } );
* } ); * } );
* }, * },
* async: true // The command need some time to complete after exec function returns. * async: true // The command needs some time to complete after the exec function returns.
* } ); * } );
* *
* @property {Boolean} [async=false] * @property {Boolean} [async=false]
@ -72,11 +76,12 @@
* exec: function( editor ) { * exec: function( editor ) {
* // ... * // ...
* }, * },
* editorFocus: false // The command doesn't require focusing the editing document. * editorFocus: false // The command does not require focusing the editing document.
* } ); * } );
* *
* See also {@link CKEDITOR.command#editorFocus}.
*
* @property {Boolean} [editorFocus=true] * @property {Boolean} [editorFocus=true]
* @see CKEDITOR.command#editorFocus
*/ */
@ -87,14 +92,14 @@
* exec: function( editor ) { * exec: function( editor ) {
* // ... * // ...
* }, * },
* startDisabled: true // Command is unavailable until selection is inside a link. * startDisabled: true // The command is unavailable until the selection is inside a link.
* } ); * } );
* *
* @property {Boolean} [startDisabled=false] * @property {Boolean} [startDisabled=false]
*/ */
/** /**
* Indicates that this command is sensible to the selection context. * Indicates that this command is sensitive to the selection context.
* If `true`, the {@link CKEDITOR.command#method-refresh} method will be * If `true`, the {@link CKEDITOR.command#method-refresh} method will be
* called for this command on selection changes, with a single parameter * called for this command on selection changes, with a single parameter
* representing the current elements path. * representing the current elements path.
@ -103,10 +108,10 @@
*/ */
/** /**
* Defined by command definition a function to determinate the command state, it will be invoked * Defined by the command definition, a function to determine the command state. It will be invoked
* when editor has it's `states` or `selection` changed. * when the editor has its `states` or `selection` changed.
* *
* **Note:** The function provided must be calling {@link CKEDITOR.command#setState} in all circumstance, * **Note:** The function provided must be calling {@link CKEDITOR.command#setState} in all circumstances
* if it is intended to update the command state. * if it is intended to update the command state.
* *
* @method refresh * @method refresh
@ -131,9 +136,27 @@
* exec: function( editor ) { * exec: function( editor ) {
* // ... * // ...
* }, * },
* modes: { wysiwyg:1 } // Command is available in wysiwyg mode only. * modes: { wysiwyg:1 } // The command is available in wysiwyg mode only.
* } ); * } );
* *
* See also {@link CKEDITOR.command#modes}.
*
* @property {Object} [modes={ wysiwyg:1 }] * @property {Object} [modes={ wysiwyg:1 }]
* @see CKEDITOR.command#modes */
/**
* Whether the command should be enabled in the {@link CKEDITOR.editor#setReadOnly read-only mode}.
*
* @since 4.0
* @property {Boolean} [readOnly=false]
*/
/**
* A property that should be set when a command has no keystroke assigned by {@link CKEDITOR.editor#setKeystroke}, but
* the keystroke is still supported. For example: `cut`, `copy` and `paste` commands are handled that way.
* This property is used when displaying keystroke information in tooltips and context menus. It is used by
* {@link CKEDITOR.editor#getCommandKeystroke}.
*
* @since 4.6.0
* @property {Number} fakeKeystroke
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -9,10 +9,13 @@
*/ */
/** /**
* Used in conjunction with {@link CKEDITOR.config#enterMode} * Used in conjunction with the {@link CKEDITOR.config#enterMode}
* and {@link CKEDITOR.config#shiftEnterMode} configuration * and {@link CKEDITOR.config#shiftEnterMode} configuration
* settings to make the editor produce `<p>` tags when * settings to make the editor produce `<p>` tags when
* using the *Enter* key. * using the <kbd>Enter</kbd> key.
*
* Read more in the [documentation](#!/guide/dev_enterkey) and see the
* [SDK sample](https://sdk.ckeditor.com/samples/enterkey.html).
* *
* @readonly * @readonly
* @property {Number} [=1] * @property {Number} [=1]
@ -21,10 +24,13 @@
CKEDITOR.ENTER_P = 1; CKEDITOR.ENTER_P = 1;
/** /**
* Used in conjunction with {@link CKEDITOR.config#enterMode} * Used in conjunction with the {@link CKEDITOR.config#enterMode}
* and {@link CKEDITOR.config#shiftEnterMode} configuration * and {@link CKEDITOR.config#shiftEnterMode} configuration
* settings to make the editor produce `<br>` tags when * settings to make the editor produce `<br>` tags when
* using the *Enter* key. * using the <kbd>Enter</kbd> key.
*
* Read more in the [documentation](#!/guide/dev_enterkey) and see the
* [SDK sample](https://sdk.ckeditor.com/samples/enterkey.html).
* *
* @readonly * @readonly
* @property {Number} [=2] * @property {Number} [=2]
@ -33,10 +39,13 @@ CKEDITOR.ENTER_P = 1;
CKEDITOR.ENTER_BR = 2; CKEDITOR.ENTER_BR = 2;
/** /**
* Used in conjunction with {@link CKEDITOR.config#enterMode} * Used in conjunction with the {@link CKEDITOR.config#enterMode}
* and {@link CKEDITOR.config#shiftEnterMode} configuration * and {@link CKEDITOR.config#shiftEnterMode} configuration
* settings to make the editor produce `<div>` tags when * settings to make the editor produce `<div>` tags when
* using the *Enter* key. * using the <kbd>Enter</kbd> key.
*
* Read more in the [documentation](#!/guide/dev_enterkey) and see the
* [SDK sample](https://sdk.ckeditor.com/samples/enterkey.html).
* *
* @readonly * @readonly
* @property {Number} [=3] * @property {Number} [=3]
@ -49,18 +58,24 @@ CKEDITOR.ENTER_DIV = 3;
* reflected in all editor instances, if not specified otherwise for a particular * reflected in all editor instances, if not specified otherwise for a particular
* instance. * instance.
* *
* Read more about setting CKEditor configuration in the
* [documentation](#!/guide/dev_configuration).
*
* @class * @class
* @singleton * @singleton
*/ */
CKEDITOR.config = { CKEDITOR.config = {
/** /**
* The URL path for the custom configuration file to be loaded. If not * The URL path to the custom configuration file to be loaded. If not
* overloaded with inline configuration, it defaults to the `config.js` * overwritten with inline configuration, it defaults to the `config.js`
* file present in the root of the CKEditor installation directory. * file present in the root of the CKEditor installation directory.
* *
* CKEditor will recursively load custom configuration files defined inside * CKEditor will recursively load custom configuration files defined inside
* other custom configuration files. * other custom configuration files.
* *
* Read more about setting CKEditor configuration in the
* [documentation](#!/guide/dev_configuration).
*
* // Load a specific configuration file. * // Load a specific configuration file.
* CKEDITOR.replace( 'myfield', { customConfig: '/myconfig.js' } ); * CKEDITOR.replace( 'myfield', { customConfig: '/myconfig.js' } );
* *
@ -72,7 +87,7 @@ CKEDITOR.config = {
customConfig: 'config.js', customConfig: 'config.js',
/** /**
* Whether the replaced element (usually a `<textarea>`) * Whether the element replaced by the editor (usually a `<textarea>`)
* is to be updated automatically when posting the form containing the editor. * is to be updated automatically when posting the form containing the editor.
* *
* @cfg * @cfg
@ -85,6 +100,9 @@ CKEDITOR.config = {
* the language specified in the {@link CKEDITOR.config#defaultLanguage} * the language specified in the {@link CKEDITOR.config#defaultLanguage}
* configuration setting is used. * configuration setting is used.
* *
* Read more in the [documentation](#!/guide/dev_uilanguage) and see the
* [SDK sample](https://sdk.ckeditor.com/samples/uilanguages.html).
*
* // Load the German interface. * // Load the German interface.
* config.language = 'de'; * config.language = 'de';
* *
@ -96,6 +114,9 @@ CKEDITOR.config = {
* The language to be used if the {@link CKEDITOR.config#language} * The language to be used if the {@link CKEDITOR.config#language}
* setting is left empty and it is not possible to localize the editor to the user language. * setting is left empty and it is not possible to localize the editor to the user language.
* *
* Read more in the [documentation](#!/guide/dev_uilanguage) and see the
* [SDK sample](https://sdk.ckeditor.com/samples/uilanguages.html).
*
* config.defaultLanguage = 'it'; * config.defaultLanguage = 'it';
* *
* @cfg * @cfg
@ -103,15 +124,17 @@ CKEDITOR.config = {
defaultLanguage: 'en', defaultLanguage: 'en',
/** /**
* The writting direction of the language used to write the editor * The writing direction of the language which is used to create editor content.
* contents. Allowed values are: * Allowed values are:
* *
* * `''` (empty string) - indicate content direction will be the same with either the editor * * `''` (an empty string) &ndash; Indicates that content direction will be the same as either
* UI direction or page element direction depending on the creators: * the editor UI direction or the page element direction depending on the editor type:
* * Themed UI: The same with user interface language direction; * * [Classic editor](#!/guide/dev_framed) &ndash; The same as the user interface language direction.
* * Inline: The same with the editable element text direction; * * [Inline editor](#!/guide/dev_inline)&ndash; The same as the editable element text direction.
* * `'ltr'` - for Left-To-Right language (like English); * * `'ltr'` &ndash; Indicates a Left-To-Right text direction (like in English).
* * `'rtl'` - for Right-To-Left languages (like Arabic). * * `'rtl'` &ndash; Indicates a Right-To-Left text direction (like in Arabic).
*
* See the [SDK sample](https://sdk.ckeditor.com/samples/language.html).
* *
* Example: * Example:
* *
@ -122,18 +145,21 @@ CKEDITOR.config = {
contentsLangDirection: '', contentsLangDirection: '',
/** /**
* Sets the behavior of the *Enter* key. It also determines other behavior * Sets the behavior of the <kbd>Enter</kbd> key. It also determines other behavior
* rules of the editor, like whether the `<br>` element is to be used * rules of the editor, like whether the `<br>` element is to be used
* as a paragraph separator when indenting text. * as a paragraph separator when indenting text.
* The allowed values are the following constants that cause the behavior outlined below: * The allowed values are the following constants that cause the behavior outlined below:
* *
* * {@link CKEDITOR#ENTER_P} (1) &ndash; new `<p>` paragraphs are created; * * {@link CKEDITOR#ENTER_P} (1) &ndash; New `<p>` paragraphs are created.
* * {@link CKEDITOR#ENTER_BR} (2) &ndash; lines are broken with `<br>` elements; * * {@link CKEDITOR#ENTER_BR} (2) &ndash; Lines are broken with `<br>` elements.
* * {@link CKEDITOR#ENTER_DIV} (3) &ndash; new `<div>` blocks are created. * * {@link CKEDITOR#ENTER_DIV} (3) &ndash; New `<div>` blocks are created.
* *
* **Note**: It is recommended to use the {@link CKEDITOR#ENTER_P} setting because of * **Note**: It is recommended to use the {@link CKEDITOR#ENTER_P} setting because of
* its semantic value and correctness. The editor is optimized for this setting. * its semantic value and correctness. The editor is optimized for this setting.
* *
* Read more in the [documentation](#!/guide/dev_enterkey) and see the
* [SDK sample](https://sdk.ckeditor.com/samples/enterkey.html).
*
* // Not recommended. * // Not recommended.
* config.enterMode = CKEDITOR.ENTER_BR; * config.enterMode = CKEDITOR.ENTER_BR;
* *
@ -142,12 +168,15 @@ CKEDITOR.config = {
enterMode: CKEDITOR.ENTER_P, enterMode: CKEDITOR.ENTER_P,
/** /**
* Force the use of {@link CKEDITOR.config#enterMode} as line break regardless * Forces the use of {@link CKEDITOR.config#enterMode} as line break regardless
* of the context. If, for example, {@link CKEDITOR.config#enterMode} is set * of the context. If, for example, {@link CKEDITOR.config#enterMode} is set
* to {@link CKEDITOR#ENTER_P}, pressing the *Enter* key inside a * to {@link CKEDITOR#ENTER_P}, pressing the <kbd>Enter</kbd> key inside a
* `<div>` element will create a new paragraph with `<p>` * `<div>` element will create a new paragraph with a `<p>`
* instead of a `<div>`. * instead of a `<div>`.
* *
* Read more in the [documentation](#!/guide/dev_enterkey) and see the
* [SDK sample](https://sdk.ckeditor.com/samples/enterkey.html).
*
* // Not recommended. * // Not recommended.
* config.forceEnterMode = true; * config.forceEnterMode = true;
* *
@ -158,13 +187,16 @@ CKEDITOR.config = {
/** /**
* Similarly to the {@link CKEDITOR.config#enterMode} setting, it defines the behavior * Similarly to the {@link CKEDITOR.config#enterMode} setting, it defines the behavior
* of the *Shift+Enter* key combination. * of the <kbd>Shift+Enter</kbd> key combination.
* *
* The allowed values are the following constants the behavior outlined below: * The allowed values are the following constants that cause the behavior outlined below:
* *
* * {@link CKEDITOR#ENTER_P} (1) &ndash; new `<p>` paragraphs are created; * * {@link CKEDITOR#ENTER_P} (1) &ndash; New `<p>` paragraphs are created.
* * {@link CKEDITOR#ENTER_BR} (2) &ndash; lines are broken with `<br>` elements; * * {@link CKEDITOR#ENTER_BR} (2) &ndash; Lines are broken with `<br>` elements.
* * {@link CKEDITOR#ENTER_DIV} (3) &ndash; new `<div>` blocks are created. * * {@link CKEDITOR#ENTER_DIV} (3) &ndash; New `<div>` blocks are created.
*
* Read more in the [documentation](#!/guide/dev_enterkey) and see the
* [SDK sample](https://sdk.ckeditor.com/samples/enterkey.html).
* *
* Example: * Example:
* *
@ -207,11 +239,11 @@ CKEDITOR.config = {
* *
* config.bodyClass = 'contents'; * config.bodyClass = 'contents';
* *
* **Note:** Editor needs to load stylesheets containing contents styles. You can either * **Note:** The editor needs to load stylesheets containing contents styles. You can either
* copy them to the `contents.css` file that editor loads by default or set the {@link #contentsCss} * copy them to the `contents.css` file that the editor loads by default or set the {@link #contentsCss}
* option. * option.
* *
* **Note:** This setting applies only to the classic editor (the one that uses `iframe`). * **Note:** This setting only applies to [classic editor](#!/guide/dev_framed) (the one that uses `iframe`).
* *
* @since 3.1 * @since 3.1
* @cfg * @cfg
@ -219,10 +251,13 @@ CKEDITOR.config = {
bodyClass: '', bodyClass: '',
/** /**
* Indicates whether the contents to be edited are being input as a full HTML page. * Indicates whether the content to be edited is being input as a full HTML page.
* A full page includes the `<html>`, `<head>`, and `<body>` elements. * A full page includes the `<html>`, `<head>`, and `<body>` elements.
* The final output will also reflect this setting, including the * The final output will also reflect this setting, including the
* `<body>` contents only if this setting is disabled. * `<body>` content only if this setting is disabled.
*
* Read more in the [documentation](#!/guide/dev_fullpage) and see the
* [SDK sample](https://sdk.ckeditor.com/samples/fullpage.html).
* *
* config.fullPage = true; * config.fullPage = true;
* *
@ -232,10 +267,14 @@ CKEDITOR.config = {
fullPage: false, fullPage: false,
/** /**
* The height of the editing area (that includes the editor content). This * The height of the editing area that includes the editor content. This configuration
* can be an integer, for pixel sizes, or any CSS-defined length unit. * option accepts an integer (to denote a value in pixels) or any CSS-defined length unit
* except percent (`%`) values which are not supported.
* *
* **Note:** Percent units (%) are not supported. * **Note:** This configuration option is ignored by [inline editor](#!/guide/dev_inline).
*
* Read more in the [documentation](#!/guide/dev_size) and see the
* [SDK sample](https://sdk.ckeditor.com/samples/size.html).
* *
* config.height = 500; // 500 pixels. * config.height = 500; // 500 pixels.
* config.height = '25em'; // CSS length. * config.height = '25em'; // CSS length.
@ -246,8 +285,28 @@ CKEDITOR.config = {
height: 200, height: 200,
/** /**
* Comma separated list of plugins to be used for an editor instance, * The CSS file(s) to be used to apply style to editor content. It should
* besides, the actual plugins that to be loaded could be still affected by two other settings: * reflect the CSS used in the target pages where the content is to be
* displayed.
*
* **Note:** This configuration value is ignored by [inline editor](#!/guide/dev_inline)
* as it uses the styles that come directly from the page that CKEditor is
* rendered on. It is also ignored in the {@link #fullPage full page mode} in
* which the developer has full control over the page HTML code.
*
* Read more in the [documentation](#!/guide/dev_styles) and see the
* [SDK sample](https://sdk.ckeditor.com/samples/styles.html).
*
* config.contentsCss = '/css/mysitestyles.css';
* config.contentsCss = [ '/css/mysitestyles.css', '/css/anotherfile.css' ];
*
* @cfg {String/Array} [contentsCss=CKEDITOR.getUrl( 'contents.css' )]
*/
contentsCss: CKEDITOR.getUrl( 'contents.css' ),
/**
* Comma-separated list of plugins to be used in an editor instance. Note that
* the actual plugins that are to be loaded could still be affected by two other settings:
* {@link CKEDITOR.config#extraPlugins} and {@link CKEDITOR.config#removePlugins}. * {@link CKEDITOR.config#extraPlugins} and {@link CKEDITOR.config#removePlugins}.
* *
* @cfg {String} [="<default list of plugins>"] * @cfg {String} [="<default list of plugins>"]
@ -256,7 +315,12 @@ CKEDITOR.config = {
/** /**
* A list of additional plugins to be loaded. This setting makes it easier * A list of additional plugins to be loaded. This setting makes it easier
* to add new plugins without having to touch {@link CKEDITOR.config#plugins} setting. * to add new plugins without having to touch the {@link CKEDITOR.config#plugins} setting.
*
* **Note:** The most recommended way to
* [add CKEditor plugins](https://docs.ckeditor.com/ckeditor4/docs/#!/guide/dev_plugins) is through
* [CKEditor Builder](https://ckeditor.com/cke4/builder). Read more in the
* [documentation](#!/guide/dev_plugins).
* *
* config.extraPlugins = 'myplugin,anotherplugin'; * config.extraPlugins = 'myplugin,anotherplugin';
* *
@ -267,11 +331,11 @@ CKEDITOR.config = {
/** /**
* A list of plugins that must not be loaded. This setting makes it possible * A list of plugins that must not be loaded. This setting makes it possible
* to avoid loading some plugins defined in the {@link CKEDITOR.config#plugins} * to avoid loading some plugins defined in the {@link CKEDITOR.config#plugins}
* setting, without having to touch it. * setting without having to touch it.
* *
* **Note:** Plugin required by other plugin cannot be removed (error will be thrown). * **Note:** A plugin required by another plugin cannot be removed and will cause
* So e.g. if `contextmenu` is required by `tabletools`, then it can be removed * an error to be thrown. So for example if `contextmenu` is required by `tabletools`,
* only if `tabletools` isn't loaded. * it can only be removed if `tabletools` is not loaded.
* *
* config.removePlugins = 'elementspath,save,font'; * config.removePlugins = 'elementspath,save,font';
* *
@ -280,13 +344,13 @@ CKEDITOR.config = {
removePlugins: '', removePlugins: '',
/** /**
* List of regular expressions to be executed on input HTML, * A list of regular expressions to be executed on input HTML,
* indicating HTML source code that when matched, must **not** be available in the WYSIWYG * indicating HTML source code that when matched, must **not** be available in the WYSIWYG
* mode for editing. * mode for editing.
* *
* config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // PHP code * config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // PHP code
* config.protectedSource.push( /<%[\s\S]*?%>/g ); // ASP code * config.protectedSource.push( /<%[\s\S]*?%>/g ); // ASP code
* config.protectedSource.push( /(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi ); // ASP.Net code * config.protectedSource.push( /(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi ); // ASP.NET code
* *
* @cfg * @cfg
*/ */
@ -295,6 +359,9 @@ CKEDITOR.config = {
/** /**
* The editor `tabindex` value. * The editor `tabindex` value.
* *
* Read more in the [documentation](#!/guide/dev_tabindex) and see the
* [SDK sample](https://sdk.ckeditor.com/samples/tabindex.html).
*
* config.tabIndex = 1; * config.tabIndex = 1;
* *
* @cfg * @cfg
@ -302,13 +369,18 @@ CKEDITOR.config = {
tabIndex: 0, tabIndex: 0,
/** /**
* The editor UI outer width. This can be an integer, for pixel sizes, or * The editor UI outer width. This configuration option accepts an integer
* any CSS-defined unit. * (to denote a value in pixels) or any CSS-defined length unit.
* *
* Unlike the {@link CKEDITOR.config#height} setting, this * Unlike the {@link CKEDITOR.config#height} setting, this
* one will set the outer width of the entire editor UI, not for the * one will set the outer width of the entire editor UI, not for the
* editing area only. * editing area only.
* *
* **Note:** This configuration option is ignored by [inline editor](#!/guide/dev_inline).
*
* Read more in the [documentation](#!/guide/dev_size) and see the
* [SDK sample](https://sdk.ckeditor.com/samples/size.html).
*
* config.width = 850; // 850 pixels wide. * config.width = 850; // 850 pixels wide.
* config.width = '75%'; // CSS unit. * config.width = '75%'; // CSS unit.
* *
@ -331,24 +403,17 @@ CKEDITOR.config = {
* *
* // Default setting. * // Default setting.
* config.blockedKeystrokes = [ * config.blockedKeystrokes = [
* CKEDITOR.CTRL + 66, // CTRL+B * CKEDITOR.CTRL + 66, // Ctrl+B
* CKEDITOR.CTRL + 73, // CTRL+I * CKEDITOR.CTRL + 73, // Ctrl+I
* CKEDITOR.CTRL + 85, // CTRL+U * CKEDITOR.CTRL + 85 // Ctrl+U
* CKEDITOR.CTRL + 89, // CTRL+Y
* CKEDITOR.CTRL + 90, // CTRL+Z
* CKEDITOR.CTRL + CKEDITOR.SHIFT + 90 // CTRL+SHIFT+Z
* ]; * ];
* *
* @cfg {Array} [blockedKeystrokes=see example] * @cfg {Array} [blockedKeystrokes=see example]
*/ */
blockedKeystrokes: [ blockedKeystrokes: [
CKEDITOR.CTRL + 66, // CTRL+B CKEDITOR.CTRL + 66, // Ctrl+B
CKEDITOR.CTRL + 73, // CTRL+I CKEDITOR.CTRL + 73, // Ctrl+I
CKEDITOR.CTRL + 85, // CTRL+U CKEDITOR.CTRL + 85 // Ctrl+U
CKEDITOR.CTRL + 89, // CTRL+Y
CKEDITOR.CTRL + 90, // CTRL+Z
CKEDITOR.CTRL + CKEDITOR.SHIFT + 90 // CTRL+SHIFT+Z
] ]
}; };
@ -369,7 +434,10 @@ CKEDITOR.config = {
/** /**
* The base user interface color to be used by the editor. Not all skins are * The base user interface color to be used by the editor. Not all skins are
* compatible with this setting. * [compatible with this setting](#!/guide/skin_sdk_chameleon).
*
* Read more in the [documentation](#!/guide/dev_uicolor) and see the
* [SDK sample](https://sdk.ckeditor.com/samples/uicolor.html).
* *
* // Using a color code. * // Using a color code.
* config.uiColor = '#AADC6E'; * config.uiColor = '#AADC6E';

View File

@ -1,16 +1,19 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
( function() { ( function() {
/** @class CKEDITOR */ /** @class CKEDITOR */
/** /**
* Turns a DOM element with `contenteditable` attribute set to `true` into a * Turns a DOM element with the `contenteditable` attribute set to `true` into a
* CKEditor instance. Check {@link CKEDITOR.dtd#$editable} for the list of * CKEditor instance. Check {@link CKEDITOR.dtd#$editable} for a list of
* allowed element names. * allowed element names.
* *
* **Note:** If the DOM element for which inline editing is being enabled does not have
* the `contenteditable` attribute set to `true`, the editor will start in read-only mode.
*
* <div contenteditable="true" id="content">...</div> * <div contenteditable="true" id="content">...</div>
* ... * ...
* CKEDITOR.inline( 'content' ); * CKEDITOR.inline( 'content' );
@ -68,6 +71,7 @@
// Editable itself is the outermost element. // Editable itself is the outermost element.
editor.container = element; editor.container = element;
editor.ui.contentsElement = element;
// Load and process editor data. // Load and process editor data.
editor.setData( editor.getData( 1 ) ); editor.setData( editor.getData( 1 ) );
@ -110,7 +114,7 @@
/** /**
* Calls {@link CKEDITOR#inline} for all page elements with * Calls {@link CKEDITOR#inline} for all page elements with
* `contenteditable` attribute set to `true`. * the `contenteditable` attribute set to `true`.
* *
*/ */
CKEDITOR.inlineAll = function() { CKEDITOR.inlineAll = function() {
@ -145,7 +149,7 @@
/** /**
* Disables creating the inline editor automatically for elements with * Disables creating the inline editor automatically for elements with
* `contenteditable` attribute set to the `true`. * the `contenteditable` attribute set to `true`.
* *
* CKEDITOR.disableAutoInline = true; * CKEDITOR.disableAutoInline = true;
* *

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** @class CKEDITOR */ /** @class CKEDITOR */
@ -20,7 +20,7 @@ CKEDITOR.replaceClass = 'ckeditor';
* Replaces a `<textarea>` or a DOM element (`<div>`) with a CKEditor * Replaces a `<textarea>` or a DOM element (`<div>`) with a CKEditor
* instance. For textareas, the initial value in the editor will be the * instance. For textareas, the initial value in the editor will be the
* textarea value. For DOM elements, their `innerHTML` will be used * textarea value. For DOM elements, their `innerHTML` will be used
* instead. We recommend using `<textarea>` and `<div>` elements only. * instead. It is recommended to use `<textarea>` and `<div>` elements only.
* *
* <textarea id="myfield" name="myfield"></textarea> * <textarea id="myfield" name="myfield"></textarea>
* ... * ...
@ -42,9 +42,21 @@ CKEDITOR.replaceClass = 'ckeditor';
/** /**
* Creates a new editor instance at the end of a specific DOM element. * Creates a new editor instance at the end of a specific DOM element.
* *
* <!DOCTYPE html>
* <html>
* <head>
* <meta charset="utf-8">
* <title>CKEditor</title>
* <!-- Make sure the path to CKEditor is correct. -->
* <script src="/ckeditor/ckeditor.js"></script>
* </head>
* <body>
* <div id="editorSpace"></div> * <div id="editorSpace"></div>
* ... * <script>
* CKEDITOR.appendTo( 'editorSpace' ); * CKEDITOR.appendTo( 'editorSpace' );
* </script>
* </body>
* </html>
* *
* @param {Object/String} element The DOM element, its ID, or name. * @param {Object/String} element The DOM element, its ID, or name.
* @param {Object} [config] The specific configuration to apply to this * @param {Object} [config] The specific configuration to apply to this
@ -53,8 +65,7 @@ CKEDITOR.replaceClass = 'ckeditor';
* @param {String} [data] Since 3.3. Initial value for the instance. * @param {String} [data] Since 3.3. Initial value for the instance.
* @returns {CKEDITOR.editor} The editor instance created. * @returns {CKEDITOR.editor} The editor instance created.
*/ */
CKEDITOR.appendTo = function( element, config, data ) CKEDITOR.appendTo = function( element, config, data ) {
{
return createInstance( element, config, data, CKEDITOR.ELEMENT_MODE_APPENDTO ); return createInstance( element, config, data, CKEDITOR.ELEMENT_MODE_APPENDTO );
}; };
@ -68,17 +79,37 @@ CKEDITOR.replaceClass = 'ckeditor';
* // Replace all <textarea class="myClassName"> elements in the page. * // Replace all <textarea class="myClassName"> elements in the page.
* CKEDITOR.replaceAll( 'myClassName' ); * CKEDITOR.replaceAll( 'myClassName' );
* *
* // Selectively replace <textarea> elements, based on custom assertions. * // Selectively replace <textarea> elements, based on a custom evaluation function.
* CKEDITOR.replaceAll( function( textarea, config ) { * CKEDITOR.replaceAll( function( textarea, config ) {
* // An assertion function that needs to be evaluated for the <textarea> * // A function that needs to be evaluated for the <textarea>
* // to be replaced. It must explicitely return "false" to ignore a * // to be replaced. It must explicitly return "false" to ignore a
* // specific <textarea>. * // specific <textarea>.
* // You can also customize the editor instance by having the function * // You can also customize the editor instance by having the function
* // modify the "config" parameter. * // modify the "config" parameter.
* } ); * } );
* *
* // Full page example where three <textarea> elements are replaced.
* <!DOCTYPE html>
* <html>
* <head>
* <meta charset="utf-8">
* <title>CKEditor</title>
* <!-- Make sure the path to CKEditor is correct. -->
* <script src="/ckeditor/ckeditor.js"></script>
* </head>
* <body>
* <textarea name="editor1"></textarea>
* <textarea name="editor2"></textarea>
* <textarea name="editor3"></textarea>
* <script>
* // Replace all three <textarea> elements above with CKEditor instances.
* CKEDITOR.replaceAll();
* </script>
* </body>
* </html>
*
* @param {String} [className] The `<textarea>` class name. * @param {String} [className] The `<textarea>` class name.
* @param {Function} [function] An assertion function that must return `true` for a `<textarea>` * @param {Function} [evaluator] An evaluation function that must return `true` for a `<textarea>`
* to be replaced with the editor. If the function returns `false`, the `<textarea>` element * to be replaced with the editor. If the function returns `false`, the `<textarea>` element
* will not be replaced. * will not be replaced.
*/ */
@ -102,7 +133,7 @@ CKEDITOR.replaceClass = 'ckeditor';
if ( !classRegex.test( textarea.className ) ) if ( !classRegex.test( textarea.className ) )
continue; continue;
} else if ( typeof arguments[ 0 ] == 'function' ) { } else if ( typeof arguments[ 0 ] == 'function' ) {
// An assertion function could be passed as the function parameter. // An evaluation function could be passed as the function parameter.
// It must explicitly return "false" to ignore a specific <textarea>. // It must explicitly return "false" to ignore a specific <textarea>.
config = {}; config = {};
if ( arguments[ 0 ]( textarea, config ) === false ) if ( arguments[ 0 ]( textarea, config ) === false )
@ -151,19 +182,43 @@ CKEDITOR.replaceClass = 'ckeditor';
editor.fire( 'beforeSetMode', newMode ); editor.fire( 'beforeSetMode', newMode );
if ( editor.mode ) { if ( editor.mode ) {
var isDirty = editor.checkDirty(); var isDirty = editor.checkDirty(),
previousModeData = editor._.previousModeData,
editor._.previousMode = editor.mode; currentData,
unlockSnapshot = 0;
editor.fire( 'beforeModeUnload' ); editor.fire( 'beforeModeUnload' );
// Detach the current editable. // Detach the current editable. While detaching editable will set
// cached editor's data (with internal setData call). We use this
// data below to avoid two getData() calls in a row.
editor.editable( 0 ); editor.editable( 0 );
editor._.previousMode = editor.mode;
// Get cached data, which was set while detaching editable.
editor._.previousModeData = currentData = editor.getData( 1 );
// If data has not been modified in the mode which we are currently leaving,
// avoid making snapshot right after initializing new mode.
// https://dev.ckeditor.com/ticket/5217#comment:20
// Tested by:
// 'test switch mode with unrecoreded, inner HTML specific content (boguses)'
// 'test switch mode with unrecoreded, inner HTML specific content (boguses) plus changes in source mode'
if ( editor.mode == 'source' && previousModeData == currentData ) {
// We need to make sure that unlockSnapshot will update the last snapshot
// (will not create new one) if lockSnapshot is not called on outdated snapshots stack.
// Additionally, forceUpdate prevents from making content image now, which is useless
// (because it equals editor data not inner HTML).
editor.fire( 'lockSnapshot', { forceUpdate: true } );
unlockSnapshot = 1;
}
// Clear up the mode space. // Clear up the mode space.
editor.ui.space( 'contents' ).setHtml( '' ); editor.ui.space( 'contents' ).setHtml( '' );
editor.mode = ''; editor.mode = '';
} else {
editor._.previousModeData = editor.getData( 1 );
} }
// Fire the mode handler. // Fire the mode handler.
@ -174,6 +229,14 @@ CKEDITOR.replaceClass = 'ckeditor';
if ( isDirty !== undefined ) if ( isDirty !== undefined )
!isDirty && editor.resetDirty(); !isDirty && editor.resetDirty();
if ( unlockSnapshot )
editor.fire( 'unlockSnapshot' );
// Since snapshot made on dataReady (which normally catches changes done by setData)
// won't work because editor.mode was not set yet (it's set in this function), we need
// to make special snapshot for changes done in source mode here.
else if ( newMode == 'wysiwyg' )
editor.fire( 'saveSnapshot' );
// Delay to avoid race conditions (setMode inside setMode). // Delay to avoid race conditions (setMode inside setMode).
setTimeout( function() { setTimeout( function() {
editor.fire( 'mode' ); editor.fire( 'mode' );
@ -207,30 +270,47 @@ CKEDITOR.replaceClass = 'ckeditor';
var container = this.container, var container = this.container,
contents = this.ui.space( 'contents' ), contents = this.ui.space( 'contents' ),
contentsFrame = CKEDITOR.env.webkit && this.document && this.document.getWindow().$.frameElement, contentsFrame = CKEDITOR.env.webkit && this.document && this.document.getWindow().$.frameElement,
outer = resizeInner ? container.getChild( 1 ) : container; outer;
// Set as border box width. (#5353) if ( resizeInner ) {
outer = this.container.getFirst( function( node ) {
return node.type == CKEDITOR.NODE_ELEMENT && node.hasClass( 'cke_inner' );
} );
} else {
outer = container;
}
// Set as border box width. (https://dev.ckeditor.com/ticket/5353)
outer.setSize( 'width', width, true ); outer.setSize( 'width', width, true );
// WebKit needs to refresh the iframe size to avoid rendering issues. (1/2) (#8348) // WebKit needs to refresh the iframe size to avoid rendering issues. (1/2) (https://dev.ckeditor.com/ticket/8348)
contentsFrame && ( contentsFrame.style.width = '1%' ); contentsFrame && ( contentsFrame.style.width = '1%' );
// Get the height delta between the outer table and the content area. // Get the height delta between the outer table and the content area.
// If we're setting the content area's height, then we don't need the delta. var contentsOuterDelta = ( outer.$.offsetHeight || 0 ) - ( contents.$.clientHeight || 0 ),
var delta = isContentHeight ? 0 : ( outer.$.offsetHeight || 0 ) - ( contents.$.clientHeight || 0 );
contents.setStyle( 'height', Math.max( height - delta, 0 ) + 'px' );
// WebKit needs to refresh the iframe size to avoid rendering issues. (2/2) (#8348) // If we're setting the content area's height, then we don't need the delta.
resultContentsHeight = Math.max( height - ( isContentHeight ? 0 : contentsOuterDelta ), 0 ),
resultOuterHeight = ( isContentHeight ? height + contentsOuterDelta : height );
contents.setStyle( 'height', resultContentsHeight + 'px' );
// WebKit needs to refresh the iframe size to avoid rendering issues. (2/2) (https://dev.ckeditor.com/ticket/8348)
contentsFrame && ( contentsFrame.style.width = '100%' ); contentsFrame && ( contentsFrame.style.width = '100%' );
// Emit a resize event. // Emit a resize event.
this.fire( 'resize' ); this.fire( 'resize', {
outerHeight: resultOuterHeight,
contentsHeight: resultContentsHeight,
// Sometimes width is not provided.
outerWidth: width || outer.getSize( 'width' )
} );
}; };
/** /**
* Gets the element that can be used to check the editor size. This method * Gets the element that can be used to check the editor size. This method
* is mainly used by the `resize` plugin, which adds a UI handle that can be used * is mainly used by the [Editor Resize](https://ckeditor.com/cke4/addon/resize) plugin, which adds
* to resize the editor. * a UI handle that can be used to resize the editor.
* *
* @param {Boolean} forContents Whether to return the "contents" part of the theme instead of the container. * @param {Boolean} forContents Whether to return the "contents" part of the theme instead of the container.
* @returns {CKEDITOR.dom.element} The resizable element. * @returns {CKEDITOR.dom.element} The resizable element.
@ -257,7 +337,7 @@ CKEDITOR.replaceClass = 'ckeditor';
// replacement will be done later in the editor creation lifecycle. // replacement will be done later in the editor creation lifecycle.
element.setStyle( 'visibility', 'hidden' ); element.setStyle( 'visibility', 'hidden' );
// #8031 Remember if textarea was required and remove the attribute. // https://dev.ckeditor.com/ticket/8031 Remember if textarea was required and remove the attribute.
editor._.required = element.hasAttribute( 'required' ); editor._.required = element.hasAttribute( 'required' );
element.removeAttribute( 'required' ); element.removeAttribute( 'required' );
} }
@ -307,8 +387,6 @@ CKEDITOR.replaceClass = 'ckeditor';
} }
} }
var themedTpl;
function loadTheme( editor ) { function loadTheme( editor ) {
var name = editor.name, var name = editor.name,
element = editor.element, element = editor.element,
@ -318,42 +396,44 @@ CKEDITOR.replaceClass = 'ckeditor';
var topHtml = editor.fire( 'uiSpace', { space: 'top', html: '' } ).html; var topHtml = editor.fire( 'uiSpace', { space: 'top', html: '' } ).html;
var bottomHtml = editor.fire( 'uiSpace', { space: 'bottom', html: '' } ).html; var bottomHtml = editor.fire( 'uiSpace', { space: 'bottom', html: '' } ).html;
if ( !themedTpl ) { var themedTpl = new CKEDITOR.template(
themedTpl = CKEDITOR.addTemplate( 'maincontainer', '<{outerEl}' + '<{outerEl}' +
' id="cke_{name}"' + ' id="cke_{name}"' +
' class="{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} ' + CKEDITOR.env.cssClass + '" ' + ' class="{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} ' + CKEDITOR.env.cssClass + '" ' +
' dir="{langDir}"' + ' dir="{langDir}"' +
' lang="{langCode}"' + ' lang="{langCode}"' +
' role="application"' + ' role="application"' +
' aria-labelledby="cke_{name}_arialbl">' + ( editor.title ? ' aria-labelledby="cke_{name}_arialbl"' : '' ) +
'<span id="cke_{name}_arialbl" class="cke_voice_label">{voiceLabel}</span>' + '>' +
( editor.title ? '<span id="cke_{name}_arialbl" class="cke_voice_label">{voiceLabel}</span>' : '' ) +
'<{outerEl} class="cke_inner cke_reset" role="presentation">' + '<{outerEl} class="cke_inner cke_reset" role="presentation">' +
'{topHtml}' + '{topHtml}' +
'<{outerEl} id="{contentId}" class="cke_contents cke_reset" role="presentation"></{outerEl}>' + '<{outerEl} id="{contentId}" class="cke_contents cke_reset" role="presentation"></{outerEl}>' +
'{bottomHtml}' + '{bottomHtml}' +
'</{outerEl}>' + '</{outerEl}>' +
'</{outerEl}>' ); '</{outerEl}>' );
}
var container = CKEDITOR.dom.element.createFromHtml( themedTpl.output( { var container = CKEDITOR.dom.element.createFromHtml( themedTpl.output( {
id: editor.id, id: editor.id,
name: name, name: name,
langDir: editor.lang.dir, langDir: editor.lang.dir,
langCode: editor.langCode, langCode: editor.langCode,
voiceLabel: [ editor.lang.editor, editor.name ].join( ', ' ), voiceLabel: editor.title,
topHtml: topHtml ? '<span id="' + editor.ui.spaceId( 'top' ) + '" class="cke_top cke_reset_all" role="presentation" style="height:auto">' + topHtml + '</span>' : '', topHtml: topHtml ? '<span id="' + editor.ui.spaceId( 'top' ) + '" class="cke_top cke_reset_all" role="presentation" style="height:auto">' + topHtml + '</span>' : '',
contentId: editor.ui.spaceId( 'contents' ), contentId: editor.ui.spaceId( 'contents' ),
bottomHtml: bottomHtml ? '<span id="' + editor.ui.spaceId( 'bottom' ) + '" class="cke_bottom cke_reset_all" role="presentation">' + bottomHtml + '</span>' : '', bottomHtml: bottomHtml ? '<span id="' + editor.ui.spaceId( 'bottom' ) + '" class="cke_bottom cke_reset_all" role="presentation">' + bottomHtml + '</span>' : '',
outerEl: CKEDITOR.env.ie ? 'span' : 'div' // #9571 outerEl: CKEDITOR.env.ie ? 'span' : 'div' // https://dev.ckeditor.com/ticket/9571
} ) ); } ) );
if ( elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ) { if ( elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ) {
element.hide(); element.hide();
container.insertAfter( element ); container.insertAfter( element );
} else } else {
element.append( container ); element.append( container );
}
editor.container = container; editor.container = container;
editor.ui.contentsElement = editor.ui.space( 'contents' );
// Make top and bottom spaces unelectable, but not content space, // Make top and bottom spaces unelectable, but not content space,
// otherwise the editable area would be affected. // otherwise the editable area would be affected.
@ -371,7 +451,7 @@ CKEDITOR.replaceClass = 'ckeditor';
// Disable browser context menu for editor's chrome. // Disable browser context menu for editor's chrome.
container.disableContextMenu(); container.disableContextMenu();
// Redirect the focus into editor for webkit. (#5713) // Redirect the focus into editor for webkit. (https://dev.ckeditor.com/ticket/5713)
CKEDITOR.env.webkit && container.on( 'focus', function() { CKEDITOR.env.webkit && container.on( 'focus', function() {
editor.focus(); editor.focus();
} ); } );
@ -387,7 +467,7 @@ CKEDITOR.replaceClass = 'ckeditor';
/** /**
* The current editing mode. An editing mode basically provides * The current editing mode. An editing mode basically provides
* different ways of editing or viewing the contents. * different ways of editing or viewing the editor content.
* *
* alert( CKEDITOR.instances.editor1.mode ); // (e.g.) 'wysiwyg' * alert( CKEDITOR.instances.editor1.mode ); // (e.g.) 'wysiwyg'
* *
@ -412,6 +492,10 @@ CKEDITOR.config.startupMode = 'wysiwyg';
* *
* @event resize * @event resize
* @param {CKEDITOR.editor} editor This editor instance. * @param {CKEDITOR.editor} editor This editor instance.
* @param {Object} data Available since CKEditor 4.5.
* @param {Number} data.outerHeight The height of the entire area that the editor covers.
* @param {Number} data.contentsHeight Editable area height in pixels.
* @param {Number} data.outerWidth The width of the entire area that the editor covers.
*/ */
/** /**

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -10,9 +10,9 @@
*/ */
/** /**
* If defined, points to the data processor which is responsible to translate * If defined, points to the data processor which is responsible for translating
* and transform the editor data on input and output. * and transforming the editor data on input and output.
* Generaly it will point to an instance of {@link CKEDITOR.htmlDataProcessor}, * Generally it will point to an instance of {@link CKEDITOR.htmlDataProcessor},
* which handles HTML data. The editor may also handle other data formats by * which handles HTML data. The editor may also handle other data formats by
* using different data processors provided by specific plugins. * using different data processors provided by specific plugins.
* *
@ -21,23 +21,23 @@
*/ */
/** /**
* Represents a data processor, which is responsible to translate and * Represents a data processor which is responsible for translating and
* transform the editor data on input and output. * transforming the editor data on input and output.
* *
* This class is here for documentation purposes only and is not really part of * This class is here for documentation purposes only and is not really part of
* the API. It serves as the base ("interface") for data processors implementation. * the API. It serves as the base ("interface") for data processor implementations.
* *
* @class CKEDITOR.dataProcessor * @class CKEDITOR.dataProcessor
* @abstract * @abstract
*/ */
/** /**
* Transforms input data into HTML to be loaded in the editor. * Transforms input data into HTML to be loaded into the editor.
* While the editor is able to handle non HTML data (like BBCode), at runtime * While the editor is able to handle non-HTML data (like BBCode), it can only
* it can handle HTML data only. The role of the data processor is transforming * handle HTML data at runtime. The role of the data processor is to transform
* the input data into HTML through this function. * the input data into HTML through this function.
* *
* // Tranforming BBCode data, having a custom BBCode data processor. * // Tranforming BBCode data, with a custom BBCode data processor available.
* var data = 'This is [b]an example[/b].'; * var data = 'This is [b]an example[/b].';
* var html = editor.dataProcessor.toHtml( data ); // '<p>This is <b>an example</b>.</p>' * var html = editor.dataProcessor.toHtml( data ); // '<p>This is <b>an example</b>.</p>'
* *
@ -50,21 +50,21 @@
*/ */
/** /**
* Transforms HTML into data to be outputted by the editor, in the format * Transforms HTML into data to be output by the editor, in the format
* expected by the data processor. * expected by the data processor.
* *
* While the editor is able to handle non HTML data (like BBCode), at runtime * While the editor is able to handle non-HTML data (like BBCode), it can only
* it can handle HTML data only. The role of the data processor is transforming * handle HTML data at runtime. The role of the data processor is to transform
* the HTML data containined by the editor into a specific data format through * the HTML data containined by the editor into a specific data format through
* this function. * this function.
* *
* // Tranforming into BBCode data, having a custom BBCode data processor. * // Tranforming into BBCode data, with a custom BBCode data processor available.
* var html = '<p>This is <b>an example</b>.</p>'; * var html = '<p>This is <b>an example</b>.</p>';
* var data = editor.dataProcessor.toDataFormat( html ); // 'This is [b]an example[/b].' * var data = editor.dataProcessor.toDataFormat( html ); // 'This is [b]an example[/b].'
* *
* @method toDataFormat * @method toDataFormat
* @param {String} html The HTML to be transformed. * @param {String} html The HTML to be transformed.
* @param {String} fixForBody The tag name to be used if the output data is * @param {String} fixForBody The tag name to be used if the output data is
* coming from `<body>` and may be eventually fixed for it. This is * coming from the `<body>` element and may be eventually fixed for it. This is
* generally not used by non-HTML data processors. * generally not used by non-HTML data processors.
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**

View File

@ -1,10 +1,10 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
* @fileOverview Defines the {@link CKEDITOR.dom.document} class, which * @fileOverview Defines the {@link CKEDITOR.dom.document} class which
* represents a DOM document. * represents a DOM document.
*/ */
@ -58,14 +58,14 @@ CKEDITOR.tools.extend( CKEDITOR.dom.document.prototype, {
}, },
/** /**
* Creates a CSS style sheet and inserts it into the document. * Creates a CSS stylesheet and inserts it into the document.
* *
* @param cssStyleText {String} CSS style text. * @param cssStyleText {String} CSS style text.
* @returns {Object} The created DOM native style sheet object. * @returns {Object} The created DOM native stylesheet object.
*/ */
appendStyleText: function( cssStyleText ) { appendStyleText: function( cssStyleText ) {
if ( this.$.createStyleSheet ) { if ( this.$.createStyleSheet ) {
var styleSheet = this.$.createStyleSheet( "" ); var styleSheet = this.$.createStyleSheet( '' );
styleSheet.cssText = cssStyleText; styleSheet.cssText = cssStyleText;
} else { } else {
var style = new CKEDITOR.dom.element( 'style', this ); var style = new CKEDITOR.dom.element( 'style', this );
@ -77,10 +77,13 @@ CKEDITOR.tools.extend( CKEDITOR.dom.document.prototype, {
}, },
/** /**
* Creates {@link CKEDITOR.dom.element} instance in this document. * Creates a {@link CKEDITOR.dom.element} instance in this document.
* *
* @param {String} name The name of the element.
* @param {Object} [attributesAndStyles]
* @param {Object} [attributesAndStyles.attributes] Attributes that will be set.
* @param {Object} [attributesAndStyles.styles] Styles that will be set.
* @returns {CKEDITOR.dom.element} * @returns {CKEDITOR.dom.element}
* @todo
*/ */
createElement: function( name, attribsAndStyles ) { createElement: function( name, attribsAndStyles ) {
var element = new CKEDITOR.dom.element( name, this ); var element = new CKEDITOR.dom.element( name, this );
@ -97,7 +100,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.document.prototype, {
}, },
/** /**
* Creates {@link CKEDITOR.dom.text} instance in this document. * Creates a {@link CKEDITOR.dom.text} instance in this document.
* *
* @param {String} text Value of the text node. * @param {String} text Value of the text node.
* @returns {CKEDITOR.dom.element} * @returns {CKEDITOR.dom.element}
@ -120,20 +123,27 @@ CKEDITOR.tools.extend( CKEDITOR.dom.document.prototype, {
* An active element does not necessarily have focus, * An active element does not necessarily have focus,
* but an element with focus is always the active element in a document. * but an element with focus is always the active element in a document.
* *
* @returns {CKEDITOR.dom.element} * @returns {CKEDITOR.dom.element} Active element or `null` if an IE8-9 bug is encountered.
* See [#10030](https://dev.ckeditor.com/ticket/10030).
*/ */
getActive: function() { getActive: function() {
return new CKEDITOR.dom.element( this.$.activeElement ); var $active;
try {
$active = this.$.activeElement;
} catch ( e ) {
return null;
}
return new CKEDITOR.dom.element( $active );
}, },
/** /**
* Gets an element based on its id. * Gets an element based on its ID.
* *
* var element = CKEDITOR.document.getById( 'myElement' ); * var element = CKEDITOR.document.getById( 'myElement' );
* alert( element.getId() ); // 'myElement' * alert( element.getId() ); // 'myElement'
* *
* @param {String} elementId The element id. * @param {String} elementId The element ID.
* @returns {CKEDITOR.dom.element} The element instance, or null if not found. * @returns {CKEDITOR.dom.element} The element instance, or `null` if not found.
*/ */
getById: function( elementId ) { getById: function( elementId ) {
var $ = this.$.getElementById( elementId ); var $ = this.$.getElementById( elementId );
@ -178,13 +188,13 @@ CKEDITOR.tools.extend( CKEDITOR.dom.document.prototype, {
}, },
/** /**
* Gets elements list based on given tag name. * Gets elements list based on a given tag name.
* *
* @param {String} tagName The element tag name. * @param {String} tagName The element tag name.
* @returns {CKEDITOR.dom.nodeList} The nodes list. * @returns {CKEDITOR.dom.nodeList} The nodes list.
*/ */
getElementsByTag: function( tagName, namespace ) { getElementsByTag: function( tagName, namespace ) {
if ( !( CKEDITOR.env.ie && !( document.documentMode > 8 ) ) && namespace ) if ( !( CKEDITOR.env.ie && ( document.documentMode <= 8 ) ) && namespace )
tagName = namespace + ':' + tagName; tagName = namespace + ':' + tagName;
return new CKEDITOR.dom.nodeList( this.$.getElementsByTagName( tagName ) ); return new CKEDITOR.dom.nodeList( this.$.getElementsByTagName( tagName ) );
}, },
@ -229,7 +239,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.document.prototype, {
}, },
/** /**
* Gets the window object that holds this document. * Gets the window object that stores this document.
* *
* @returns {CKEDITOR.dom.window} The window object. * @returns {CKEDITOR.dom.window} The window object.
*/ */
@ -238,21 +248,21 @@ CKEDITOR.tools.extend( CKEDITOR.dom.document.prototype, {
}, },
/** /**
* Defines the document contents through document.write. Note that the * Defines the document content through `document.write`. Note that the
* previous document contents will be lost (cleaned). * previous document content will be lost (cleaned).
* *
* document.write( * document.write(
* '<html>' + * '<html>' +
* '<head><title>Sample Doc</title></head>' + * '<head><title>Sample Document</title></head>' +
* '<body>Document contents created by code</body>' + * '<body>Document content created by code.</body>' +
* '</html>' * '</html>'
* ); * );
* *
* @since 3.5 * @since 3.5
* @param {String} html The HTML defining the document contents. * @param {String} html The HTML defining the document content.
*/ */
write: function( html ) { write: function( html ) {
// Don't leave any history log in IE. (#5657) // Don't leave any history log in IE. (https://dev.ckeditor.com/ticket/5657)
this.$.open( 'text/html', 'replace' ); this.$.open( 'text/html', 'replace' );
// Support for custom document.domain in IE. // Support for custom document.domain in IE.
@ -269,9 +279,9 @@ CKEDITOR.tools.extend( CKEDITOR.dom.document.prototype, {
/** /**
* Wrapper for `querySelectorAll`. Returns a list of elements within this document that match * Wrapper for `querySelectorAll`. Returns a list of elements within this document that match
* specified `selector`. * the specified `selector`.
* *
* **Note:** returned list is not a live collection (like a result of native `querySelectorAll`). * **Note:** The returned list is not a live collection (like the result of native `querySelectorAll`).
* *
* @since 4.3 * @since 4.3
* @param {String} selector * @param {String} selector
@ -282,8 +292,8 @@ CKEDITOR.tools.extend( CKEDITOR.dom.document.prototype, {
}, },
/** /**
* Wrapper for `querySelector`. Returns first element within this document that matches * Wrapper for `querySelector`. Returns the first element within this document that matches
* specified `selector`. * the specified `selector`.
* *
* @since 4.3 * @since 4.3
* @param {String} selector * @param {String} selector
@ -296,7 +306,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.document.prototype, {
}, },
/** /**
* IE8 only method. It returns document fragment which has all HTML5 elements enabled. * Internet Explorer 8 only method. It returns a document fragment which has all HTML5 elements enabled.
* *
* @since 4.3 * @since 4.3
* @private * @private

View File

@ -1,19 +1,18 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
* DocumentFragment is a "lightweight" or "minimal" Document object. It is * DocumentFragment is a "lightweight" or "minimal" Document object. It is
* commonly used to extract a portion of a document's tree or to create a new * commonly used to extract a portion of a document's tree or to create a new
* fragment of a document. Various operations may take DocumentFragment objects * fragment of a document. Various operations may take document fragment objects
* as arguments and results in all the child nodes of the DocumentFragment being * as arguments and result in all the child nodes of the document fragment being
* moved to the child list of this node. * moved to the child list of this node.
* *
* @class * @class
* @constructor Creates a document fragment class instance. * @constructor Creates a document fragment class instance.
* @param {Object} nodeOrDoc * @param {CKEDITOR.dom.document/DocumentFragment} [nodeOrDoc=CKEDITOR.document]
* @todo example and param doc
*/ */
CKEDITOR.dom.documentFragment = function( nodeOrDoc ) { CKEDITOR.dom.documentFragment = function( nodeOrDoc ) {
nodeOrDoc = nodeOrDoc || CKEDITOR.document; nodeOrDoc = nodeOrDoc || CKEDITOR.document;
@ -34,12 +33,30 @@ CKEDITOR.tools.extend( CKEDITOR.dom.documentFragment.prototype, CKEDITOR.dom.ele
type: CKEDITOR.NODE_DOCUMENT_FRAGMENT, type: CKEDITOR.NODE_DOCUMENT_FRAGMENT,
/** /**
* Inserts document fragment's contents after specified node. * Inserts the document fragment content after the specified node.
* *
* @param {CKEDITOR.dom.node} node * @param {CKEDITOR.dom.node} node
*/ */
insertAfterNode: function( node ) { insertAfterNode: function( node ) {
node = node.$; node = node.$;
node.parentNode.insertBefore( this.$, node.nextSibling ); node.parentNode.insertBefore( this.$, node.nextSibling );
},
/**
* Gets HTML of this document fragment's children.
*
* @since 4.5
* @returns {String} The HTML of this document fragment's children.
*/
getHtml: function() {
var container = new CKEDITOR.dom.element( 'div' );
this.clone( 1, 1 ).appendTo( container );
return container.getHtml().replace( /\s*data-cke-expando=".*?"/g, '' );
} }
}, true, { 'append': 1, 'appendBogus': 1, 'getFirst': 1, 'getLast': 1, 'getParent': 1, 'getNext': 1, 'getPrevious': 1, 'appendTo': 1, 'moveChildren': 1, 'insertBefore': 1, 'insertAfterNode': 1, 'replace': 1, 'trim': 1, 'type': 1, 'ltrim': 1, 'rtrim': 1, 'getDocument': 1, 'getChildCount': 1, 'getChild': 1, 'getChildren': 1 } ); }, true, {
'append': 1, 'appendBogus': 1, 'clone': 1, 'getFirst': 1, 'getHtml': 1, 'getLast': 1, 'getParent': 1, 'getNext': 1, 'getPrevious': 1,
'appendTo': 1, 'moveChildren': 1, 'insertBefore': 1, 'insertAfterNode': 1, 'replace': 1, 'trim': 1, 'type': 1,
'ltrim': 1, 'rtrim': 1, 'getDocument': 1, 'getChildCount': 1, 'getChild': 1, 'getChildren': 1
} );

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -41,7 +41,7 @@ CKEDITOR.dom.domObject.prototype = ( function() {
return function( domEvent ) { return function( domEvent ) {
// In FF, when reloading the page with the editor focused, it may // In FF, when reloading the page with the editor focused, it may
// throw an error because the CKEDITOR global is not anymore // throw an error because the CKEDITOR global is not anymore
// available. So, we check it here first. (#2923) // available. So, we check it here first. (https://dev.ckeditor.com/ticket/2923)
if ( typeof CKEDITOR != 'undefined' ) if ( typeof CKEDITOR != 'undefined' )
domObject.fire( eventName, new CKEDITOR.dom.event( domEvent ) ); domObject.fire( eventName, new CKEDITOR.dom.event( domEvent ) );
}; };
@ -50,7 +50,7 @@ CKEDITOR.dom.domObject.prototype = ( function() {
return { return {
/** /**
* Get the private `_` object which is bound to the native * Gets the private `_` object which is bound to the native
* DOM object using {@link #getCustomData}. * DOM object using {@link #getCustomData}.
* *
* var elementA = new CKEDITOR.dom.element( nativeElement ); * var elementA = new CKEDITOR.dom.element( nativeElement );
@ -138,7 +138,7 @@ CKEDITOR.dom.domObject.prototype = ( function() {
} }
// Remove events from events object so fire() method will not call // Remove events from events object so fire() method will not call
// listeners (#11400). // listeners (https://dev.ckeditor.com/ticket/11400).
CKEDITOR.event.prototype.removeAllListeners.call( this ); CKEDITOR.event.prototype.removeAllListeners.call( this );
} }
}; };
@ -174,11 +174,13 @@ CKEDITOR.dom.domObject.prototype = ( function() {
* Sets a data slot value for this object. These values are shared by all * Sets a data slot value for this object. These values are shared by all
* instances pointing to that same DOM object. * instances pointing to that same DOM object.
* *
* **Note:** The created data slot is only guarantied to be available on this unique dom node, * **Note:** The created data slot is only guaranteed to be available on this unique DOM node,
* thus any wish to continue access it from other element clones (either created by * thus any wish to continue access to it from other element clones (either created by
* clone node or from `innerHtml`) will fail, for such usage, please use * clone node or from `innerHtml`) will fail. For such usage please use
* {@link CKEDITOR.dom.element#setAttribute} instead. * {@link CKEDITOR.dom.element#setAttribute} instead.
* *
* **Note**: This method does not work on text nodes prior to Internet Explorer 9.
*
* var element = new CKEDITOR.dom.element( 'span' ); * var element = new CKEDITOR.dom.element( 'span' );
* element.setCustomData( 'hasCustomData', true ); * element.setCustomData( 'hasCustomData', true );
* *
@ -214,7 +216,7 @@ CKEDITOR.dom.domObject.prototype = ( function() {
}; };
/** /**
* Removes the value in data slot under given `key`. * Removes the value in the data slot under the given `key`.
* *
* @param {String} key * @param {String} key
* @returns {Object} Removed value or `null` if not found. * @returns {Object} Removed value or `null` if not found.
@ -234,7 +236,7 @@ CKEDITOR.dom.domObject.prototype = ( function() {
}; };
/** /**
* Removes any data stored on this object. * Removes any data stored in this object.
* To avoid memory leaks we must assure that there are no * To avoid memory leaks we must assure that there are no
* references left after the object is no longer needed. * references left after the object is no longer needed.
*/ */
@ -247,9 +249,11 @@ CKEDITOR.dom.domObject.prototype = ( function() {
}; };
/** /**
* Gets an ID that can be used to identiquely identify this DOM object in * Gets an ID that can be used to identify this DOM object in
* the running session. * the running session.
* *
* **Note**: This method does not work on text nodes prior to Internet Explorer 9.
*
* @returns {Number} A unique ID. * @returns {Number} A unique ID.
*/ */
domObjectProto.getUniqueId = function() { domObjectProto.getUniqueId = function() {

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -78,8 +78,29 @@ CKEDITOR.dom.element.createFromHtml = function( html, ownerDocument ) {
}; };
/** /**
* Sets {@link CKEDITOR.dom.element#setCustomData custom data} on an element in a way that it is later
* possible to {@link #clearAllMarkers clear all data} set on all elements sharing the same database.
*
* This mechanism is very useful when processing some portion of DOM. All markers can later be removed
* by calling the {@link #clearAllMarkers} method, hence markers will not leak to second pass of this algorithm.
*
* var database = {};
* CKEDITOR.dom.element.setMarker( database, element1, 'foo', 'bar' );
* CKEDITOR.dom.element.setMarker( database, element2, 'oof', [ 1, 2, 3 ] );
*
* element1.getCustomData( 'foo' ); // 'bar'
* element2.getCustomData( 'oof' ); // [ 1, 2, 3 ]
*
* CKEDITOR.dom.element.clearAllMarkers( database );
*
* element1.getCustomData( 'foo' ); // null
*
* @static * @static
* @todo * @param {Object} database
* @param {CKEDITOR.dom.element} element
* @param {String} name
* @param {Object} value
* @returns {CKEDITOR.dom.element} The element.
*/ */
CKEDITOR.dom.element.setMarker = function( database, element, name, value ) { CKEDITOR.dom.element.setMarker = function( database, element, name, value ) {
var id = element.getCustomData( 'list_marker_id' ) || ( element.setCustomData( 'list_marker_id', CKEDITOR.tools.getNextNumber() ).getCustomData( 'list_marker_id' ) ), var id = element.getCustomData( 'list_marker_id' ) || ( element.setCustomData( 'list_marker_id', CKEDITOR.tools.getNextNumber() ).getCustomData( 'list_marker_id' ) ),
@ -91,8 +112,10 @@ CKEDITOR.dom.element.setMarker = function( database, element, name, value ) {
}; };
/** /**
* Removes all markers added using this database. See the {@link #setMarker} method for more information.
*
* @param {Object} database
* @static * @static
* @todo
*/ */
CKEDITOR.dom.element.clearAllMarkers = function( database ) { CKEDITOR.dom.element.clearAllMarkers = function( database ) {
for ( var i in database ) for ( var i in database )
@ -100,8 +123,23 @@ CKEDITOR.dom.element.clearAllMarkers = function( database ) {
}; };
/** /**
* Removes all markers added to this element and removes it from the database if
* `removeFromDatabase` was passed. See the {@link #setMarker} method for more information.
*
* var database = {};
* CKEDITOR.dom.element.setMarker( database, element1, 'foo', 'bar' );
* CKEDITOR.dom.element.setMarker( database, element2, 'oof', [ 1, 2, 3 ] );
*
* element1.getCustomData( 'foo' ); // 'bar'
* element2.getCustomData( 'oof' ); // [ 1, 2, 3 ]
*
* CKEDITOR.dom.element.clearMarkers( database, element1, true );
*
* element1.getCustomData( 'foo' ); // null
* element2.getCustomData( 'oof' ); // [ 1, 2, 3 ]
*
* @param {Object} database
* @static * @static
* @todo
*/ */
CKEDITOR.dom.element.clearMarkers = function( database, element, removeFromDatabase ) { CKEDITOR.dom.element.clearMarkers = function( database, element, removeFromDatabase ) {
var names = element.getCustomData( 'list_marker_names' ), var names = element.getCustomData( 'list_marker_names' ),
@ -114,9 +152,18 @@ CKEDITOR.dom.element.clearMarkers = function( database, element, removeFromDatab
delete database[ id ]; delete database[ id ];
} }
}; };
( function() {
CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, { ( function() {
var elementsClassList = document.createElement( '_' ).classList,
supportsClassLists = typeof elementsClassList !== 'undefined' && String( elementsClassList.add ).match( /\[Native code\]/gi ) !== null,
rclass = /[\n\t\r]/g;
function hasClass( classNames, className ) {
// Source: jQuery.
return ( ' ' + classNames + ' ' ).replace( rclass, ' ' ).indexOf( ' ' + className + ' ' ) > -1;
}
CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
/** /**
* The node type. This is a constant value set to {@link CKEDITOR#NODE_ELEMENT}. * The node type. This is a constant value set to {@link CKEDITOR#NODE_ELEMENT}.
* *
@ -134,16 +181,26 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
* element.addClass( 'classB' ); // <div class="classA classB"> * element.addClass( 'classB' ); // <div class="classA classB">
* element.addClass( 'classA' ); // <div class="classA classB"> * element.addClass( 'classA' ); // <div class="classA classB">
* *
* **Note:** Since CKEditor 4.5 this method cannot be used with multiple classes (`'classA classB'`).
*
* @chainable
* @method addClass
* @param {String} className The name of the class to be added. * @param {String} className The name of the class to be added.
*/ */
addClass: function( className ) { addClass: supportsClassLists ?
function( className ) {
this.$.classList.add( className );
return this;
} : function( className ) {
var c = this.$.className; var c = this.$.className;
if ( c ) { if ( c ) {
var regex = new RegExp( '(?:^|\\s)' + className + '(?:\\s|$)', '' ); if ( !hasClass( c, className ) )
if ( !regex.test( c ) )
c += ' ' + className; c += ' ' + className;
} }
this.$.className = c || className; this.$.className = c || className;
return this;
}, },
/** /**
@ -157,21 +214,30 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
* element.removeClass( 'classB' ); // <div> * element.removeClass( 'classB' ); // <div>
* *
* @chainable * @chainable
* @method removeClass
* @param {String} className The name of the class to remove. * @param {String} className The name of the class to remove.
*/ */
removeClass: function( className ) { removeClass: supportsClassLists ?
function( className ) {
var $ = this.$;
$.classList.remove( className );
if ( !$.className )
$.removeAttribute( 'class' );
return this;
} : function( className ) {
var c = this.getAttribute( 'class' ); var c = this.getAttribute( 'class' );
if ( c ) { if ( c && hasClass( c, className ) ) {
var regex = new RegExp( '(?:^|\\s+)' + className + '(?=\\s|$)', 'i' ); c = c
if ( regex.test( c ) ) { .replace( new RegExp( '(?:^|\\s+)' + className + '(?=\\s|$)' ), '' )
c = c.replace( regex, '' ).replace( /^\s+/, '' ); .replace( /^\s+/, '' );
if ( c ) if ( c )
this.setAttribute( 'class', c ); this.setAttribute( 'class', c );
else else
this.removeAttribute( 'class' ); this.removeAttribute( 'class' );
} }
}
return this; return this;
}, },
@ -183,8 +249,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
* @returns {Boolean} * @returns {Boolean}
*/ */
hasClass: function( className ) { hasClass: function( className ) {
var regex = new RegExp( '(?:^|\\s+)' + className + '(?=\\s|$)', '' ); return hasClass( this.$.className, className );
return regex.test( this.getAttribute( 'class' ) );
}, },
/** /**
@ -240,10 +305,11 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
* // Result: '<p>This is some text</p>' * // Result: '<p>This is some text</p>'
* *
* @param {String} text The text to be appended. * @param {String} text The text to be appended.
* @returns {CKEDITOR.dom.node} The appended node.
*/ */
appendText: function( text ) { appendText: function( text ) {
if ( this.$.text != undefined ) // On IE8 it is impossible to append node to script tag, so we use its text.
// On the contrary, on Safari the text property is unpredictable in links. (https://dev.ckeditor.com/ticket/13232)
if ( this.$.text != null && CKEDITOR.env.ie && CKEDITOR.env.version < 9 )
this.$.text += text; this.$.text += text;
else else
this.append( new CKEDITOR.dom.text( text ) ); this.append( new CKEDITOR.dom.text( text ) );
@ -257,7 +323,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
* @param {Boolean} [force] Append filler regardless of the environment. * @param {Boolean} [force] Append filler regardless of the environment.
*/ */
appendBogus: function( force ) { appendBogus: function( force ) {
if ( !force && !( CKEDITOR.env.needsBrFiller || CKEDITOR.env.opera ) ) if ( !force && !CKEDITOR.env.needsBrFiller )
return; return;
var lastChild = this.getLast(); var lastChild = this.getLast();
@ -266,7 +332,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
while ( lastChild && lastChild.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tools.rtrim( lastChild.getText() ) ) while ( lastChild && lastChild.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tools.rtrim( lastChild.getText() ) )
lastChild = lastChild.getPrevious(); lastChild = lastChild.getPrevious();
if ( !lastChild || !lastChild.is || !lastChild.is( 'br' ) ) { if ( !lastChild || !lastChild.is || !lastChild.is( 'br' ) ) {
var bogus = CKEDITOR.env.opera ? this.getDocument().createText( '' ) : this.getDocument().createElement( 'br' ); var bogus = this.getDocument().createElement( 'br' );
CKEDITOR.env.gecko && bogus.setAttribute( 'type', '_moz' ); CKEDITOR.env.gecko && bogus.setAttribute( 'type', '_moz' );
@ -291,8 +357,9 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
* element.breakParent( parent ); * element.breakParent( parent );
* *
* @param {CKEDITOR.dom.element} parent The anscestor element to get broken. * @param {CKEDITOR.dom.element} parent The anscestor element to get broken.
* @param {Boolean} [cloneId=false] Whether to preserve ancestor ID attributes while breaking.
*/ */
breakParent: function( parent ) { breakParent: function( parent, cloneId ) {
var range = new CKEDITOR.dom.range( this.getDocument() ); var range = new CKEDITOR.dom.range( this.getDocument() );
// We'll be extracting part of this element, so let's use our // We'll be extracting part of this element, so let's use our
@ -301,13 +368,36 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
range.setEndAfter( parent ); range.setEndAfter( parent );
// Extract it. // Extract it.
var docFrag = range.extractContents(); var docFrag = range.extractContents( false, cloneId || false ),
tmpElement,
current;
// Move the element outside the broken element. // Move the element outside the broken element.
range.insertNode( this.remove() ); range.insertNode( this.remove() );
// In case of Internet Explorer, we must check if there is no background-color
// added to the element. In such case, we have to overwrite it to prevent "switching it off"
// by a browser (https://dev.ckeditor.com/ticket/14667).
if ( CKEDITOR.env.ie && !CKEDITOR.env.edge ) {
tmpElement = new CKEDITOR.dom.element( 'div' );
while ( current = docFrag.getFirst() ) {
if ( current.$.style.backgroundColor ) {
// This is a necessary hack to make sure that IE will track backgroundColor CSS property, see
// https://dev.ckeditor.com/ticket/14667#comment:8 for more details.
current.$.style.backgroundColor = current.$.style.backgroundColor;
}
tmpElement.append( current );
}
// Re-insert the extracted piece after the element.
tmpElement.insertAfter( this );
tmpElement.remove( true );
} else {
// Re-insert the extracted piece after the element. // Re-insert the extracted piece after the element.
docFrag.insertAfterNode( this ); docFrag.insertAfterNode( this );
}
}, },
/** /**
@ -317,7 +407,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
* @param {CKEDITOR.dom.node} node * @param {CKEDITOR.dom.node} node
* @returns {Boolean} * @returns {Boolean}
*/ */
contains: CKEDITOR.env.ie || CKEDITOR.env.webkit ? contains: !document.compareDocumentPosition ?
function( node ) { function( node ) {
var $ = this.$; var $ = this.$;
@ -362,7 +452,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
*/ */
getHtml: function() { getHtml: function() {
var retval = this.$.innerHTML; var retval = this.$.innerHTML;
// Strip <?xml:namespace> tags in IE. (#3341). // Strip <?xml:namespace> tags in IE. (https://dev.ckeditor.com/ticket/3341).
return CKEDITOR.env.ie ? retval.replace( /<\?[^>]*>/g, '' ) : retval; return CKEDITOR.env.ie ? retval.replace( /<\?[^>]*>/g, '' ) : retval;
}, },
@ -377,7 +467,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
getOuterHtml: function() { getOuterHtml: function() {
if ( this.$.outerHTML ) { if ( this.$.outerHTML ) {
// IE includes the <?xml:namespace> tag in the outerHTML of // IE includes the <?xml:namespace> tag in the outerHTML of
// namespaced element. So, we must strip it here. (#3341) // namespaced element. So, we must strip it here. (https://dev.ckeditor.com/ticket/3341)
return this.$.outerHTML.replace( /<\?[^>]*>/, '' ); return this.$.outerHTML.replace( /<\?[^>]*>/, '' );
} }
@ -450,9 +540,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
return html; return html;
} }
} } : function( html ) {
:
function( html ) {
return ( this.$.innerHTML = html ); return ( this.$.innerHTML = html );
}, },
@ -466,16 +554,15 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
* @param {String} text The text to be set. * @param {String} text The text to be set.
* @returns {String} The inserted text. * @returns {String} The inserted text.
*/ */
setText: function( text ) { setText: ( function() {
CKEDITOR.dom.element.prototype.setText = ( this.$.innerText != undefined ) ? var supportsTextContent = document.createElement( 'p' );
function( text ) { supportsTextContent.innerHTML = 'x';
return this.$.innerText = text; supportsTextContent = supportsTextContent.textContent;
} : function( text ) {
return this.$.textContent = text;
};
return this.setText( text ); return function( text ) {
}, this.$[ supportsTextContent ? 'textContent' : 'innerText' ] = text;
};
} )(),
/** /**
* Gets the value of an element attribute. * Gets the value of an element attribute.
@ -492,7 +579,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
return this.$.getAttribute( name, 2 ); return this.$.getAttribute( name, 2 );
}; };
if ( CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat ) ) { if ( CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks ) ) {
return function( name ) { return function( name ) {
switch ( name ) { switch ( name ) {
case 'class': case 'class':
@ -518,23 +605,20 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
tabIndex = null; tabIndex = null;
return tabIndex; return tabIndex;
break;
case 'checked': case 'checked':
{
var attr = this.$.attributes.getNamedItem( name ), var attr = this.$.attributes.getNamedItem( name ),
attrValue = attr.specified ? attr.nodeValue // For value given by parser. attrValue = attr.specified ? attr.nodeValue // For value given by parser.
: this.$.checked; // For value created via DOM interface. : this.$.checked; // For value created via DOM interface.
return attrValue ? 'checked' : null; return attrValue ? 'checked' : null;
}
case 'hspace': case 'hspace':
case 'value': case 'value':
return this.$[ name ]; return this.$[ name ];
case 'style': case 'style':
// IE does not return inline styles via getAttribute(). See #2947. // IE does not return inline styles via getAttribute(). See https://dev.ckeditor.com/ticket/2947.
return this.$.style.cssText; return this.$.style.cssText;
case 'contenteditable': case 'contenteditable':
@ -544,10 +628,33 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
return standard.call( this, name ); return standard.call( this, name );
}; };
} else } else {
return standard; return standard;
}
} )(), } )(),
/**
* Gets the values of all element attributes.
*
* @param {Array} exclude The names of attributes to be excluded from the returned object.
* @return {Object} An object containing all element attributes with their values.
*/
getAttributes: function( exclude ) {
var attributes = {},
attrDefs = this.$.attributes,
i;
exclude = CKEDITOR.tools.isArray( exclude ) ? exclude : [];
for ( i = 0; i < attrDefs.length; i++ ) {
if ( CKEDITOR.tools.indexOf( exclude, attrDefs[ i ].name ) === -1 ) {
attributes[ attrDefs[ i ].name ] = attrDefs[ i ].value;
}
}
return attributes;
},
/** /**
* Gets the nodes list containing all children of this element. * Gets the nodes list containing all children of this element.
* *
@ -568,13 +675,14 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
* @param {String} propertyName The style property name. * @param {String} propertyName The style property name.
* @returns {String} The property value. * @returns {String} The property value.
*/ */
getComputedStyle: CKEDITOR.env.ie ? getComputedStyle: ( document.defaultView && document.defaultView.getComputedStyle ) ?
function( propertyName ) { function( propertyName ) {
return this.$.currentStyle[ CKEDITOR.tools.cssStyleToDomStyle( propertyName ) ];
} : function( propertyName ) {
var style = this.getWindow().$.getComputedStyle( this.$, null ); var style = this.getWindow().$.getComputedStyle( this.$, null );
// Firefox may return null if we call the above on a hidden iframe. (#9117)
// Firefox may return null if we call the above on a hidden iframe. (https://dev.ckeditor.com/ticket/9117)
return style ? style.getPropertyValue( propertyName ) : ''; return style ? style.getPropertyValue( propertyName ) : '';
} : function( propertyName ) {
return this.$.currentStyle[ CKEDITOR.tools.cssStyleToDomStyle( propertyName ) ];
}, },
/** /**
@ -610,8 +718,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
* @method * @method
* @returns {Number} The tabindex value. * @returns {Number} The tabindex value.
*/ */
getTabIndex: CKEDITOR.env.ie ? getTabIndex: function() {
function() {
var tabIndex = this.$.tabIndex; var tabIndex = this.$.tabIndex;
// IE returns tabIndex=0 by default for all elements. In // IE returns tabIndex=0 by default for all elements. In
@ -619,29 +726,9 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
// the tabindex attribute set to zero, or it is one of // the tabindex attribute set to zero, or it is one of
// those element that should have zero by default. // those element that should have zero by default.
if ( tabIndex === 0 && !CKEDITOR.dtd.$tabIndex[ this.getName() ] && parseInt( this.getAttribute( 'tabindex' ), 10 ) !== 0 ) if ( tabIndex === 0 && !CKEDITOR.dtd.$tabIndex[ this.getName() ] && parseInt( this.getAttribute( 'tabindex' ), 10 ) !== 0 )
tabIndex = -1; return -1;
return tabIndex; return tabIndex;
} : CKEDITOR.env.webkit ?
function() {
var tabIndex = this.$.tabIndex;
// Safari returns "undefined" for elements that should not
// have tabindex (like a div). So, we must try to get it
// from the attribute.
// https://bugs.webkit.org/show_bug.cgi?id=20596
if ( tabIndex == undefined ) {
tabIndex = parseInt( this.getAttribute( 'tabindex' ), 10 );
// If the element don't have the tabindex attribute,
// then we should return -1.
if ( isNaN( tabIndex ) )
tabIndex = -1;
}
return tabIndex;
} : function() {
return this.$.tabIndex;
}, },
/** /**
@ -707,15 +794,17 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
// Cache the lowercased name inside a closure. // Cache the lowercased name inside a closure.
var nodeName = this.$.nodeName.toLowerCase(); var nodeName = this.$.nodeName.toLowerCase();
if ( CKEDITOR.env.ie && !( document.documentMode > 8 ) ) { if ( CKEDITOR.env.ie && ( document.documentMode <= 8 ) ) {
var scopeName = this.$.scopeName; var scopeName = this.$.scopeName;
if ( scopeName != 'HTML' ) if ( scopeName != 'HTML' )
nodeName = scopeName.toLowerCase() + ':' + nodeName; nodeName = scopeName.toLowerCase() + ':' + nodeName;
} }
return ( this.getName = function() { this.getName = function() {
return nodeName; return nodeName;
} )(); };
return this.getName();
}, },
/** /**
@ -815,8 +904,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
( this.is( 'a' ) && ( this.is( 'a' ) &&
( this.data( 'cke-saved-name' ) || this.hasAttribute( 'name' ) ) && ( this.data( 'cke-saved-name' ) || this.hasAttribute( 'name' ) ) &&
!this.getChildCount() !this.getChildCount()
) ) ) ) {
{
return false; return false;
} }
@ -884,8 +972,8 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
elementWindow, elementWindowFrame; elementWindow, elementWindowFrame;
// Webkit and Opera report non-zero offsetHeight despite that // Webkit and Opera report non-zero offsetHeight despite that
// element is inside an invisible iframe. (#4542) // element is inside an invisible iframe. (https://dev.ckeditor.com/ticket/4542)
if ( isVisible && ( CKEDITOR.env.webkit || CKEDITOR.env.opera ) ) { if ( isVisible && CKEDITOR.env.webkit ) {
elementWindow = this.getWindow(); elementWindow = this.getWindow();
if ( !elementWindow.equals( CKEDITOR.document.getWindow() ) && ( elementWindowFrame = elementWindow.$.frameElement ) ) if ( !elementWindow.equals( CKEDITOR.document.getWindow() ) && ( elementWindowFrame = elementWindow.$.frameElement ) )
@ -931,7 +1019,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
* @method * @method
* @returns {Boolean} True if the element has attributes. * @returns {Boolean} True if the element has attributes.
*/ */
hasAttributes: CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat ) ? hasAttributes: CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks ) ?
function() { function() {
var attributes = this.$.attributes; var attributes = this.$.attributes;
@ -945,28 +1033,31 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
// attribute, which will be marked as "specified", even if the // attribute, which will be marked as "specified", even if the
// outerHTML of the element is not displaying the class attribute. // outerHTML of the element is not displaying the class attribute.
// Note : I was not able to reproduce it outside the editor, // Note : I was not able to reproduce it outside the editor,
// but I've faced it while working on the TC of #1391. // but I've faced it while working on the TC of https://dev.ckeditor.com/ticket/1391.
if ( this.getAttribute( 'class' ) ) if ( this.getAttribute( 'class' ) ) {
return true; return true;
}
// Attributes to be ignored. // Attributes to be ignored.
/* falls through */
case 'data-cke-expando': case 'data-cke-expando':
continue; continue;
/*jsl:fallthru*/
/* falls through */
default: default:
if ( attribute.specified ) if ( attribute.specified ) {
return true; return true;
} }
} }
}
return false; return false;
} : function() { } : function() {
var attrs = this.$.attributes, var attrs = this.$.attributes,
attrsNum = attrs.length; attrsNum = attrs.length;
// The _moz_dirty attribute might get into the element after pasting (#5455) // The _moz_dirty attribute might get into the element after pasting (https://dev.ckeditor.com/ticket/5455)
var execludeAttrs = { 'data-cke-expando': 1, _moz_dirty: 1 }; var execludeAttrs = { 'data-cke-expando': 1, _moz_dirty: 1 };
return attrsNum > 0 && ( attrsNum > 2 || !execludeAttrs[ attrs[ 0 ].nodeName ] || ( attrsNum == 2 && !execludeAttrs[ attrs[ 1 ].nodeName ] ) ); return attrsNum > 0 && ( attrsNum > 2 || !execludeAttrs[ attrs[ 0 ].nodeName ] || ( attrsNum == 2 && !execludeAttrs[ attrs[ 1 ].nodeName ] ) );
@ -980,21 +1071,48 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
* @returns {Boolean} `true` if the specified attribute is defined. * @returns {Boolean} `true` if the specified attribute is defined.
*/ */
hasAttribute: ( function() { hasAttribute: ( function() {
function standard( name ) { function ieHasAttribute( name ) {
var $attr = this.$.attributes.getNamedItem( name ); var $attr = this.$.attributes.getNamedItem( name );
return !!( $attr && $attr.specified );
if ( this.getName() == 'input' ) {
switch ( name ) {
case 'class':
return this.$.className.length > 0;
case 'checked':
return !!this.$.checked;
case 'value':
var type = this.getAttribute( 'type' );
return type == 'checkbox' || type == 'radio' ? this.$.value != 'on' : !!this.$.value;
}
} }
return ( CKEDITOR.env.ie && CKEDITOR.env.version < 8 ) ? if ( !$attr )
function( name ) { return false;
return $attr.specified;
}
if ( CKEDITOR.env.ie ) {
if ( CKEDITOR.env.version < 8 ) {
return function( name ) {
// On IE < 8 the name attribute cannot be retrieved // On IE < 8 the name attribute cannot be retrieved
// right after the element creation and setting the // right after the element creation and setting the
// name with setAttribute. // name with setAttribute.
if ( name == 'name' ) if ( name == 'name' )
return !!this.$.name; return !!this.$.name;
return standard.call( this, name ); return ieHasAttribute.call( this, name );
} : standard; };
} else {
return ieHasAttribute;
}
} else {
return function( name ) {
// On other browsers specified property is deprecated and return always true,
// but fortunately $.attributes contains only specified attributes.
return !!this.$.attributes.getNamedItem( name );
};
}
} )(), } )(),
/** /**
@ -1046,7 +1164,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
function mergeElements( element, sibling, isNext ) { function mergeElements( element, sibling, isNext ) {
if ( sibling && sibling.type == CKEDITOR.NODE_ELEMENT ) { if ( sibling && sibling.type == CKEDITOR.NODE_ELEMENT ) {
// Jumping over bookmark nodes and empty inline elements, e.g. <b><i></i></b>, // Jumping over bookmark nodes and empty inline elements, e.g. <b><i></i></b>,
// queuing them to be moved later. (#5567) // queuing them to be moved later. (https://dev.ckeditor.com/ticket/5567)
var pendingNodes = []; var pendingNodes = [];
while ( sibling.data( 'cke-bookmark' ) || sibling.isEmptyInlineRemoveable() ) { while ( sibling.data( 'cke-bookmark' ) || sibling.isEmptyInlineRemoveable() ) {
@ -1076,8 +1194,8 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
} }
return function( inlineOnly ) { return function( inlineOnly ) {
if ( !( inlineOnly === false || CKEDITOR.dtd.$removeEmpty[ this.getName() ] || this.is( 'a' ) ) ) // Merge empty links and anchors also. (#5567) // Merge empty links and anchors also. (https://dev.ckeditor.com/ticket/5567)
{ if ( !( inlineOnly === false || CKEDITOR.dtd.$removeEmpty[ this.getName() ] || this.is( 'a' ) ) ) {
return; return;
} }
@ -1117,7 +1235,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
return this; return this;
}; };
if ( CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat ) ) { if ( CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks ) ) {
return function( name, value ) { return function( name, value ) {
if ( name == 'class' ) if ( name == 'class' )
this.$.className = value; this.$.className = value;
@ -1135,16 +1253,19 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
}; };
} else if ( CKEDITOR.env.ie8Compat && CKEDITOR.env.secure ) { } else if ( CKEDITOR.env.ie8Compat && CKEDITOR.env.secure ) {
return function( name, value ) { return function( name, value ) {
// IE8 throws error when setting src attribute to non-ssl value. (#7847) // IE8 throws error when setting src attribute to non-ssl value. (https://dev.ckeditor.com/ticket/7847)
if ( name == 'src' && value.match( /^http:\/\// ) ) if ( name == 'src' && value.match( /^http:\/\// ) ) {
try { try {
standard.apply( this, arguments ); standard.apply( this, arguments );
} catch ( e ) {} else } catch ( e ) {}
} else {
standard.apply( this, arguments ); standard.apply( this, arguments );
}
return this; return this;
}; };
} else } else {
return standard; return standard;
}
} )(), } )(),
/** /**
@ -1194,7 +1315,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
this.$.removeAttribute( name ); this.$.removeAttribute( name );
}; };
if ( CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat ) ) { if ( CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks ) ) {
return function( name ) { return function( name ) {
if ( name == 'class' ) if ( name == 'class' )
name = 'className'; name = 'className';
@ -1204,8 +1325,9 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
name = 'contentEditable'; name = 'contentEditable';
standard.call( this, name ); standard.call( this, name );
}; };
} else } else {
return standard; return standard;
}
} )(), } )(),
/** /**
@ -1215,12 +1337,16 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
*/ */
removeAttributes: function( attributes ) { removeAttributes: function( attributes ) {
if ( CKEDITOR.tools.isArray( attributes ) ) { if ( CKEDITOR.tools.isArray( attributes ) ) {
for ( var i = 0; i < attributes.length; i++ ) for ( var i = 0; i < attributes.length; i++ ) {
this.removeAttribute( attributes[ i ] ); this.removeAttribute( attributes[ i ] );
}
} else { } else {
for ( var attr in attributes ) attributes = attributes || this.getAttributes();
for ( var attr in attributes ) {
attributes.hasOwnProperty( attr ) && this.removeAttribute( attr ); attributes.hasOwnProperty( attr ) && this.removeAttribute( attr );
} }
}
}, },
/** /**
@ -1300,8 +1426,9 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 ) { if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 ) {
opacity = Math.round( opacity * 100 ); opacity = Math.round( opacity * 100 );
this.setStyle( 'filter', opacity >= 100 ? '' : 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + opacity + ')' ); this.setStyle( 'filter', opacity >= 100 ? '' : 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + opacity + ')' );
} else } else {
this.setStyle( 'opacity', opacity ); this.setStyle( 'opacity', opacity );
}
}, },
/** /**
@ -1319,11 +1446,11 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
// For IE/Opera which doesn't support for the above CSS style, // For IE/Opera which doesn't support for the above CSS style,
// the unselectable="on" attribute only specifies the selection // the unselectable="on" attribute only specifies the selection
// process cannot start in the element itself, and it doesn't inherit. // process cannot start in the element itself, and it doesn't inherit.
if ( CKEDITOR.env.ie || CKEDITOR.env.opera ) { if ( CKEDITOR.env.ie ) {
this.setAttribute( 'unselectable', 'on' ); this.setAttribute( 'unselectable', 'on' );
var element, var element,
elements = this.getElementsByTag( "*" ); elements = this.getElementsByTag( '*' );
for ( var i = 0, count = elements.count() ; i < count ; i++ ) { for ( var i = 0, count = elements.count() ; i < count ; i++ ) {
element = elements.getItem( i ); element = elements.getItem( i );
@ -1364,7 +1491,8 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
body = doc.getBody(), body = doc.getBody(),
quirks = doc.$.compatMode == 'BackCompat'; quirks = doc.$.compatMode == 'BackCompat';
if ( document.documentElement[ "getBoundingClientRect" ] ) { if ( document.documentElement.getBoundingClientRect &&
( CKEDITOR.env.ie ? CKEDITOR.env.version !== 8 : true ) ) {
var box = this.$.getBoundingClientRect(), var box = this.$.getBoundingClientRect(),
$doc = doc.$, $doc = doc.$,
$docElem = $doc.documentElement; $docElem = $doc.documentElement;
@ -1373,7 +1501,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
clientLeft = $docElem.clientLeft || body.$.clientLeft || 0, clientLeft = $docElem.clientLeft || body.$.clientLeft || 0,
needAdjustScrollAndBorders = true; needAdjustScrollAndBorders = true;
// #3804: getBoundingClientRect() works differently on IE and non-IE // https://dev.ckeditor.com/ticket/3804: getBoundingClientRect() works differently on IE and non-IE
// browsers, regarding scroll positions. // browsers, regarding scroll positions.
// //
// On IE, the top position of the <html> element is always 0, no matter // On IE, the top position of the <html> element is always 0, no matter
@ -1388,11 +1516,24 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
needAdjustScrollAndBorders = ( quirks && inBody ) || ( !quirks && inDocElem ); needAdjustScrollAndBorders = ( quirks && inBody ) || ( !quirks && inDocElem );
} }
// https://dev.ckeditor.com/ticket/12747.
if ( needAdjustScrollAndBorders ) { if ( needAdjustScrollAndBorders ) {
x = box.left + ( !quirks && $docElem.scrollLeft || body.$.scrollLeft ); var scrollRelativeLeft,
x -= clientLeft; scrollRelativeTop;
y = box.top + ( !quirks && $docElem.scrollTop || body.$.scrollTop );
y -= clientTop; // See https://dev.ckeditor.com/ticket/12758 to know more about document.(documentElement|body).scroll(Left|Top) in Webkit.
if ( CKEDITOR.env.webkit || ( CKEDITOR.env.ie && CKEDITOR.env.version >= 12 ) ) {
scrollRelativeLeft = body.$.scrollLeft || $docElem.scrollLeft;
scrollRelativeTop = body.$.scrollTop || $docElem.scrollTop;
} else {
var scrollRelativeElement = quirks ? body.$ : $docElem;
scrollRelativeLeft = scrollRelativeElement.scrollLeft;
scrollRelativeTop = scrollRelativeElement.scrollTop;
}
x = box.left + scrollRelativeLeft - clientLeft;
y = box.top + scrollRelativeTop - clientTop;
} }
} else { } else {
var current = this, var current = this,
@ -1432,7 +1573,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
} }
} }
if ( !document.documentElement[ "getBoundingClientRect" ] ) { if ( !document.documentElement.getBoundingClientRect ) {
// In Firefox, we'll endup one pixel before the element positions, // In Firefox, we'll endup one pixel before the element positions,
// so we must add it here. // so we must add it here.
if ( CKEDITOR.env.gecko && !quirks ) { if ( CKEDITOR.env.gecko && !quirks ) {
@ -1462,7 +1603,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
parent.$.clientHeight && parent.$.clientHeight < parent.$.scrollHeight; parent.$.clientHeight && parent.$.clientHeight < parent.$.scrollHeight;
// Skip body element, which will report wrong clientHeight when containing // Skip body element, which will report wrong clientHeight when containing
// floated content. (#9523) // floated content. (https://dev.ckeditor.com/ticket/9523)
if ( overflowed && !parent.is( 'body' ) ) if ( overflowed && !parent.is( 'body' ) )
this.scrollIntoParent( parent, alignToTop, 1 ); this.scrollIntoParent( parent, alignToTop, 1 );
@ -1507,8 +1648,8 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
if ( /body|html/.test( parent.getName() ) ) if ( /body|html/.test( parent.getName() ) )
parent.getWindow().$.scrollBy( x, y ); parent.getWindow().$.scrollBy( x, y );
else { else {
parent.$[ 'scrollLeft' ] += x; parent.$.scrollLeft += x;
parent.$[ 'scrollTop' ] += y; parent.$.scrollTop += y;
} }
} }
@ -1535,6 +1676,16 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
return parseInt( element.getComputedStyle( 'margin-' + side ) || 0, 10 ) || 0; return parseInt( element.getComputedStyle( 'margin-' + side ) || 0, 10 ) || 0;
} }
// [WebKit] Reset stored scrollTop value to not break scrollIntoView() method flow.
// Scrolling breaks when range.select() is used right after element.scrollIntoView(). (https://dev.ckeditor.com/ticket/14659)
if ( CKEDITOR.env.webkit ) {
var editor = this.getEditor( false );
if ( editor ) {
editor._.previousScrollTop = null;
}
}
var win = parent.getWindow(); var win = parent.getWindow();
var thisPos = screenPos( this, win ), var thisPos = screenPos( this, win ),
@ -1665,8 +1816,9 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
if ( attrName == 'checked' && ( attrValue = this.getAttribute( attrName ) ) ) if ( attrName == 'checked' && ( attrValue = this.getAttribute( attrName ) ) )
dest.setAttribute( attrName, attrValue ); dest.setAttribute( attrName, attrValue );
// IE BUG: value attribute is never specified even if it exists. // IE contains not specified attributes in $.attributes so we need to check
else if ( attribute.specified || ( CKEDITOR.env.ie && attribute.nodeValue && attrName == 'value' ) ) { // if elements attribute is specified using hasAttribute.
else if ( !CKEDITOR.env.ie || this.hasAttribute( attrName ) ) {
attrValue = this.getAttribute( attrName ); attrValue = this.getAttribute( attrName );
if ( attrValue === null ) if ( attrValue === null )
attrValue = attribute.nodeValue; attrValue = attribute.nodeValue;
@ -1702,10 +1854,10 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
this.moveChildren( newNode ); this.moveChildren( newNode );
// Replace the node. // Replace the node.
this.getParent() && this.$.parentNode.replaceChild( newNode.$, this.$ ); this.getParent( true ) && this.$.parentNode.replaceChild( newNode.$, this.$ );
newNode.$[ 'data-cke-expando' ] = this.$[ 'data-cke-expando' ]; newNode.$[ 'data-cke-expando' ] = this.$[ 'data-cke-expando' ];
this.$ = newNode.$; this.$ = newNode.$;
// Bust getName's cache. (#8663) // Bust getName's cache. (https://dev.ckeditor.com/ticket/8663)
delete this.getName; delete this.getName;
}, },
@ -1732,6 +1884,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
if ( !indices.slice ) if ( !indices.slice )
rawNode = getChild( rawNode, indices ); rawNode = getChild( rawNode, indices );
else { else {
indices = indices.slice();
while ( indices.length > 0 && rawNode ) while ( indices.length > 0 && rawNode )
rawNode = getChild( rawNode, indices.shift() ); rawNode = getChild( rawNode, indices.shift() );
} }
@ -1753,11 +1906,15 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
* Disables browser's context menu in this element. * Disables browser's context menu in this element.
*/ */
disableContextMenu: function() { disableContextMenu: function() {
this.on( 'contextmenu', function( event ) { this.on( 'contextmenu', function( evt ) {
// Cancel the browser context menu. // Cancel the browser context menu.
if ( !event.data.getTarget().hasClass( 'cke_enable_context_menu' ) ) if ( !evt.data.getTarget().getAscendant( enablesContextMenu, true ) )
event.data.preventDefault(); evt.data.preventDefault();
} ); } );
function enablesContextMenu( node ) {
return node.type == CKEDITOR.NODE_ELEMENT && node.hasClass( 'cke_enable_context_menu' );
}
}, },
/** /**
@ -1771,8 +1928,9 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
this.getDocument().$.dir || this.getDocument().$.dir ||
'ltr'; 'ltr';
} }
else else {
return this.getStyle( 'direction' ) || this.getAttribute( 'dir' ); return this.getStyle( 'direction' ) || this.getAttribute( 'dir' );
}
}, },
/** /**
@ -1807,17 +1965,32 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
* CKEDITOR.replace( element ); * CKEDITOR.replace( element );
* alert( element.getEditor().name ); // 'editor1' * alert( element.getEditor().name ); // 'editor1'
* *
* By default this method considers only original DOM elements upon which the editor
* was created. Setting `optimized` parameter to `false` will consider editor editable
* and its children.
*
* @param {Boolean} [optimized=true] If set to `false` it will scan every editor editable.
* @returns {CKEDITOR.editor} An editor instance or null if nothing has been found. * @returns {CKEDITOR.editor} An editor instance or null if nothing has been found.
*/ */
getEditor: function() { getEditor: function( optimized ) {
var instances = CKEDITOR.instances, var instances = CKEDITOR.instances,
name, instance; name, instance, editable;
optimized = optimized || optimized === undefined;
for ( name in instances ) { for ( name in instances ) {
instance = instances[ name ]; instance = instances[ name ];
if ( instance.element.equals( this ) && instance.elementMode != CKEDITOR.ELEMENT_MODE_APPENDTO ) if ( instance.element.equals( this ) && instance.elementMode != CKEDITOR.ELEMENT_MODE_APPENDTO )
return instance; return instance;
if ( !optimized ) {
editable = instance.editable();
if ( editable && ( editable.equals( this ) || editable.contains( this ) ) ) {
return instance;
}
}
} }
return null; return null;
@ -1923,7 +2096,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
callback( node ); callback( node );
} }
} }
} ); } );
function createTmpId( element ) { function createTmpId( element ) {
var hadId = true; var hadId = true;
@ -1940,7 +2113,8 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
} }
function getContextualizedSelector( element, selector ) { function getContextualizedSelector( element, selector ) {
return '#' + element.$.id + ' ' + selector.split( /,\s*/ ).join( ', #' + element.$.id + ' ' ); var id = CKEDITOR.tools.escapeCss( element.$.id );
return '#' + id + ' ' + selector.split( /,\s*/ ).join( ', #' + id + ' ' );
} }
var sides = { var sides = {
@ -1961,10 +2135,10 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
if ( components ) { if ( components ) {
for ( var j = 0 ; j < components.length ; j++ ) for ( var j = 0 ; j < components.length ; j++ )
styles.push( [ style, sides[ i ], components[ j ] ].join( '-' ) ); styles.push( [ style, sides[ i ], components[ j ] ].join( '-' ) );
} } else {
else
styles.push( [ style, sides[ i ] ].join( '-' ) ); styles.push( [ style, sides[ i ] ].join( '-' ) );
} }
}
return styles; return styles;
} }
@ -1972,7 +2146,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, {
function marginAndPaddingSize( type ) { function marginAndPaddingSize( type ) {
var adjustment = 0; var adjustment = 0;
for ( var i = 0, len = sides[ type ].length; i < len; i++ ) for ( var i = 0, len = sides[ type ].length; i < len; i++ )
adjustment += parseInt( this.getComputedStyle( sides[ type ][ i ] ) || 0, 10 ) || 0; adjustment += parseFloat( this.getComputedStyle( sides[ type ][ i ] ) || 0, 10 ) || 0;
return adjustment; return adjustment;
} }

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
'use strict'; 'use strict';
@ -57,6 +57,11 @@
// Backward compact. // Backward compact.
root = root || startNode.getDocument().getBody(); root = root || startNode.getDocument().getBody();
// Assign root value if startNode is null (#424)(https://dev.ckeditor.com/ticket/17028).
if ( !e ) {
e = root;
}
do { do {
if ( e.type == CKEDITOR.NODE_ELEMENT ) { if ( e.type == CKEDITOR.NODE_ELEMENT ) {
elements.push( e ); elements.push( e );
@ -84,7 +89,7 @@
block = e; block = e;
if ( pathBlockLimitElements[ elementName ] ) { if ( pathBlockLimitElements[ elementName ] ) {
// End level DIV is considered as the block, if no block is available. (#525) // End level DIV is considered as the block, if no block is available. (https://dev.ckeditor.com/ticket/525)
// But it must NOT be the root element (checked above). // But it must NOT be the root element (checked above).
if ( !block && elementName == 'div' && !checkHasBlock( e ) ) if ( !block && elementName == 'div' && !checkHasBlock( e ) )
block = e; block = e;
@ -181,7 +186,9 @@ CKEDITOR.dom.elementPath.prototype = {
* @returns {CKEDITOR.dom.element} The first matched dom element or `null`. * @returns {CKEDITOR.dom.element} The first matched dom element or `null`.
*/ */
contains: function( query, excludeRoot, fromTop ) { contains: function( query, excludeRoot, fromTop ) {
var evaluator; var i = 0,
evaluator;
if ( typeof query == 'string' ) if ( typeof query == 'string' )
evaluator = function( node ) { evaluator = function( node ) {
return node.getName() == query; return node.getName() == query;
@ -203,14 +210,21 @@ CKEDITOR.dom.elementPath.prototype = {
var elements = this.elements, var elements = this.elements,
length = elements.length; length = elements.length;
excludeRoot && length--;
if ( excludeRoot ) {
if ( !fromTop ) {
length -= 1;
} else {
i += 1;
}
}
if ( fromTop ) { if ( fromTop ) {
elements = Array.prototype.slice.call( elements, 0 ); elements = Array.prototype.slice.call( elements, 0 );
elements.reverse(); elements.reverse();
} }
for ( var i = 0; i < length; i++ ) { for ( ; i < length; i++ ) {
if ( evaluator( elements[ i ] ) ) if ( evaluator( elements[ i ] ) )
return elements[ i ]; return elements[ i ];
} }

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -142,11 +142,11 @@ CKEDITOR.dom.event.prototype = {
* @returns {Number} return.x * @returns {Number} return.x
* @returns {Number} return.y * @returns {Number} return.y
*/ */
getPageOffset : function() { getPageOffset: function() {
var doc = this.getTarget().getDocument().$; var doc = this.getTarget().getDocument().$;
var pageX = this.$.pageX || this.$.clientX + ( doc.documentElement.scrollLeft || doc.body.scrollLeft ); var pageX = this.$.pageX || this.$.clientX + ( doc.documentElement.scrollLeft || doc.body.scrollLeft );
var pageY = this.$.pageY || this.$.clientY + ( doc.documentElement.scrollTop || doc.body.scrollTop ); var pageY = this.$.pageY || this.$.clientY + ( doc.documentElement.scrollTop || doc.body.scrollTop );
return { x : pageX, y : pageY }; return { x: pageX, y: pageY };
} }
}; };

View File

@ -1,20 +1,20 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
* @ignore * @ignore
* File overview: DOM iterator, which iterates over list items, lines and paragraphs. * File overview: DOM iterator which iterates over list items, lines and paragraphs.
*/ */
'use strict'; 'use strict';
( function() { ( function() {
/** /**
* Represents iterator class. It can be used to iterate * Represents the iterator class. It can be used to iterate
* over all elements (or even text nodes in case of {@link #enlargeBr} set to `false`) * over all elements (or even text nodes in case of {@link #enlargeBr} set to `false`)
* which establish "paragraph-like" spaces within passed range. * which establish "paragraph-like" spaces within the passed range.
* *
* // <h1>[foo</h1><p>bar]</p> * // <h1>[foo</h1><p>bar]</p>
* var iterator = range.createIterator(); * var iterator = range.createIterator();
@ -22,8 +22,8 @@
* iterator.getNextParagraph(); // p element * iterator.getNextParagraph(); // p element
* *
* // <ul><li>[foo</li><li>bar]</li> * // <ul><li>[foo</li><li>bar]</li>
* // With enforceRealBlocks set to false iterator will return two list item elements. * // With enforceRealBlocks set to false the iterator will return two list item elements.
* // With enforceRealBlocks set to true iterator will return two paragraphs and the DOM will be changed to: * // With enforceRealBlocks set to true the iterator will return two paragraphs and the DOM will be changed to:
* // <ul><li><p>foo</p></li><li><p>bar</p></li> * // <ul><li><p>foo</p></li><li><p>bar</p></li>
* *
* @class CKEDITOR.dom.iterator * @class CKEDITOR.dom.iterator
@ -34,21 +34,29 @@
if ( arguments.length < 1 ) if ( arguments.length < 1 )
return; return;
/**
* @readonly
* @property {CKEDITOR.dom.range}
*/
this.range = range; this.range = range;
/**
* @property {Boolean} [forceBrBreak=false]
*/
this.forceBrBreak = 0; this.forceBrBreak = 0;
// (#3730). // (https://dev.ckeditor.com/ticket/3730).
/** /**
* Whether include `<br>`s into the enlarged range. Should be * Whether to include `<br>` elements in the enlarged range. Should be
* set to `false` when using iterator in {@link CKEDITOR#ENTER_BR} mode. * set to `false` when using the iterator in the {@link CKEDITOR#ENTER_BR} mode.
* *
* @property {Boolean} [enlargeBr=true] * @property {Boolean} [enlargeBr=true]
*/ */
this.enlargeBr = 1; this.enlargeBr = 1;
/** /**
* Whether iterator should create transformable block * Whether the iterator should create a transformable block
* if the current one contains text and it cannot be transformed. * if the current one contains text and cannot be transformed.
* For example new blocks will be established in elements like * For example new blocks will be established in elements like
* `<li>` or `<td>`. * `<li>` or `<td>`.
* *
@ -69,7 +77,7 @@
/** /**
* Iterator's active filter. It is set by the {@link #getNextParagraph} method * Iterator's active filter. It is set by the {@link #getNextParagraph} method
* when it enters nested editable. * when it enters a nested editable.
* *
* @since 4.3 * @since 4.3
* @readonly * @readonly
@ -77,27 +85,20 @@
*/ */
var beginWhitespaceRegex = /^[\r\n\t ]+$/, var beginWhitespaceRegex = /^[\r\n\t ]+$/,
// Ignore bookmark nodes.(#3783) // Ignore bookmark nodes.(https://dev.ckeditor.com/ticket/3783)
bookmarkGuard = CKEDITOR.dom.walker.bookmark( false, true ), bookmarkGuard = CKEDITOR.dom.walker.bookmark( false, true ),
whitespacesGuard = CKEDITOR.dom.walker.whitespaces( true ), whitespacesGuard = CKEDITOR.dom.walker.whitespaces( true ),
skipGuard = function( node ) { skipGuard = function( node ) {
return bookmarkGuard( node ) && whitespacesGuard( node ); return bookmarkGuard( node ) && whitespacesGuard( node );
}; },
listItemNames = { dd: 1, dt: 1, li: 1 };
// Get a reference for the next element, bookmark nodes are skipped.
function getNextSourceNode( node, startFromSibling, lastNode ) {
var next = node.getNextSourceNode( startFromSibling, null, lastNode );
while ( !bookmarkGuard( next ) )
next = next.getNextSourceNode( startFromSibling, null, lastNode );
return next;
}
iterator.prototype = { iterator.prototype = {
/** /**
* Returns next paragraph-like element or `null` if reached the end of range. * Returns the next paragraph-like element or `null` if the end of a range is reached.
* *
* @param {String} [blockTag='p'] Name of a block element which will be established by * @param {String} [blockTag='p'] Name of a block element which will be established by
* iterator in block-less elements (see {@link #enforceRealBlocks}). * the iterator in block-less elements (see {@link #enforceRealBlocks}).
*/ */
getNextParagraph: function( blockTag ) { getNextParagraph: function( blockTag ) {
// The block element to be returned. // The block element to be returned.
@ -133,9 +134,10 @@
// Inherit activeFilter from the nested iterator. // Inherit activeFilter from the nested iterator.
this.activeFilter = this._.nestedEditable.iterator.activeFilter; this.activeFilter = this._.nestedEditable.iterator.activeFilter;
return this._.nestedEditable.iterator.getNextParagraph( blockTag ); return this._.nestedEditable.iterator.getNextParagraph( blockTag );
} else } else {
this._.nestedEditable = null; this._.nestedEditable = null;
} }
}
// Block-less range should be checked first. // Block-less range should be checked first.
if ( !this.range.root.getDtd()[ blockTag ] ) if ( !this.range.root.getDtd()[ blockTag ] )
@ -189,15 +191,16 @@
} }
// The range must finish right before the boundary, // The range must finish right before the boundary,
// including possibly skipped empty spaces. (#1603) // including possibly skipped empty spaces. (https://dev.ckeditor.com/ticket/1603)
if ( range ) { if ( range ) {
range.setEndAt( currentNode, CKEDITOR.POSITION_BEFORE_START ); range.setEndAt( currentNode, CKEDITOR.POSITION_BEFORE_START );
// The found boundary must be set as the next one at this // The found boundary must be set as the next one at this
// point. (#1717) // point. (https://dev.ckeditor.com/ticket/1717)
if ( nodeName != 'br' ) if ( nodeName != 'br' ) {
this._.nextNode = currentNode; this._.nextNode = currentNode;
} }
}
closeRange = 1; closeRange = 1;
} else { } else {
@ -241,7 +244,7 @@
closeRange = 1; closeRange = 1;
includeNode = 0; includeNode = 0;
isLast = isLast || ( parentNode.equals( lastNode ) ); isLast = isLast || ( parentNode.equals( lastNode ) );
// Make sure range includes bookmarks at the end of the block. (#7359) // Make sure range includes bookmarks at the end of the block. (https://dev.ckeditor.com/ticket/7359)
range.setEndAt( parentNode, CKEDITOR.POSITION_BEFORE_END ); range.setEndAt( parentNode, CKEDITOR.POSITION_BEFORE_END );
break; break;
} }
@ -257,7 +260,7 @@
if ( includeNode ) if ( includeNode )
range.setEndAt( currentNode, CKEDITOR.POSITION_AFTER_END ); range.setEndAt( currentNode, CKEDITOR.POSITION_AFTER_END );
currentNode = getNextSourceNode( currentNode, continueFromSibling, lastNode ); currentNode = this._getNextSourceNode( currentNode, continueFromSibling, lastNode );
isLast = !currentNode; isLast = !currentNode;
// We have found a block boundary. Let's close the range and move out of the // We have found a block boundary. Let's close the range and move out of the
@ -280,9 +283,10 @@
checkLimits = { div: 1, th: 1, td: 1 }; checkLimits = { div: 1, th: 1, td: 1 };
block = startPath.block; block = startPath.block;
if ( !block && startBlockLimit && !this.enforceRealBlocks && checkLimits[ startBlockLimit.getName() ] && range.checkStartOfBlock() && range.checkEndOfBlock() && !startBlockLimit.equals( range.root ) ) if ( !block && startBlockLimit && !this.enforceRealBlocks && checkLimits[ startBlockLimit.getName() ] &&
range.checkStartOfBlock() && range.checkEndOfBlock() && !startBlockLimit.equals( range.root ) ) {
block = startBlockLimit; block = startBlockLimit;
else if ( !block || ( this.enforceRealBlocks && block.getName() == 'li' ) ) { } else if ( !block || ( this.enforceRealBlocks && block.is( listItemNames ) ) ) {
// Create the fixed block. // Create the fixed block.
block = this.range.document.createElement( blockTag ); block = this.range.document.createElement( blockTag );
@ -322,7 +326,7 @@
// the current range, which could be an <li> child (nested // the current range, which could be an <li> child (nested
// lists) or the next sibling <li>. // lists) or the next sibling <li>.
this._.nextNode = ( block.equals( lastNode ) ? null : getNextSourceNode( range.getBoundaryNodes().endNode, 1, lastNode ) ); this._.nextNode = ( block.equals( lastNode ) ? null : this._getNextSourceNode( range.getBoundaryNodes().endNode, 1, lastNode ) );
} }
} }
@ -348,10 +352,41 @@
// Get a reference for the next element. This is important because the // Get a reference for the next element. This is important because the
// above block can be removed or changed, so we can rely on it for the // above block can be removed or changed, so we can rely on it for the
// next interation. // next interation.
if ( !this._.nextNode ) if ( !this._.nextNode ) {
this._.nextNode = ( isLast || block.equals( lastNode ) || !lastNode ) ? null : getNextSourceNode( block, 1, lastNode ); this._.nextNode = ( isLast || block.equals( lastNode ) || !lastNode ) ? null : this._getNextSourceNode( block, 1, lastNode );
}
return block; return block;
},
/**
* Gets the next element to check or `null` when the `lastNode` or the
* {@link #range}'s {@link CKEDITOR.dom.range#root root} is reached. Bookmarks are skipped.
*
* @since 4.4.6
* @private
* @param {CKEDITOR.dom.node} node
* @param {Boolean} startFromSibling
* @param {CKEDITOR.dom.node} lastNode
* @returns {CKEDITOR.dom.node}
*/
_getNextSourceNode: function( node, startFromSibling, lastNode ) {
var rootNode = this.range.root,
next;
// Here we are checking in guard function whether current element
// reach lastNode(default behaviour) and root node to prevent against
// getting out of editor instance root DOM object.
// https://dev.ckeditor.com/ticket/12484
function guardFunction( node ) {
return !( node.equals( lastNode ) || node.equals( rootNode ) );
}
next = node.getNextSourceNode( startFromSibling, null, guardFunction );
while ( !bookmarkGuard( next ) ) {
next = next.getNextSourceNode( startFromSibling, null, guardFunction );
}
return next;
} }
}; };
@ -360,11 +395,30 @@
function startIterator() { function startIterator() {
var range = this.range.clone(), var range = this.range.clone(),
// Indicate at least one of the range boundaries is inside a preformat block. // Indicate at least one of the range boundaries is inside a preformat block.
touchPre; touchPre,
// Shrink the range to exclude harmful "noises" (#4087, #4450, #5435). // (https://dev.ckeditor.com/ticket/12178)
// Remember if following situation takes place:
// * startAtInnerBoundary: <p>foo[</p>...
// * endAtInnerBoundary: ...<p>]bar</p>
// Because information about line break will be lost when shrinking range.
// Note that we test only if path block exist, because we must properly shrink
// range containing table and/or table cells.
// Note: When range is collapsed there's no way it can be shrinked.
// By checking if range is collapsed we also prevent https://dev.ckeditor.com/ticket/12308.
startPath = range.startPath(),
endPath = range.endPath(),
startAtInnerBoundary = !range.collapsed && rangeAtInnerBlockBoundary( range, startPath.block ),
endAtInnerBoundary = !range.collapsed && rangeAtInnerBlockBoundary( range, endPath.block, 1 );
// Shrink the range to exclude harmful "noises" (https://dev.ckeditor.com/ticket/4087, https://dev.ckeditor.com/ticket/4450, https://dev.ckeditor.com/ticket/5435).
range.shrink( CKEDITOR.SHRINK_ELEMENT, true ); range.shrink( CKEDITOR.SHRINK_ELEMENT, true );
if ( startAtInnerBoundary )
range.setStartAt( startPath.block, CKEDITOR.POSITION_BEFORE_END );
if ( endAtInnerBoundary )
range.setEndAt( endPath.block, CKEDITOR.POSITION_AFTER_START );
touchPre = range.endContainer.hasAscendant( 'pre', true ) || range.startContainer.hasAscendant( 'pre', true ); touchPre = range.endContainer.hasAscendant( 'pre', true ) || range.startContainer.hasAscendant( 'pre', true );
range.enlarge( this.forceBrBreak && !touchPre || !this.enlargeBr ? CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS : CKEDITOR.ENLARGE_BLOCK_CONTENTS ); range.enlarge( this.forceBrBreak && !touchPre || !this.enlargeBr ? CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS : CKEDITOR.ENLARGE_BLOCK_CONTENTS );
@ -379,11 +433,11 @@
walker = new CKEDITOR.dom.walker( range.clone() ); walker = new CKEDITOR.dom.walker( range.clone() );
walker.evaluator = ignoreBookmarkTextEvaluator; walker.evaluator = ignoreBookmarkTextEvaluator;
var lastNode = walker.previous(); var lastNode = walker.previous();
this._.lastNode = lastNode.getNextSourceNode( true ); this._.lastNode = lastNode.getNextSourceNode( true, null, range.root );
// We may have an empty text node at the end of block due to [3770]. // We may have an empty text node at the end of block due to [3770].
// If that node is the lastNode, it would cause our logic to leak to the // If that node is the lastNode, it would cause our logic to leak to the
// next block.(#3887) // next block.(https://dev.ckeditor.com/ticket/3887)
if ( this._.lastNode && this._.lastNode.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tools.trim( this._.lastNode.getText() ) && this._.lastNode.getParent().isBlockBoundary() ) { if ( this._.lastNode && this._.lastNode.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tools.trim( this._.lastNode.getText() ) && this._.lastNode.getParent().isBlockBoundary() ) {
var testRange = this.range.clone(); var testRange = this.range.clone();
testRange.moveToPosition( this._.lastNode, CKEDITOR.POSITION_AFTER_END ); testRange.moveToPosition( this._.lastNode, CKEDITOR.POSITION_AFTER_END );
@ -414,7 +468,7 @@
// @param {CKEDITOR.dom.element} editablesContainer // @param {CKEDITOR.dom.element} editablesContainer
// @param {CKEDITOR.dom.element[]} [remainingEditables] // @param {CKEDITOR.dom.element[]} [remainingEditables]
function getNestedEditableIn( editablesContainer, remainingEditables ) { function getNestedEditableIn( editablesContainer, remainingEditables ) {
if ( remainingEditables == undefined ) if ( remainingEditables == null )
remainingEditables = findNestedEditables( editablesContainer ); remainingEditables = findNestedEditables( editablesContainer );
var editable; var editable;
@ -488,8 +542,19 @@
return 1; return 1;
} }
// Checks whether range starts or ends at inner block boundary.
// See usage comments to learn more.
function rangeAtInnerBlockBoundary( range, block, checkEnd ) {
if ( !block )
return false;
var testRange = range.clone();
testRange.collapse( !checkEnd );
return testRange.checkBoundaryOfElement( block, checkEnd ? CKEDITOR.START : CKEDITOR.END );
}
/** /**
* Creates {CKEDITOR.dom.iterator} instance for this range. * Creates a {@link CKEDITOR.dom.iterator} instance for this range.
* *
* @member CKEDITOR.dom.range * @member CKEDITOR.dom.range
* @returns {CKEDITOR.dom.iterator} * @returns {CKEDITOR.dom.iterator}

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -22,7 +22,13 @@
*/ */
CKEDITOR.dom.node = function( domNode ) { CKEDITOR.dom.node = function( domNode ) {
if ( domNode ) { if ( domNode ) {
var type = domNode.nodeType == CKEDITOR.NODE_DOCUMENT ? 'document' : domNode.nodeType == CKEDITOR.NODE_ELEMENT ? 'element' : domNode.nodeType == CKEDITOR.NODE_TEXT ? 'text' : domNode.nodeType == CKEDITOR.NODE_COMMENT ? 'comment' : domNode.nodeType == CKEDITOR.NODE_DOCUMENT_FRAGMENT ? 'documentFragment' : 'domObject'; // Call the base constructor otherwise. var type =
domNode.nodeType == CKEDITOR.NODE_DOCUMENT ? 'document' :
domNode.nodeType == CKEDITOR.NODE_ELEMENT ? 'element' :
domNode.nodeType == CKEDITOR.NODE_TEXT ? 'text' :
domNode.nodeType == CKEDITOR.NODE_COMMENT ? 'comment' :
domNode.nodeType == CKEDITOR.NODE_DOCUMENT_FRAGMENT ? 'documentFragment' :
'domObject'; // Call the base constructor otherwise.
return new CKEDITOR.dom[ type ]( domNode ); return new CKEDITOR.dom[ type ]( domNode );
} }
@ -77,11 +83,58 @@ CKEDITOR.NODE_COMMENT = 8;
*/ */
CKEDITOR.NODE_DOCUMENT_FRAGMENT = 11; CKEDITOR.NODE_DOCUMENT_FRAGMENT = 11;
/**
* Indicates that positions of both nodes are identical (this is the same node). See {@link CKEDITOR.dom.node#getPosition}.
*
* @readonly
* @property {Number} [=0]
* @member CKEDITOR
*/
CKEDITOR.POSITION_IDENTICAL = 0; CKEDITOR.POSITION_IDENTICAL = 0;
/**
* Indicates that nodes are in different (detached) trees. See {@link CKEDITOR.dom.node#getPosition}.
*
* @readonly
* @property {Number} [=1]
* @member CKEDITOR
*/
CKEDITOR.POSITION_DISCONNECTED = 1; CKEDITOR.POSITION_DISCONNECTED = 1;
/**
* Indicates that the context node follows the other node. See {@link CKEDITOR.dom.node#getPosition}.
*
* @readonly
* @property {Number} [=2]
* @member CKEDITOR
*/
CKEDITOR.POSITION_FOLLOWING = 2; CKEDITOR.POSITION_FOLLOWING = 2;
/**
* Indicates that the context node precedes the other node. See {@link CKEDITOR.dom.node#getPosition}.
*
* @readonly
* @property {Number} [=4]
* @member CKEDITOR
*/
CKEDITOR.POSITION_PRECEDING = 4; CKEDITOR.POSITION_PRECEDING = 4;
/**
* Indicates that the context node is a descendant of the other node. See {@link CKEDITOR.dom.node#getPosition}.
*
* @readonly
* @property {Number} [=8]
* @member CKEDITOR
*/
CKEDITOR.POSITION_IS_CONTAINED = 8; CKEDITOR.POSITION_IS_CONTAINED = 8;
/**
* Indicates that the context node contains the other node. See {@link CKEDITOR.dom.node#getPosition}.
*
* @readonly
* @property {Number} [=16]
* @member CKEDITOR
*/
CKEDITOR.POSITION_CONTAINS = 16; CKEDITOR.POSITION_CONTAINS = 16;
CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, { CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, {
@ -103,26 +156,40 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, {
}, },
/** /**
* Clone this node. * Clones this node.
* *
* **Note**: Values set by {#setCustomData} won't be available in the clone. * **Note**: Values set by {#setCustomData} will not be available in the clone.
* *
* @param {Boolean} [includeChildren=false] If `true` then all node's * @param {Boolean} [includeChildren=false] If `true` then all node's
* children will be cloned recursively. * children will be cloned recursively.
* @param {Boolean} [cloneId=false] Whether ID attributes should be cloned too. * @param {Boolean} [cloneId=false] Whether ID attributes should be cloned, too.
* @returns {CKEDITOR.dom.node} Clone of this node. * @returns {CKEDITOR.dom.node} Clone of this node.
*/ */
clone: function( includeChildren, cloneId ) { clone: function( includeChildren, cloneId ) {
var $clone = this.$.cloneNode( includeChildren ); var $clone = this.$.cloneNode( includeChildren );
var removeIds = function( node ) { // The "id" attribute should never be cloned to avoid duplication.
removeIds( $clone );
var node = new CKEDITOR.dom.node( $clone );
// On IE8 we need to fixed HTML5 node name, see details below.
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 &&
( this.type == CKEDITOR.NODE_ELEMENT || this.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT ) ) {
renameNodes( node );
}
return node;
function removeIds( node ) {
// Reset data-cke-expando only when has been cloned (IE and only for some types of objects). // Reset data-cke-expando only when has been cloned (IE and only for some types of objects).
if ( node[ 'data-cke-expando' ] ) if ( node[ 'data-cke-expando' ] )
node[ 'data-cke-expando' ] = false; node[ 'data-cke-expando' ] = false;
if ( node.nodeType != CKEDITOR.NODE_ELEMENT ) if ( node.nodeType != CKEDITOR.NODE_ELEMENT && node.nodeType != CKEDITOR.NODE_DOCUMENT_FRAGMENT )
return; return;
if ( !cloneId )
if ( !cloneId && node.nodeType == CKEDITOR.NODE_ELEMENT )
node.removeAttribute( 'id', false ); node.removeAttribute( 'id', false );
if ( includeChildren ) { if ( includeChildren ) {
@ -130,16 +197,30 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, {
for ( var i = 0; i < childs.length; i++ ) for ( var i = 0; i < childs.length; i++ )
removeIds( childs[ i ] ); removeIds( childs[ i ] );
} }
}; }
// The "id" attribute should never be cloned to avoid duplication. // IE8 rename HTML5 nodes by adding `:` at the begging of the tag name when the node is cloned,
removeIds( $clone ); // so `<figure>` will be `<:figure>` after 'cloneNode'. We need to fix it (https://dev.ckeditor.com/ticket/13101).
function renameNodes( node ) {
if ( node.type != CKEDITOR.NODE_ELEMENT && node.type != CKEDITOR.NODE_DOCUMENT_FRAGMENT )
return;
return new CKEDITOR.dom.node( $clone ); if ( node.type != CKEDITOR.NODE_DOCUMENT_FRAGMENT ) {
var name = node.getName();
if ( name[ 0 ] == ':' ) {
node.renameNode( name.substring( 1 ) );
}
}
if ( includeChildren ) {
for ( var i = 0; i < node.getChildCount(); i++ )
renameNodes( node.getChild( i ) );
}
}
}, },
/** /**
* Check if node is preceded by any sibling. * Checks if the node is preceded by any sibling.
* *
* @returns {Boolean} * @returns {Boolean}
*/ */
@ -148,7 +229,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, {
}, },
/** /**
* Check if node is succeeded by any sibling. * Checks if the node is succeeded by any sibling.
* *
* @returns {Boolean} * @returns {Boolean}
*/ */
@ -191,7 +272,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, {
}, },
/** /**
* Inserts node before this node. * Inserts a node before this node.
* *
* var em = new CKEDITOR.dom.element( 'em' ); * var em = new CKEDITOR.dom.element( 'em' );
* var strong = new CKEDITOR.dom.element( 'strong' ); * var strong = new CKEDITOR.dom.element( 'strong' );
@ -258,19 +339,25 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, {
}, },
/** /**
* Get index of a node in an array of its parent.childNodes. * Gets the index of a node in an array of its `parent.childNodes`.
* Returns `-1` if a node does not have a parent or when the `normalized` argument is set to `true`
* and the text node is empty and will be removed during the normalization.
* *
* Let's assume having childNodes array: * Let us assume having the following `childNodes` array:
* *
* [ emptyText, element1, text, text, element2 ] * [ emptyText, element1, text, text, element2, emptyText2 ]
*
* emptyText.getIndex() // 0
* emptyText.getIndex( true ) // -1
* element1.getIndex(); // 1 * element1.getIndex(); // 1
* element1.getIndex( true ); // 0 * element1.getIndex( true ); // 0
* element2.getIndex(); // 4 * element2.getIndex(); // 4
* element2.getIndex( true ); // 2 * element2.getIndex( true ); // 2
* emptyText2.getIndex(); // 5
* emptyText2.getIndex( true ); // -1
* *
* @param {Boolean} normalized When `true` empty text nodes and one followed * @param {Boolean} normalized When `true`, adjacent text nodes are merged and empty text nodes are removed.
* by another one text node are not counted in. * @returns {Number} Index of a node or `-1` if a node does not have a parent or is removed during the normalization.
* @returns {Number} Index of a node.
*/ */
getIndex: function( normalized ) { getIndex: function( normalized ) {
// Attention: getAddress depends on this.$ // Attention: getAddress depends on this.$
@ -281,19 +368,46 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, {
isNormalizing; isNormalizing;
if ( !this.$.parentNode ) if ( !this.$.parentNode )
return index; return -1;
// The idea is - all empty text nodes will be virtually merged into their adjacent text nodes.
// If an empty text node does not have an adjacent non-empty text node we can return -1 straight away,
// because it and all its sibling text nodes will be merged into an empty text node and then totally ignored.
if ( normalized && current.nodeType == CKEDITOR.NODE_TEXT && isEmpty( current ) ) {
var adjacent = getAdjacentNonEmptyTextNode( current ) || getAdjacentNonEmptyTextNode( current, true );
if ( !adjacent )
return -1;
}
do { do {
// Bypass blank node and adjacent text nodes. // Bypass blank node and adjacent text nodes.
if ( normalized && current != this.$ && current.nodeType == CKEDITOR.NODE_TEXT && ( isNormalizing || !current.nodeValue ) ) if ( normalized && current != this.$ && current.nodeType == CKEDITOR.NODE_TEXT && ( isNormalizing || isEmpty( current ) ) )
continue; continue;
index++; index++;
isNormalizing = current.nodeType == CKEDITOR.NODE_TEXT; isNormalizing = current.nodeType == CKEDITOR.NODE_TEXT;
} }
while ( ( current = current.previousSibling ) ) while ( ( current = current.previousSibling ) );
return index; return index;
function getAdjacentNonEmptyTextNode( node, lookForward ) {
var sibling = lookForward ? node.nextSibling : node.previousSibling;
if ( !sibling || sibling.nodeType != CKEDITOR.NODE_TEXT ) {
return null;
}
// If found a non-empty text node, then return it.
// If not, then continue search.
return isEmpty( sibling ) ? getAdjacentNonEmptyTextNode( sibling, lookForward ) : sibling;
}
// Checks whether a text node is empty or is FCSeq string (which will be totally removed when normalizing).
function isEmpty( textNode ) {
return !textNode.nodeValue || textNode.nodeValue == CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE;
}
}, },
/** /**
@ -384,7 +498,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, {
}, },
/** /**
* Gets the node that preceed this element in its parent's child list. * Gets the node that preceeds this element in its parent's child list.
* *
* var element = CKEDITOR.dom.element.createFromHtml( '<div><i>prev</i><b>Example</b></div>' ); * var element = CKEDITOR.dom.element.createFromHtml( '<div><i>prev</i><b>Example</b></div>' );
* var first = element.getLast().getPrev(); * var first = element.getLast().getPrev();
@ -403,7 +517,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, {
// http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-412266927 // http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-412266927
retval = previous && previous.nodeType != 10 && new CKEDITOR.dom.node( previous ); retval = previous && previous.nodeType != 10 && new CKEDITOR.dom.node( previous );
} }
while ( retval && evaluator && !evaluator( retval ) ) while ( retval && evaluator && !evaluator( retval ) );
return retval; return retval;
}, },
@ -424,7 +538,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, {
next = next.nextSibling; next = next.nextSibling;
retval = next && new CKEDITOR.dom.node( next ); retval = next && new CKEDITOR.dom.node( next );
} }
while ( retval && evaluator && !evaluator( retval ) ) while ( retval && evaluator && !evaluator( retval ) );
return retval; return retval;
}, },
@ -445,15 +559,15 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, {
}, },
/** /**
* Returns array containing node parents and node itself. By default nodes are in _descending_ order. * Returns an array containing node parents and the node itself. By default nodes are in _descending_ order.
* *
* // Assuming that body has paragraph as first child. * // Assuming that body has paragraph as the first child.
* var node = editor.document.getBody().getFirst(); * var node = editor.document.getBody().getFirst();
* var parents = node.getParents(); * var parents = node.getParents();
* alert( parents[ 0 ].getName() + ',' + parents[ 2 ].getName() ); // 'html,p' * alert( parents[ 0 ].getName() + ',' + parents[ 2 ].getName() ); // 'html,p'
* *
* @param {Boolean} [closerFirst=false] Determines order of returned nodes. * @param {Boolean} [closerFirst=false] Determines the order of returned nodes.
* @returns {Array} Returns array of {@link CKEDITOR.dom.node}. * @returns {Array} Returns an array of {@link CKEDITOR.dom.node}.
*/ */
getParents: function( closerFirst ) { getParents: function( closerFirst ) {
var node = this; var node = this;
@ -462,7 +576,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, {
do { do {
parents[ closerFirst ? 'push' : 'unshift' ]( node ); parents[ closerFirst ? 'push' : 'unshift' ]( node );
} }
while ( ( node = node.getParent() ) ) while ( ( node = node.getParent() ) );
return parents; return parents;
}, },
@ -488,7 +602,14 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, {
}, },
/** /**
* @todo * Determines the position relation between this node and the given {@link CKEDITOR.dom.node} in the document.
* This node can be preceding ({@link CKEDITOR#POSITION_PRECEDING}) or following ({@link CKEDITOR#POSITION_FOLLOWING})
* the given node. This node can also contain ({@link CKEDITOR#POSITION_CONTAINS}) or be contained by
* ({@link CKEDITOR#POSITION_IS_CONTAINED}) the given node. The function returns a bitmask of constants
* listed above or {@link CKEDITOR#POSITION_IDENTICAL} if the given node is the same as this node.
*
* @param {CKEDITOR.dom.node} otherNode A node to check relation with.
* @returns {Number} Position relation between this node and given node.
*/ */
getPosition: function( otherNode ) { getPosition: function( otherNode ) {
var $ = this.$; var $ = this.$;
@ -524,13 +645,10 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, {
addressOfOther = otherNode.getAddress(), addressOfOther = otherNode.getAddress(),
minLevel = Math.min( addressOfThis.length, addressOfOther.length ); minLevel = Math.min( addressOfThis.length, addressOfOther.length );
// Determinate preceed/follow relationship. // Determinate preceding/following relationship.
for ( var i = 0; i <= minLevel - 1; i++ ) { for ( var i = 0; i < minLevel; i++ ) {
if ( addressOfThis[ i ] != addressOfOther[ i ] ) { if ( addressOfThis[ i ] != addressOfOther[ i ] ) {
if ( i < minLevel )
return addressOfThis[ i ] < addressOfOther[ i ] ? CKEDITOR.POSITION_PRECEDING : CKEDITOR.POSITION_FOLLOWING; return addressOfThis[ i ] < addressOfOther[ i ] ? CKEDITOR.POSITION_PRECEDING : CKEDITOR.POSITION_FOLLOWING;
break;
} }
} }
@ -539,7 +657,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, {
}, },
/** /**
* Gets the closest ancestor node of this node, specified by its name. * Gets the closest ancestor node of this node, specified by its name or using an evaluator function.
* *
* // Suppose we have the following HTML structure: * // Suppose we have the following HTML structure:
* // <div id="outer"><div id="inner"><p><b>Some text</b></p></div></div> * // <div id="outer"><div id="inner"><p><b>Some text</b></p></div></div>
@ -547,25 +665,49 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, {
* ascendant = node.getAscendant( 'div' ); // ascendant == <div id="inner"> * ascendant = node.getAscendant( 'div' ); // ascendant == <div id="inner">
* ascendant = node.getAscendant( 'b' ); // ascendant == null * ascendant = node.getAscendant( 'b' ); // ascendant == null
* ascendant = node.getAscendant( 'b', true ); // ascendant == <b> * ascendant = node.getAscendant( 'b', true ); // ascendant == <b>
* ascendant = node.getAscendant( { div:1,p:1 } ); // Searches for the first 'div' or 'p': ascendant == <div id="inner"> * ascendant = node.getAscendant( { div:1, p:1 } ); // Searches for the first 'div' or 'p': ascendant == <div id="inner">
*
* // Using custom evaluator:
* ascendant = node.getAscendant( function( el ) {
* return el.getId() == 'inner';
* } );
* // ascendant == <div id="inner">
* *
* @since 3.6.1 * @since 3.6.1
* @param {String} reference The name of the ancestor node to search or * @param {String/Function/Object} query The name of the ancestor node to search or
* an object with the node names to search for. * an object with the node names to search for or an evaluator function.
* @param {Boolean} [includeSelf] Whether to include the current * @param {Boolean} [includeSelf] Whether to include the current
* node in the search. * node in the search.
* @returns {CKEDITOR.dom.node} The located ancestor node or null if not found. * @returns {CKEDITOR.dom.node} The located ancestor node or `null` if not found.
*/ */
getAscendant: function( reference, includeSelf ) { getAscendant: function( query, includeSelf ) {
var $ = this.$, var $ = this.$,
name; evaluator,
isCustomEvaluator;
if ( !includeSelf ) if ( !includeSelf ) {
$ = $.parentNode; $ = $.parentNode;
}
// Custom checker provided in an argument.
if ( typeof query == 'function' ) {
isCustomEvaluator = true;
evaluator = query;
} else {
// Predefined tag name checker.
isCustomEvaluator = false;
evaluator = function( $ ) {
var name = ( typeof $.nodeName == 'string' ? $.nodeName.toLowerCase() : '' );
return ( typeof query == 'string' ? name == query : name in query );
};
}
while ( $ ) { while ( $ ) {
if ( $.nodeName && ( name = $.nodeName.toLowerCase(), ( typeof reference == 'string' ? name == reference : name in reference ) ) ) // For user provided checker we use CKEDITOR.dom.node.
if ( evaluator( isCustomEvaluator ? new CKEDITOR.dom.node( $ ) : $ ) ) {
return new CKEDITOR.dom.node( $ ); return new CKEDITOR.dom.node( $ );
}
try { try {
$ = $.parentNode; $ = $.parentNode;
@ -573,6 +715,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, {
$ = null; $ = null;
} }
} }
return null; return null;
}, },
@ -661,7 +804,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, {
} else if ( trimmed.length < originalLength ) { } else if ( trimmed.length < originalLength ) {
child.split( originalLength - trimmed.length ); child.split( originalLength - trimmed.length );
// IE BUG: child.remove() may raise JavaScript errors here. (#81) // IE BUG: child.remove() may raise JavaScript errors here. (https://dev.ckeditor.com/ticket/81)
this.$.removeChild( this.$.firstChild ); this.$.removeChild( this.$.firstChild );
} }
} }
@ -686,7 +829,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, {
child.split( trimmed.length ); child.split( trimmed.length );
// IE BUG: child.getNext().remove() may raise JavaScript errors here. // IE BUG: child.getNext().remove() may raise JavaScript errors here.
// (#81) // (https://dev.ckeditor.com/ticket/81)
this.$.lastChild.parentNode.removeChild( this.$.lastChild ); this.$.lastChild.parentNode.removeChild( this.$.lastChild );
} }
} }
@ -697,7 +840,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, {
child = this.$.lastChild; child = this.$.lastChild;
if ( child && child.type == 1 && child.nodeName.toLowerCase() == 'br' ) { if ( child && child.type == 1 && child.nodeName.toLowerCase() == 'br' ) {
// Use "eChildNode.parentNode" instead of "node" to avoid IE bug (#324). // Use "eChildNode.parentNode" instead of "node" to avoid IE bug (https://dev.ckeditor.com/ticket/324).
child.parentNode.removeChild( child ); child.parentNode.removeChild( child );
} }
} }
@ -706,43 +849,54 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, {
/** /**
* Checks if this node is read-only (should not be changed). * Checks if this node is read-only (should not be changed).
* *
* **Note:** When `attributeCheck` is not used, this method only work for elements
* that are already presented in the document, otherwise the result
* is not guaranteed, it's mainly for performance consideration.
*
* // For the following HTML: * // For the following HTML:
* // <div contenteditable="false">Some <b>text</b></div> * // <b>foo</b><div contenteditable="false"><i>bar</i></div>
* *
* // If "ele" is the above <div> * elB.isReadOnly(); // -> false
* element.isReadOnly(); // true * foo.isReadOnly(); // -> false
* elDiv.isReadOnly(); // -> true
* elI.isReadOnly(); // -> true
*
* This method works in two modes depending on browser support for the `element.isContentEditable` property and
* the value of the `checkOnlyAttributes` parameter. The `element.isContentEditable` check is faster, but it is known
* to malfunction in hidden or detached nodes. Additionally, when processing some detached DOM tree you may want to imitate
* that this happens inside an editable container (like it would happen inside the {@link CKEDITOR.editable}). To do so,
* you can temporarily attach this tree to an element with the `data-cke-editable` attribute and use the
* `checkOnlyAttributes` mode.
* *
* @since 3.5 * @since 3.5
* @param {Boolean} [checkOnlyAttributes=false] If `true`, only attributes will be checked, native methods will not
* be used. This parameter needs to be `true` to check hidden or detached elements. Introduced in 4.5.
* @returns {Boolean} * @returns {Boolean}
*/ */
isReadOnly: function() { isReadOnly: function( checkOnlyAttributes ) {
var element = this; var element = this;
if ( this.type != CKEDITOR.NODE_ELEMENT ) if ( this.type != CKEDITOR.NODE_ELEMENT )
element = this.getParent(); element = this.getParent();
if ( element && typeof element.$.isContentEditable != 'undefined' ) // Prevent Edge crash (https://dev.ckeditor.com/ticket/13609, https://dev.ckeditor.com/ticket/13919).
if ( CKEDITOR.env.edge && element && element.is( 'textarea', 'input' ) ) {
checkOnlyAttributes = true;
}
if ( !checkOnlyAttributes && element && typeof element.$.isContentEditable != 'undefined' ) {
return !( element.$.isContentEditable || element.data( 'cke-editable' ) ); return !( element.$.isContentEditable || element.data( 'cke-editable' ) );
}
else { else {
// Degrade for old browsers which don't support "isContentEditable", e.g. FF3 // Degrade for old browsers which don't support "isContentEditable", e.g. FF3
while ( element ) { while ( element ) {
if ( element.data( 'cke-editable' ) ) if ( element.data( 'cke-editable' ) ) {
break; return false;
} else if ( element.hasAttribute( 'contenteditable' ) ) {
if ( element.getAttribute( 'contentEditable' ) == 'false' ) return element.getAttribute( 'contenteditable' ) == 'false';
return true; }
else if ( element.getAttribute( 'contentEditable' ) == 'true' )
break;
element = element.getParent(); element = element.getParent();
} }
// Reached the root of DOM tree, no editable found. // Reached the root of DOM tree, no editable found.
return !element; return true;
} }
} }
} ); } );

View File

@ -1,11 +1,11 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
* Represents a list of {@link CKEDITOR.dom.node} objects. * Represents a list of {@link CKEDITOR.dom.node} objects.
* It's a wrapper for native nodes list. * It is a wrapper for a native nodes list.
* *
* var nodeList = CKEDITOR.document.getBody().getChildren(); * var nodeList = CKEDITOR.document.getBody().getChildren();
* alert( nodeList.count() ); // number [0;N] * alert( nodeList.count() ); // number [0;N]
@ -20,7 +20,7 @@ CKEDITOR.dom.nodeList = function( nativeList ) {
CKEDITOR.dom.nodeList.prototype = { CKEDITOR.dom.nodeList.prototype = {
/** /**
* Get count of nodes in this list. * Gets the count of nodes in this list.
* *
* @returns {Number} * @returns {Number}
*/ */
@ -29,7 +29,7 @@ CKEDITOR.dom.nodeList.prototype = {
}, },
/** /**
* Get node from the list. * Gets the node from the list.
* *
* @returns {CKEDITOR.dom.node} * @returns {CKEDITOR.dom.node}
*/ */
@ -39,5 +39,16 @@ CKEDITOR.dom.nodeList.prototype = {
var $node = this.$[ index ]; var $node = this.$[ index ];
return $node ? new CKEDITOR.dom.node( $node ) : null; return $node ? new CKEDITOR.dom.node( $node ) : null;
},
/**
* Returns a node list as an array.
*
* @returns {CKEDITOR.dom.node[]}
*/
toArray: function() {
return CKEDITOR.tools.array.map( this.$, function( nativeEl ) {
return new CKEDITOR.dom.node( nativeEl );
} );
} }
}; };

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
( function() { ( function() {
@ -39,9 +39,6 @@
createIterator: function() { createIterator: function() {
var rangeList = this, var rangeList = this,
bookmark = CKEDITOR.dom.walker.bookmark(), bookmark = CKEDITOR.dom.walker.bookmark(),
guard = function( node ) {
return !( node.is && node.is( 'tr' ) );
},
bookmarks = [], bookmarks = [],
current; current;
@ -54,7 +51,7 @@
* ranges into single, e.g. consequent table cells. * ranges into single, e.g. consequent table cells.
*/ */
getNextRange: function( mergeConsequent ) { getNextRange: function( mergeConsequent ) {
current = current == undefined ? 0 : current + 1; current = current === undefined ? 0 : current + 1;
var range = rangeList[ current ]; var range = rangeList[ current ];
@ -89,8 +86,9 @@
left = next; left = next;
continue; continue;
} }
} else } else {
found = 1; found = 1;
}
break; break;
} }
@ -166,7 +164,7 @@
}; };
// Update the specified range which has been mangled by previous insertion of // Update the specified range which has been mangled by previous insertion of
// range bookmark nodes.(#3256) // range bookmark nodes.(https://dev.ckeditor.com/ticket/3256)
function updateDirtyRange( bookmark, dirtyRange, checkEnd ) { function updateDirtyRange( bookmark, dirtyRange, checkEnd ) {
var serializable = bookmark.serializable, var serializable = bookmark.serializable,
container = dirtyRange[ checkEnd ? 'endContainer' : 'startContainer' ], container = dirtyRange[ checkEnd ? 'endContainer' : 'startContainer' ],

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -12,9 +12,9 @@
* Represents a DOM text node. * Represents a DOM text node.
* *
* var nativeNode = document.createTextNode( 'Example' ); * var nativeNode = document.createTextNode( 'Example' );
* var text = CKEDITOR.dom.text( nativeNode ); * var text = new CKEDITOR.dom.text( nativeNode );
* *
* var text = CKEDITOR.dom.text( 'Example' ); * var text = new CKEDITOR.dom.text( 'Example' );
* *
* @class * @class
* @extends CKEDITOR.dom.node * @extends CKEDITOR.dom.node
@ -97,20 +97,16 @@ CKEDITOR.tools.extend( CKEDITOR.dom.text.prototype, {
var doc = this.getDocument(); var doc = this.getDocument();
var retval = new CKEDITOR.dom.text( this.$.splitText( offset ), doc ); var retval = new CKEDITOR.dom.text( this.$.splitText( offset ), doc );
if ( parent.childNodes.length == count ) if ( parent.childNodes.length == count ) {
{
// If the offset is after the last char, IE creates the text node // If the offset is after the last char, IE creates the text node
// on split, but don't include it into the DOM. So, we have to do // on split, but don't include it into the DOM. So, we have to do
// that manually here. // that manually here.
if ( offset >= length ) if ( offset >= length ) {
{
retval = doc.createText( '' ); retval = doc.createText( '' );
retval.insertAfter( this ); retval.insertAfter( this );
} } else {
else
{
// IE BUG: IE8+ does not update the childNodes array in DOM after splitText(), // IE BUG: IE8+ does not update the childNodes array in DOM after splitText(),
// we need to make some DOM changes to make it update. (#3436) // we need to make some DOM changes to make it update. (https://dev.ckeditor.com/ticket/3436)
var workaround = doc.createText( '' ); var workaround = doc.createText( '' );
workaround.insertAfter( retval ); workaround.insertAfter( retval );
workaround.remove(); workaround.remove();

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
( function() { ( function() {
@ -74,8 +74,9 @@
return userGuard( node, movingOut ); return userGuard( node, movingOut );
}; };
} else } else {
guard = stopGuard; guard = stopGuard;
}
if ( this.current ) if ( this.current )
node = this.current[ getSourceNodeFn ]( false, type, guard ); node = this.current[ getSourceNodeFn ]( false, type, guard );
@ -109,8 +110,9 @@
if ( !this.evaluator || this.evaluator( node ) !== false ) { if ( !this.evaluator || this.evaluator( node ) !== false ) {
if ( !breakOnFalse ) if ( !breakOnFalse )
return node; return node;
} else if ( breakOnFalse && this.evaluator ) } else if ( breakOnFalse && this.evaluator ) {
return false; return false;
}
node = node[ getSourceNodeFn ]( false, type, guard ); node = node[ getSourceNodeFn ]( false, type, guard );
} }
@ -130,12 +132,12 @@
} }
/** /**
* Utility class to "walk" the DOM inside a range boundaries. If the * Utility class to "walk" the DOM inside range boundaries. If the
* range starts or ends in the middle of the text node this node will * range starts or ends in the middle of the text node, this node will
* be included as a whole. Outside changes to the range may break the walker. * be included as a whole. Outside changes to the range may break the walker.
* *
* The walker may return nodes that are not totaly included into the * The walker may return nodes that are not totally included in the
* range boundaires. Let's take the following range representation, * range boundaries. Let us take the following range representation,
* where the square brackets indicate the boundaries: * where the square brackets indicate the boundaries:
* *
* [<p>Some <b>sample] text</b> * [<p>Some <b>sample] text</b>
@ -144,8 +146,8 @@
* returned: `<p>`, `"Some "`, `<b>` and `"sample"`. Going * returned: `<p>`, `"Some "`, `<b>` and `"sample"`. Going
* backwards instead we have: `"sample"` and `"Some "`. So note that the * backwards instead we have: `"sample"` and `"Some "`. So note that the
* walker always returns nodes when "entering" them, but not when * walker always returns nodes when "entering" them, but not when
* "leaving" them. The guard function is instead called both when * "leaving" them. The {@link #guard} function is instead called both when
* entering and leaving nodes. * entering and when leaving nodes.
* *
* @class * @class
*/ */
@ -154,26 +156,26 @@
* Creates a walker class instance. * Creates a walker class instance.
* *
* @constructor * @constructor
* @param {CKEDITOR.dom.range} range The range within which walk. * @param {CKEDITOR.dom.range} range The range within which to walk.
*/ */
$: function( range ) { $: function( range ) {
this.range = range; this.range = range;
/** /**
* A function executed for every matched node, to check whether * A function executed for every matched node to check whether
* it's to be considered into the walk or not. If not provided, all * it is to be considered in the walk or not. If not provided, all
* matched nodes are considered good. * matched nodes are considered good.
* *
* If the function returns `false` the node is ignored. * If the function returns `false`, the node is ignored.
* *
* @property {Function} evaluator * @property {Function} evaluator
*/ */
// this.evaluator = null; // this.evaluator = null;
/** /**
* A function executed for every node the walk pass by to check * A function executed for every node the walk passes by to check
* whether the walk is to be finished. It's called when both * whether the walk is to be finished. It is called both when
* entering and exiting nodes, as well as for the matched nodes. * entering and when exiting nodes, as well as for the matched nodes.
* *
* If this function returns `false`, the walking ends and no more * If this function returns `false`, the walking ends and no more
* nodes are evaluated. * nodes are evaluated.
@ -189,7 +191,7 @@
// statics : // statics :
// { // {
// /* Creates a CKEDITOR.dom.walker instance to walk inside DOM boundaries set by nodes. // /* Creates a CKEDITOR.dom.walker instance to walk inside DOM boundaries set by nodes.
// * @param {CKEDITOR.dom.node} startNode The node from wich the walk // * @param {CKEDITOR.dom.node} startNode The node from which the walk
// * will start. // * will start.
// * @param {CKEDITOR.dom.node} [endNode] The last node to be considered // * @param {CKEDITOR.dom.node} [endNode] The last node to be considered
// * in the walk. No more nodes are retrieved after touching or // * in the walk. No more nodes are retrieved after touching or
@ -217,16 +219,16 @@
// //
proto: { proto: {
/** /**
* Stops walking. No more nodes are retrieved if this function gets called. * Stops walking. No more nodes are retrieved if this function is called.
*/ */
end: function() { end: function() {
this._.end = 1; this._.end = 1;
}, },
/** /**
* Retrieves the next node (at right). * Retrieves the next node (on the right).
* *
* @returns {CKEDITOR.dom.node} The next node or null if no more * @returns {CKEDITOR.dom.node} The next node or `null` if no more
* nodes are available. * nodes are available.
*/ */
next: function() { next: function() {
@ -234,9 +236,9 @@
}, },
/** /**
* Retrieves the previous node (at left). * Retrieves the previous node (on the left).
* *
* @returns {CKEDITOR.dom.node} The previous node or null if no more * @returns {CKEDITOR.dom.node} The previous node or `null` if no more
* nodes are available. * nodes are available.
*/ */
previous: function() { previous: function() {
@ -244,7 +246,7 @@
}, },
/** /**
* Check all nodes at right, executing the evaluation function. * Checks all nodes on the right, executing the evaluation function.
* *
* @returns {Boolean} `false` if the evaluator function returned * @returns {Boolean} `false` if the evaluator function returned
* `false` for any of the matched nodes. Otherwise `true`. * `false` for any of the matched nodes. Otherwise `true`.
@ -254,7 +256,7 @@
}, },
/** /**
* Check all nodes at left, executing the evaluation function. * Check all nodes on the left, executing the evaluation function.
* *
* @returns {Boolean} `false` if the evaluator function returned * @returns {Boolean} `false` if the evaluator function returned
* `false` for any of the matched nodes. Otherwise `true`. * `false` for any of the matched nodes. Otherwise `true`.
@ -267,7 +269,7 @@
* Executes a full walk forward (to the right), until no more nodes * Executes a full walk forward (to the right), until no more nodes
* are available, returning the last valid node. * are available, returning the last valid node.
* *
* @returns {CKEDITOR.dom.node} The last node at the right or null * @returns {CKEDITOR.dom.node} The last node on the right or `null`
* if no valid nodes are available. * if no valid nodes are available.
*/ */
lastForward: function() { lastForward: function() {
@ -278,7 +280,7 @@
* Executes a full walk backwards (to the left), until no more nodes * Executes a full walk backwards (to the left), until no more nodes
* are available, returning the last valid node. * are available, returning the last valid node.
* *
* @returns {CKEDITOR.dom.node} The last node at the left or null * @returns {CKEDITOR.dom.node} The last node on the left or `null`
* if no valid nodes are available. * if no valid nodes are available.
*/ */
lastBackward: function() { lastBackward: function() {
@ -286,7 +288,7 @@
}, },
/** /**
* Resets walker. * Resets the walker.
*/ */
reset: function() { reset: function() {
delete this.current; delete this.current;
@ -300,22 +302,24 @@
// table-row-group, table-header-group, table-footer-group, table-row, // table-row-group, table-header-group, table-footer-group, table-row,
// table-column-group, table-column, table-cell, table-caption, or whose node // table-column-group, table-column, table-cell, table-caption, or whose node
// name is hr, br (when enterMode is br only) is a block boundary. // name is hr, br (when enterMode is br only) is a block boundary.
var blockBoundaryDisplayMatch = { block: 1, 'list-item': 1, table: 1, 'table-row-group': 1, var blockBoundaryDisplayMatch = {
block: 1, 'list-item': 1, table: 1, 'table-row-group': 1,
'table-header-group': 1, 'table-footer-group': 1, 'table-row': 1, 'table-column-group': 1, 'table-header-group': 1, 'table-footer-group': 1, 'table-row': 1, 'table-column-group': 1,
'table-column': 1, 'table-cell': 1, 'table-caption': 1 }, 'table-column': 1, 'table-cell': 1, 'table-caption': 1
},
outOfFlowPositions = { absolute: 1, fixed: 1 }; outOfFlowPositions = { absolute: 1, fixed: 1 };
/** /**
* Checks whether element is displayed as a block. * Checks whether an element is displayed as a block.
* *
* @member CKEDITOR.dom.element * @member CKEDITOR.dom.element
* @param [customNodeNames] Custom list of nodes which will extend * @param [customNodeNames] Custom list of nodes which will extend
* default {@link CKEDITOR.dtd#$block} list. * the default {@link CKEDITOR.dtd#$block} list.
* @returns {Boolean} * @returns {Boolean}
*/ */
CKEDITOR.dom.element.prototype.isBlockBoundary = function( customNodeNames ) { CKEDITOR.dom.element.prototype.isBlockBoundary = function( customNodeNames ) {
// Whether element is in normal page flow. Floated or positioned elements are out of page flow. // Whether element is in normal page flow. Floated or positioned elements are out of page flow.
// Don't consider floated or positioned formatting as block boundary, fall back to dtd check in that case. (#6297) // Don't consider floated or positioned formatting as block boundary, fall back to dtd check in that case. (https://dev.ckeditor.com/ticket/6297)
var inPageFlow = this.getComputedStyle( 'float' ) == 'none' && !( this.getComputedStyle( 'position' ) in outOfFlowPositions ); var inPageFlow = this.getComputedStyle( 'float' ) == 'none' && !( this.getComputedStyle( 'position' ) in outOfFlowPositions );
if ( inPageFlow && blockBoundaryDisplayMatch[ this.getComputedStyle( 'display' ) ] ) if ( inPageFlow && blockBoundaryDisplayMatch[ this.getComputedStyle( 'display' ) ] )
@ -334,7 +338,7 @@
* @returns {Function} * @returns {Function}
*/ */
CKEDITOR.dom.walker.blockBoundary = function( customNodeNames ) { CKEDITOR.dom.walker.blockBoundary = function( customNodeNames ) {
return function( node, type ) { return function( node ) {
return !( node.type == CKEDITOR.NODE_ELEMENT && node.isBlockBoundary( customNodeNames ) ); return !( node.type == CKEDITOR.NODE_ELEMENT && node.isBlockBoundary( customNodeNames ) );
}; };
}; };
@ -348,13 +352,13 @@
}; };
/** /**
* Returns a function which checks whether the node is a bookmark node OR bookmark node * Returns a function which checks whether the node is a bookmark node or the bookmark node
* inner contents. * inner content.
* *
* @static * @static
* @param {Boolean} [contentOnly=false] Whether only test against the text content of * @param {Boolean} [contentOnly=false] Whether only test against the text content of
* bookmark node instead of the element itself (default). * a bookmark node instead of the element itself (default).
* @param {Boolean} [isReject=false] Whether should return `false` for the bookmark * @param {Boolean} [isReject=false] Whether to return `false` for the bookmark
* node instead of `true` (default). * node instead of `true` (default).
* @returns {Function} * @returns {Function}
*/ */
@ -374,7 +378,7 @@
}; };
/** /**
* Returns a function which checks whether the node is a text node containing only whitespaces characters. * Returns a function which checks whether the node is a text node containing only whitespace characters.
* *
* @static * @static
* @param {Boolean} [isReject=false] * @param {Boolean} [isReject=false]
@ -384,9 +388,9 @@
return function( node ) { return function( node ) {
var isWhitespace; var isWhitespace;
if ( node && node.type == CKEDITOR.NODE_TEXT ) { if ( node && node.type == CKEDITOR.NODE_TEXT ) {
// whitespace, as well as the text cursor filler node we used in Webkit. (#9384) // Whitespace, as well as the Filling Char Sequence text node used in Webkit. (https://dev.ckeditor.com/ticket/9384, https://dev.ckeditor.com/ticket/13816)
isWhitespace = !CKEDITOR.tools.trim( node.getText() ) || isWhitespace = !CKEDITOR.tools.trim( node.getText() ) ||
CKEDITOR.env.webkit && node.getText() == '\u200b'; CKEDITOR.env.webkit && node.getText() == CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE;
} }
return !!( isReject ^ isWhitespace ); return !!( isReject ^ isWhitespace );
@ -394,14 +398,17 @@
}; };
/** /**
* Returns a function which checks whether the node is invisible in wysiwyg mode. * Returns a function which checks whether the node is invisible in the WYSIWYG mode.
* *
* @static * @static
* @param {Boolean} [isReject=false] * @param {Boolean} [isReject=false]
* @returns {Function} * @returns {Function}
*/ */
CKEDITOR.dom.walker.invisible = function( isReject ) { CKEDITOR.dom.walker.invisible = function( isReject ) {
var whitespace = CKEDITOR.dom.walker.whitespaces(); var whitespace = CKEDITOR.dom.walker.whitespaces(),
// https://dev.ckeditor.com/ticket/12221 (Chrome) plus https://dev.ckeditor.com/ticket/11111 (Safari).
offsetWidth0 = CKEDITOR.env.webkit ? 1 : 0;
return function( node ) { return function( node ) {
var invisible; var invisible;
@ -413,11 +420,10 @@
node = node.getParent(); node = node.getParent();
// Nodes that take no spaces in wysiwyg: // Nodes that take no spaces in wysiwyg:
// 1. White-spaces but not including NBSP; // 1. White-spaces but not including NBSP.
// 2. Empty inline elements, e.g. <b></b> we're checking here // 2. Empty inline elements, e.g. <b></b>.
// 'offsetHeight' instead of 'offsetWidth' for properly excluding // 3. <br> elements (bogus, surrounded by text) (https://dev.ckeditor.com/ticket/12423).
// all sorts of empty paragraph, e.g. <br />. invisible = node.$.offsetWidth <= offsetWidth0;
invisible = !node.$.offsetHeight;
} }
return !!( isReject ^ invisible ); return !!( isReject ^ invisible );
@ -425,7 +431,7 @@
}; };
/** /**
* Returns a function which checks whether node's type is equal to passed one. * Returns a function which checks whether the node type is equal to the passed one.
* *
* @static * @static
* @param {Number} type * @param {Number} type
@ -439,8 +445,8 @@
}; };
/** /**
* Returns a function which checks whether node is a bogus (filler) node from * Returns a function which checks whether the node is a bogus (filler) node from
* contenteditable element's point of view. * `contenteditable` element's point of view.
* *
* @static * @static
* @param {Boolean} [isReject=false] * @param {Boolean} [isReject=false]
@ -466,12 +472,12 @@
}; };
/** /**
* Returns a function which checks whether node is a temporary element * Returns a function which checks whether the node is a temporary element
* (element with `data-cke-temp` attribute) or its child. * (element with the `data-cke-temp` attribute) or its child.
* *
* @since 4.3 * @since 4.3
* @static * @static
* @param {Boolean} [isReject=false] Whether should return `false` for the * @param {Boolean} [isReject=false] Whether to return `false` for the
* temporary element instead of `true` (default). * temporary element instead of `true` (default).
* @returns {Function} * @returns {Function}
*/ */
@ -497,7 +503,7 @@
}; };
/** /**
* Returns a function which checks whether node should be ignored in terms of "editability". * Returns a function which checks whether the node should be ignored in terms of "editability".
* *
* This includes: * This includes:
* *
@ -507,7 +513,7 @@
* *
* @since 4.3 * @since 4.3
* @static * @static
* @param {Boolean} [isReject=false] Whether should return `false` for the * @param {Boolean} [isReject=false] Whether to return `false` for the
* ignored element instead of `true` (default). * ignored element instead of `true` (default).
* @returns {Function} * @returns {Function}
*/ */
@ -521,17 +527,32 @@
var isIgnored = CKEDITOR.dom.walker.ignored(); var isIgnored = CKEDITOR.dom.walker.ignored();
function isEmpty( node ) { /**
* Returns a function which checks whether the node is empty.
*
* @since 4.5
* @static
* @param {Boolean} [isReject=false] Whether to return `false` for the
* ignored element instead of `true` (default).
* @returns {Function}
*/
CKEDITOR.dom.walker.empty = function( isReject ) {
return function( node ) {
var i = 0, var i = 0,
l = node.getChildCount(); l = node.getChildCount();
for ( ; i < l; ++i ) { for ( ; i < l; ++i ) {
if ( !isIgnored( node.getChild( i ) ) ) if ( !isIgnored( node.getChild( i ) ) ) {
return false; return !!isReject;
} }
return true;
} }
return !isReject;
};
};
var isEmpty = CKEDITOR.dom.walker.empty();
function filterTextContainers( dtd ) { function filterTextContainers( dtd ) {
var hash = {}, var hash = {},
name; name;
@ -543,8 +564,18 @@
return hash; return hash;
} }
// Block elements which can contain text nodes (without ul, ol, dl, etc.). /**
var dtdTextBlock = filterTextContainers( CKEDITOR.dtd.$block ); * A hash of element names which in browsers that {@link CKEDITOR.env#needsBrFiller do not need `<br>` fillers}
* can be selection containers despite being empty.
*
* @since 4.5
* @static
* @property {Object} validEmptyBlockContainers
*/
var validEmptyBlocks = CKEDITOR.dom.walker.validEmptyBlockContainers = CKEDITOR.tools.extend(
filterTextContainers( CKEDITOR.dtd.$block ),
{ caption: 1, td: 1, th: 1 }
);
function isEditable( node ) { function isEditable( node ) {
// Skip temporary elements, bookmarks and whitespaces. // Skip temporary elements, bookmarks and whitespaces.
@ -556,12 +587,14 @@
if ( node.type == CKEDITOR.NODE_ELEMENT ) { if ( node.type == CKEDITOR.NODE_ELEMENT ) {
// All inline and non-editable elements are valid editable places. // All inline and non-editable elements are valid editable places.
// Note: the <hr> is currently the only element in CKEDITOR.dtd.$empty and CKEDITOR.dtd.$block,
// but generally speaking we need an intersection of these two sets.
// Note: non-editable block has to be treated differently (should be selected entirely). // Note: non-editable block has to be treated differently (should be selected entirely).
if ( node.is( CKEDITOR.dtd.$inline ) || node.getAttribute( 'contenteditable' ) == 'false' ) if ( node.is( CKEDITOR.dtd.$inline ) || node.is( 'hr' ) || node.getAttribute( 'contenteditable' ) == 'false' )
return true; return true;
// Empty blocks are editable on IE. // Empty blocks are editable on IE.
if ( !CKEDITOR.env.needsBrFiller && node.is( dtdTextBlock ) && isEmpty( node ) ) if ( !CKEDITOR.env.needsBrFiller && node.is( validEmptyBlocks ) && isEmpty( node ) )
return true; return true;
} }
@ -570,20 +603,23 @@
} }
/** /**
* Returns a function which checks whether node can be a container or a sibling * Returns a function which checks whether the node can be a container or a sibling
* of selection end. * of the selection end.
* *
* This includes: * This includes:
* *
* * text nodes (but not whitespaces), * * text nodes (but not whitespaces),
* * inline elements, * * inline elements,
* * non-editable blocks (special case - such blocks cannot be containers nor * * intersection of {@link CKEDITOR.dtd#$empty} and {@link CKEDITOR.dtd#$block} (currently
* it is only `<hr>`),
* * non-editable blocks (special case &mdash; such blocks cannot be containers nor
* siblings, they need to be selected entirely), * siblings, they need to be selected entirely),
* * empty blocks which can contain text (IE only). * * empty {@link #validEmptyBlockContainers blocks} which can contain text
* ({@link CKEDITOR.env#needsBrFiller old IEs only}).
* *
* @since 4.3 * @since 4.3
* @static * @static
* @param {Boolean} [isReject=false] Whether should return `false` for the * @param {Boolean} [isReject=false] Whether to return `false` for the
* ignored element instead of `true` (default). * ignored element instead of `true` (default).
* @returns {Function} * @returns {Function}
*/ */
@ -594,18 +630,18 @@
}; };
/** /**
* Checks if there's a filler node at the end of an element, and returns it. * Checks if there is a filler node at the end of an element, and returns it.
* *
* @member CKEDITOR.dom.element * @member CKEDITOR.dom.element
* @returns {CKEDITOR.dom.node/Boolean} Bogus node or `false`. * @returns {CKEDITOR.dom.node/Boolean} Bogus node or `false`.
*/ */
CKEDITOR.dom.element.prototype.getBogus = function() { CKEDITOR.dom.element.prototype.getBogus = function() {
// Bogus are not always at the end, e.g. <p><a>text<br /></a></p> (#7070). // Bogus are not always at the end, e.g. <p><a>text<br /></a></p> (https://dev.ckeditor.com/ticket/7070).
var tail = this; var tail = this;
do { do {
tail = tail.getPreviousSourceNode(); tail = tail.getPreviousSourceNode();
} }
while ( toSkip( tail ) ) while ( toSkip( tail ) );
if ( tail && ( CKEDITOR.env.needsBrFiller ? tail.is && tail.is( 'br' ) : tail.getText && tailNbspRegex.test( tail.getText() ) ) ) if ( tail && ( CKEDITOR.env.needsBrFiller ? tail.is && tail.is( 'br' ) : tail.getText && tailNbspRegex.test( tail.getText() ) ) )
return tail; return tail;

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -70,15 +70,19 @@ CKEDITOR.dtd = ( function() {
var P = {}, F = {}, var P = {}, F = {},
// Intersection of flow elements set and phrasing elements set. // Intersection of flow elements set and phrasing elements set.
PF = { a: 1, abbr: 1, area: 1, audio: 1, b: 1, bdi: 1, bdo: 1, br: 1, button: 1, canvas: 1, cite: 1, PF = {
a: 1, abbr: 1, area: 1, audio: 1, b: 1, bdi: 1, bdo: 1, br: 1, button: 1, canvas: 1, cite: 1,
code: 1, command: 1, datalist: 1, del: 1, dfn: 1, em: 1, embed: 1, i: 1, iframe: 1, img: 1, code: 1, command: 1, datalist: 1, del: 1, dfn: 1, em: 1, embed: 1, i: 1, iframe: 1, img: 1,
input: 1, ins: 1, kbd: 1, keygen: 1, label: 1, map: 1, mark: 1, meter: 1, noscript: 1, object: 1, input: 1, ins: 1, kbd: 1, keygen: 1, label: 1, map: 1, mark: 1, meter: 1, noscript: 1, object: 1,
output: 1, progress: 1, q: 1, ruby: 1, s: 1, samp: 1, script: 1, select: 1, small: 1, span: 1, output: 1, progress: 1, q: 1, ruby: 1, s: 1, samp: 1, script: 1, select: 1, small: 1, span: 1,
strong: 1, sub: 1, sup: 1, textarea: 1, time: 1, u: 1, 'var': 1, video: 1, wbr: 1 }, strong: 1, sub: 1, sup: 1, textarea: 1, time: 1, u: 1, 'var': 1, video: 1, wbr: 1
},
// F - PF (Flow Only). // F - PF (Flow Only).
FO = { address: 1, article: 1, aside: 1, blockquote: 1, details: 1, div: 1, dl: 1, fieldset: 1, FO = {
address: 1, article: 1, aside: 1, blockquote: 1, details: 1, div: 1, dl: 1, fieldset: 1,
figure: 1, footer: 1, form: 1, h1: 1, h2: 1, h3: 1, h4: 1, h5: 1, h6: 1, header: 1, hgroup: 1, figure: 1, footer: 1, form: 1, h1: 1, h2: 1, h3: 1, h4: 1, h5: 1, h6: 1, header: 1, hgroup: 1,
hr: 1, menu: 1, nav: 1, ol: 1, p: 1, pre: 1, section: 1, table: 1, ul: 1 }, hr: 1, main: 1, menu: 1, nav: 1, ol: 1, p: 1, pre: 1, section: 1, table: 1, ul: 1
},
// Metadata elements. // Metadata elements.
M = { command: 1, link: 1, meta: 1, noscript: 1, script: 1, style: 1 }, M = { command: 1, link: 1, meta: 1, noscript: 1, script: 1, style: 1 },
// Empty. // Empty.
@ -101,8 +105,8 @@ CKEDITOR.dtd = ( function() {
abbr: P, abbr: P,
address: F, address: F,
area: E, area: E,
article: X( { style: 1 }, F ), article: F,
aside: X( { style: 1 }, F ), aside: F,
audio: X( { source: 1, track: 1 }, F ), audio: X( { source: 1, track: 1 }, F ),
b: P, b: P,
base: E, base: E,
@ -124,7 +128,7 @@ CKEDITOR.dtd = ( function() {
del: P, // Treat as normal inline element (not a transparent one). del: P, // Treat as normal inline element (not a transparent one).
details: X( { summary: 1 }, F ), details: X( { summary: 1 }, F ),
dfn: P, dfn: P,
div: X( { style: 1 }, F ), div: F,
dl: { dt: 1, dd: 1 }, dl: { dt: 1, dd: 1 },
dt: F, dt: F,
em: P, em: P,
@ -156,6 +160,9 @@ CKEDITOR.dtd = ( function() {
legend: P, legend: P,
li: F, li: F,
link: E, link: E,
// Can't be a descendant of article, aside, footer, header, nav, but we don't need this
// complication. As well as checking if it's used only once.
main: F,
map: F, map: F,
mark: P, // Treat as normal inline element (not a transparent one). mark: P, // Treat as normal inline element (not a transparent one).
menu: X( { li: 1 }, F ), menu: X( { li: 1 }, F ),
@ -179,7 +186,7 @@ CKEDITOR.dtd = ( function() {
s: P, s: P,
samp: P, samp: P,
script: T, script: T,
section: X( { style: 1 }, F ), section: F,
select: { optgroup: 1, option: 1 }, select: { optgroup: 1, option: 1 },
small: P, small: P,
source: E, source: E,
@ -187,7 +194,7 @@ CKEDITOR.dtd = ( function() {
strong: P, strong: P,
style: T, style: T,
sub: P, sub: P,
summary: P, summary: X( { h1: 1, h2: 1, h3: 1, h4: 1, h5: 1, h6: 1 }, P ),
sup: P, sup: P,
table: { caption: 1, colgroup: 1, thead: 1, tfoot: 1, tbody: 1, tr: 1 }, table: { caption: 1, colgroup: 1, thead: 1, tfoot: 1, tbody: 1, tr: 1 },
tbody: { tr: 1 }, tbody: { tr: 1 },
@ -239,9 +246,11 @@ CKEDITOR.dtd = ( function() {
* *
* **Note:** As an exception `<li>` is not considered as a block limit, as it's generally used as a text block. * **Note:** As an exception `<li>` is not considered as a block limit, as it's generally used as a text block.
*/ */
$blockLimit: { article: 1, aside: 1, audio: 1, body: 1, caption: 1, details: 1, dir: 1, div: 1, dl: 1, $blockLimit: {
fieldset: 1, figcaption: 1, figure: 1, footer: 1, form: 1, header: 1, hgroup: 1, menu: 1, nav: 1, article: 1, aside: 1, audio: 1, body: 1, caption: 1, details: 1, dir: 1, div: 1, dl: 1,
ol: 1, section: 1, table: 1, td: 1, th: 1, tr: 1, ul: 1, video: 1 }, fieldset: 1, figcaption: 1, figure: 1, footer: 1, form: 1, header: 1, hgroup: 1, main: 1, menu: 1, nav: 1,
ol: 1, section: 1, table: 1, td: 1, th: 1, tr: 1, ul: 1, video: 1
},
/** /**
* List of elements that contain character data. * List of elements that contain character data.
@ -251,15 +260,19 @@ CKEDITOR.dtd = ( function() {
/** /**
* List of elements that are accepted as inline editing hosts. * List of elements that are accepted as inline editing hosts.
*/ */
$editable: { address: 1, article: 1, aside: 1, blockquote: 1, body: 1, details: 1, div: 1, fieldset: 1, $editable: {
address: 1, article: 1, aside: 1, blockquote: 1, body: 1, details: 1, div: 1, fieldset: 1,
figcaption: 1, footer: 1, form: 1, h1: 1, h2: 1, h3: 1, h4: 1, h5: 1, h6: 1, header: 1, hgroup: 1, figcaption: 1, footer: 1, form: 1, h1: 1, h2: 1, h3: 1, h4: 1, h5: 1, h6: 1, header: 1, hgroup: 1,
nav: 1, p: 1, pre: 1, section: 1 }, main: 1, nav: 1, p: 1, pre: 1, section: 1
},
/** /**
* List of empty (self-closing) elements, like `<br>` or `<img>`. * List of empty (self-closing) elements, like `<br>` or `<img>`.
*/ */
$empty: { area: 1, base: 1, basefont: 1, br: 1, col: 1, command: 1, dialog: 1, embed: 1, hr: 1, img: 1, $empty: {
input: 1, isindex: 1, keygen: 1, link: 1, meta: 1, param: 1, source: 1, track: 1, wbr: 1 }, area: 1, base: 1, basefont: 1, br: 1, col: 1, command: 1, dialog: 1, embed: 1, hr: 1, img: 1,
input: 1, isindex: 1, keygen: 1, link: 1, meta: 1, param: 1, source: 1, track: 1, wbr: 1
},
/** /**
* List of inline (`<span>` like) elements. * List of inline (`<span>` like) elements.
@ -284,21 +297,27 @@ CKEDITOR.dtd = ( function() {
/** /**
* Elements that accept text nodes, but are not possible to edit into the browser. * Elements that accept text nodes, but are not possible to edit into the browser.
*/ */
$nonEditable: { applet: 1, audio: 1, button: 1, embed: 1, iframe: 1, map: 1, object: 1, option: 1, $nonEditable: {
param: 1, script: 1, textarea: 1, video: 1 }, applet: 1, audio: 1, button: 1, embed: 1, iframe: 1, map: 1, object: 1, option: 1,
param: 1, script: 1, textarea: 1, video: 1
},
/** /**
* Elements that are considered objects, therefore selected as a whole in the editor. * Elements that are considered objects, therefore selected as a whole in the editor.
*/ */
$object: { applet: 1, audio: 1, button: 1, hr: 1, iframe: 1, img: 1, input: 1, object: 1, select: 1, $object: {
table: 1, textarea: 1, video: 1 }, applet: 1, audio: 1, button: 1, hr: 1, iframe: 1, img: 1, input: 1, object: 1, select: 1,
table: 1, textarea: 1, video: 1
},
/** /**
* List of elements that can be ignored if empty, like `<b>` or `<span>`. * List of elements that can be ignored if empty, like `<b>` or `<span>`.
*/ */
$removeEmpty: { abbr: 1, acronym: 1, b: 1, bdi: 1, bdo: 1, big: 1, cite: 1, code: 1, del: 1, dfn: 1, $removeEmpty: {
abbr: 1, acronym: 1, b: 1, bdi: 1, bdo: 1, big: 1, cite: 1, code: 1, del: 1, dfn: 1,
em: 1, font: 1, i: 1, ins: 1, label: 1, kbd: 1, mark: 1, meter: 1, output: 1, q: 1, ruby: 1, s: 1, em: 1, font: 1, i: 1, ins: 1, label: 1, kbd: 1, mark: 1, meter: 1, output: 1, q: 1, ruby: 1, s: 1,
samp: 1, small: 1, span: 1, strike: 1, strong: 1, sub: 1, sup: 1, time: 1, tt: 1, u: 1, 'var': 1 }, samp: 1, small: 1, span: 1, strike: 1, strong: 1, sub: 1, sup: 1, time: 1, tt: 1, u: 1, 'var': 1
},
/** /**
* List of elements that have tabindex set to zero by default. * List of elements that have tabindex set to zero by default.
@ -318,8 +337,10 @@ CKEDITOR.dtd = ( function() {
/** /**
* List of elements that are not to exist standalone that must live under it's parent element. * List of elements that are not to exist standalone that must live under it's parent element.
*/ */
$intermediate: { caption: 1, colgroup: 1, dd: 1, dt: 1, figcaption: 1, legend: 1, li: 1, optgroup: 1, $intermediate: {
option: 1, rp: 1, rt: 1, summary: 1, tbody: 1, td: 1, tfoot: 1, th: 1, thead: 1, tr: 1 } caption: 1, colgroup: 1, dd: 1, dt: 1, figcaption: 1, legend: 1, li: 1, optgroup: 1,
option: 1, rp: 1, rt: 1, summary: 1, tbody: 1, td: 1, tfoot: 1, th: 1, thead: 1, tr: 1
}
} ); } );
return dtd; return dtd;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
if ( !CKEDITOR.editor ) { if ( !CKEDITOR.editor ) {

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -16,8 +16,10 @@ if ( !CKEDITOR.env ) {
* @singleton * @singleton
*/ */
CKEDITOR.env = ( function() { CKEDITOR.env = ( function() {
var agent = navigator.userAgent.toLowerCase(); var agent = navigator.userAgent.toLowerCase(),
var opera = window.opera; edge = agent.match( /edge[ \/](\d+.?\d*)/ ),
trident = agent.indexOf( 'trident/' ) > -1,
ie = !!( edge || trident );
var env = { var env = {
/** /**
@ -26,29 +28,36 @@ if ( !CKEDITOR.env ) {
* if ( CKEDITOR.env.ie ) * if ( CKEDITOR.env.ie )
* alert( 'I\'m running in IE!' ); * alert( 'I\'m running in IE!' );
* *
* @property {Boolean} * **Note:** This property is also set to `true` if CKEditor is running
*/ * in {@link #edge Microsoft Edge}.
ie: ( agent.indexOf( 'trident/' ) > -1 ),
/**
* Indicates that CKEditor is running in Opera.
*
* if ( CKEDITOR.env.opera )
* alert( 'I\'m running in Opera!' );
* *
* @property {Boolean} * @property {Boolean}
*/ */
opera: ( !!opera && opera.version ), ie: ie,
/** /**
* Indicates that CKEditor is running in a WebKit-based browser, like Safari. * Indicates that CKEditor is running in Microsoft Edge.
*
* if ( CKEDITOR.env.edge )
* alert( 'I\'m running in Edge!' );
*
* See also {@link #ie}.
*
* @since 4.5
* @property {Boolean}
*/
edge: !!edge,
/**
* Indicates that CKEditor is running in a WebKit-based browser, like Safari,
* or Blink-based browser, like Chrome.
* *
* if ( CKEDITOR.env.webkit ) * if ( CKEDITOR.env.webkit )
* alert( 'I\'m running in a WebKit browser!' ); * alert( 'I\'m running in a WebKit browser!' );
* *
* @property {Boolean} * @property {Boolean}
*/ */
webkit: ( agent.indexOf( ' applewebkit/' ) > -1 ), webkit: !ie && ( agent.indexOf( ' applewebkit/' ) > -1 ),
/** /**
* Indicates that CKEditor is running in Adobe AIR. * Indicates that CKEditor is running in Adobe AIR.
@ -95,6 +104,7 @@ if ( !CKEDITOR.env ) {
* if ( CKEDITOR.env.mobile ) * if ( CKEDITOR.env.mobile )
* alert( 'I\'m running with CKEditor today!' ); * alert( 'I\'m running with CKEditor today!' );
* *
* @deprecated
* @property {Boolean} * @property {Boolean}
*/ */
mobile: ( agent.indexOf( 'mobile' ) > -1 ), mobile: ( agent.indexOf( 'mobile' ) > -1 ),
@ -126,7 +136,7 @@ if ( !CKEDITOR.env ) {
var domain = document.domain, var domain = document.domain,
hostname = window.location.hostname; hostname = window.location.hostname;
return domain != hostname && domain != ( '[' + hostname + ']' ); // IPv6 IP support (#5434) return domain != hostname && domain != ( '[' + hostname + ']' ); // IPv6 IP support (https://dev.ckeditor.com/ticket/5434)
}, },
/** /**
@ -149,10 +159,10 @@ if ( !CKEDITOR.env ) {
* *
* @property {Boolean} * @property {Boolean}
*/ */
env.gecko = ( navigator.product == 'Gecko' && !env.webkit && !env.opera && !env.ie ); env.gecko = ( navigator.product == 'Gecko' && !env.webkit && !env.ie );
/** /**
* Indicates that CKEditor is running in Chrome. * Indicates that CKEditor is running in a Blink-based browser like Chrome.
* *
* if ( CKEDITOR.env.chrome ) * if ( CKEDITOR.env.chrome )
* alert( 'I\'m running in Chrome!' ); * alert( 'I\'m running in Chrome!' );
@ -180,10 +190,13 @@ if ( !CKEDITOR.env ) {
// Internet Explorer 6.0+ // Internet Explorer 6.0+
if ( env.ie ) { if ( env.ie ) {
// We use env.version for feature detection, so set it properly. // We use env.version for feature detection, so set it properly.
if ( env.quirks || !document.documentMode ) if ( edge ) {
version = parseFloat( edge[ 1 ] );
} else if ( env.quirks || !document.documentMode ) {
version = parseFloat( agent.match( /msie (\d+)/ )[ 1 ] ); version = parseFloat( agent.match( /msie (\d+)/ )[ 1 ] );
else } else {
version = document.documentMode; version = document.documentMode;
}
// Deprecated features available just for backwards compatibility. // Deprecated features available just for backwards compatibility.
env.ie9Compat = version == 9; env.ie9Compat = version == 9;
@ -233,10 +246,6 @@ if ( !CKEDITOR.env ) {
} }
} }
// Opera 9.50+
if ( env.opera )
version = parseFloat( opera.version() );
// Adobe AIR 1.0+ // Adobe AIR 1.0+
// Checked before Safari because AIR have the WebKit rich text editor // Checked before Safari because AIR have the WebKit rich text editor
// features from Safari 3.0.4, but the version reported is 420. // features from Safari 3.0.4, but the version reported is 420.
@ -267,24 +276,28 @@ if ( !CKEDITOR.env ) {
env.version = version; env.version = version;
/** /**
* Indicates that CKEditor is running in a compatible browser. * Since CKEditor 4.5 this property is a blacklist of browsers incompatible with CKEditor. It means that it is
* set to `false` only in browsers that are known to be incompatible. Before CKEditor 4.5 this
* property was a whitelist of browsers that were known to be compatible with CKEditor.
*
* The reason for this change is the rising fragmentation of the browser market (especially the mobile segment).
* It became too complicated to check in which new environments CKEditor is going to work.
*
* In order to enable CKEditor 4.4.x and below in unsupported environments see the
* [Enabling CKEditor in Unsupported Environments](#!/guide/dev_unsupported_environments) article.
* *
* if ( CKEDITOR.env.isCompatible ) * if ( CKEDITOR.env.isCompatible )
* alert( 'Your browser is pretty cool!' ); * alert( 'Your browser is not known to be incompatible with CKEditor!' );
* *
* @property {Boolean} * @property {Boolean}
*/ */
env.isCompatible = env.isCompatible =
// White list of mobile devices that CKEditor supports. // IE 7+ (IE 7 is not supported, but IE Compat Mode is and it is recognized as IE7).
env.iOS && version >= 534 || !( env.ie && version < 7 ) &&
!env.mobile && ( // Firefox 4.0+.
( env.ie && version > 6 ) || !( env.gecko && version < 40000 ) &&
( env.gecko && version >= 10801 ) || // Chrome 6+, Safari 5.1+, iOS 5+.
( env.opera && version >= 9.5 ) || !( env.webkit && version < 534 );
( env.air && version >= 1 ) ||
( env.webkit && version >= 522 ) ||
false
);
/** /**
* Indicates that CKEditor is running in the HiDPI environment. * Indicates that CKEditor is running in the HiDPI environment.
@ -323,24 +336,13 @@ if ( !CKEDITOR.env ) {
* *
* @property {String} * @property {String}
*/ */
env.cssClass = 'cke_browser_' + ( env.ie ? 'ie' : env.gecko ? 'gecko' : env.opera ? 'opera' : env.webkit ? 'webkit' : 'unknown' ); env.cssClass = 'cke_browser_' + ( env.ie ? 'ie' : env.gecko ? 'gecko' : env.webkit ? 'webkit' : 'unknown' );
if ( env.quirks ) if ( env.quirks )
env.cssClass += ' cke_browser_quirks'; env.cssClass += ' cke_browser_quirks';
if ( env.ie ) { if ( env.ie )
env.cssClass += ' cke_browser_ie' + ( env.quirks || env.version < 7 ? '6' : env.version ); env.cssClass += ' cke_browser_ie' + ( env.quirks ? '6 cke_browser_iequirks' : env.version );
if ( env.quirks )
env.cssClass += ' cke_browser_iequirks';
}
if ( env.gecko ) {
if ( version < 10900 )
env.cssClass += ' cke_browser_gecko18';
else if ( version <= 11000 )
env.cssClass += ' cke_browser_gecko19';
}
if ( env.air ) if ( env.air )
env.cssClass += ' cke_browser_air'; env.cssClass += ' cke_browser_air';

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -10,7 +10,7 @@
if ( !CKEDITOR.event ) { if ( !CKEDITOR.event ) {
/** /**
* Creates an event class instance. This constructor is rearely used, being * Creates an event class instance. This constructor is rarely used, being
* the {@link #implementOn} function used in class prototypes directly * the {@link #implementOn} function used in class prototypes directly
* instead. * instead.
* *
@ -44,7 +44,7 @@ if ( !CKEDITOR.event ) {
var eventProto = CKEDITOR.event.prototype; var eventProto = CKEDITOR.event.prototype;
for ( var prop in eventProto ) { for ( var prop in eventProto ) {
if ( targetObject[ prop ] == undefined ) if ( targetObject[ prop ] == null )
targetObject[ prop ] = eventProto[ prop ]; targetObject[ prop ] = eventProto[ prop ];
} }
}; };
@ -194,14 +194,15 @@ if ( !CKEDITOR.event ) {
* @see CKEDITOR.event#on * @see CKEDITOR.event#on
*/ */
once: function() { once: function() {
var fn = arguments[ 1 ]; var args = Array.prototype.slice.call( arguments ),
fn = args[ 1 ];
arguments[ 1 ] = function( evt ) { args[ 1 ] = function( evt ) {
evt.removeListener(); evt.removeListener();
return fn.apply( this, arguments ); return fn.apply( this, arguments );
}; };
return this.on.apply( this, arguments ); return this.on.apply( this, args );
}, },
/** /**
@ -285,8 +286,9 @@ if ( !CKEDITOR.event ) {
try { try {
retData = listeners[ i ].call( this, editor, data, stopEvent, cancelEvent ); retData = listeners[ i ].call( this, editor, data, stopEvent, cancelEvent );
} catch ( er ) {} } catch ( er ) {}
} else } else {
retData = listeners[ i ].call( this, editor, data, stopEvent, cancelEvent ); retData = listeners[ i ].call( this, editor, data, stopEvent, cancelEvent );
}
if ( retData === false ) if ( retData === false )
canceled = 1; canceled = 1;

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -84,7 +84,7 @@
* someObject.on( 'someEvent', function( event ) { * someObject.on( 'someEvent', function( event ) {
* // This one will not be called. * // This one will not be called.
* } ); * } );
* alert( someObject.fire( 'someEvent' ) ); // false * alert( someObject.fire( 'someEvent' ) ); // true
* *
* @method stop * @method stop
*/ */
@ -98,7 +98,7 @@
* someObject.on( 'someEvent', function( event ) { * someObject.on( 'someEvent', function( event ) {
* // This one will not be called. * // This one will not be called.
* } ); * } );
* alert( someObject.fire( 'someEvent' ) ); // true * alert( someObject.fire( 'someEvent' ) ); // false
* *
* @method cancel * @method cancel
*/ */

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +1,17 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
* @fileOverview Defines the {@link CKEDITOR.focusManager} class, which is used * @fileOverview Defines the {@link CKEDITOR.focusManager} class, which is used
* to handle the focus on editor instances.. * to handle the focus in editor instances.
*/ */
( function() { ( function() {
/** /**
* Manages the focus activity in an editor instance. This class is to be * Manages the focus activity in an editor instance. This class is to be
* used mainly by UI elements coders when adding interface elements that need * used mainly by UI element coders when adding interface elements that need
* to set the focus state of the editor. * to set the focus state of the editor.
* *
* var focusManager = new CKEDITOR.focusManager( editor ); * var focusManager = new CKEDITOR.focusManager( editor );
@ -33,14 +33,14 @@
this.hasFocus = false; this.hasFocus = false;
/** /**
* Indicate the currently focused DOM element that makes the editor activated. * Indicates the currently focused DOM element that makes the editor activated.
* *
* @property {CKEDITOR.dom.domObject} * @property {CKEDITOR.dom.domObject}
*/ */
this.currentActive = null; this.currentActive = null;
/** /**
* Object used to hold private stuff. * Object used to store private stuff.
* *
* @private * @private
*/ */
@ -55,7 +55,7 @@
SLOT_NAME_LISTENERS = 'focusmanager_handlers'; SLOT_NAME_LISTENERS = 'focusmanager_handlers';
/** /**
* Object used to hold private stuff. * Object used to store private stuff.
* *
* @private * @private
* @class * @class
@ -63,7 +63,7 @@
*/ */
CKEDITOR.focusManager._ = { CKEDITOR.focusManager._ = {
/** /**
* The delay (in milliseconds) to deactivate the editor when UI dom element has lost focus. * The delay (in milliseconds) to deactivate the editor when a UI DOM element has lost focus.
* *
* @private * @private
* @property {Number} [blurDelay=200] * @property {Number} [blurDelay=200]
@ -75,19 +75,19 @@
CKEDITOR.focusManager.prototype = { CKEDITOR.focusManager.prototype = {
/** /**
* Indicate this editor instance is activated (due to DOM focus change), * Indicates that this editor instance is activated (due to a DOM focus change).
* the `activated` state is a symbolic indicator of an active user * The `activated` state is a symbolic indicator of an active user
* interaction session. * interaction session.
* *
* **Note:** This method will not introduce UI focus * **Note:** This method will not introduce UI focus
* impact on DOM, it's here to record editor UI focus state internally. * impact on DOM, it is here to record the editor UI focus state internally.
* If you want to make the cursor blink inside of the editable, use * If you want to make the cursor blink inside the editable, use
* {@link CKEDITOR.editor#method-focus} instead. * {@link CKEDITOR.editor#method-focus} instead.
* *
* var editor = CKEDITOR.instances.editor1; * var editor = CKEDITOR.instances.editor1;
* editor.focusManage.focus( editor.editable() ); * editor.focusManager.focus( editor.editable() );
* *
* @param {CKEDITOR.dom.element} [currentActive] The new value of {@link #currentActive} property. * @param {CKEDITOR.dom.element} [currentActive] The new value of the {@link #currentActive} property.
* @member CKEDITOR.focusManager * @member CKEDITOR.focusManager
*/ */
focus: function( currentActive ) { focus: function( currentActive ) {
@ -115,7 +115,7 @@
}, },
/** /**
* Prevent from changing the focus manager state until next {@link #unlock} is called. * Prevents from changing the focus manager state until the next {@link #unlock} is called.
* *
* @member CKEDITOR.focusManager * @member CKEDITOR.focusManager
*/ */
@ -124,7 +124,7 @@
}, },
/** /**
* Restore the automatic focus management, if {@link #lock} is called. * Restores the automatic focus management if {@link #lock} is called.
* *
* @member CKEDITOR.focusManager * @member CKEDITOR.focusManager
*/ */
@ -136,19 +136,20 @@
* Used to indicate that the editor instance has been deactivated by the specified * Used to indicate that the editor instance has been deactivated by the specified
* element which has just lost focus. * element which has just lost focus.
* *
* **Note:** that this functions acts asynchronously with a delay of 100ms to * **Note:** This function acts asynchronously with a delay of 100ms to
* avoid temporary deactivation. Use instead the `noDelay` parameter * avoid temporary deactivation. Use the `noDelay` parameter instead
* to deactivate immediately. * to deactivate immediately.
* *
* var editor = CKEDITOR.instances.editor1; * var editor = CKEDITOR.instances.editor1;
* editor.focusManager.blur(); * editor.focusManager.blur();
* *
* @param {Boolean} [noDelay=false] Deactivate immediately the editor instance synchronously. * @param {Boolean} [noDelay=false] Immediately deactivate the editor instance synchronously.
* @member CKEDITOR.focusManager * @member CKEDITOR.focusManager
*/ */
blur: function( noDelay ) { blur: function( noDelay ) {
if ( this._.locked ) if ( this._.locked ) {
return; return;
}
function doBlur() { function doBlur() {
if ( this.hasFocus ) { if ( this.hasFocus ) {
@ -160,13 +161,14 @@
} }
} }
if ( this._.timer ) if ( this._.timer ) {
clearTimeout( this._.timer ); clearTimeout( this._.timer );
}
var delay = CKEDITOR.focusManager._.blurDelay; var delay = CKEDITOR.focusManager._.blurDelay;
if ( noDelay || !delay ) if ( noDelay || !delay ) {
doBlur.call( this ); doBlur.call( this );
else { } else {
this._.timer = CKEDITOR.tools.setTimeout( function() { this._.timer = CKEDITOR.tools.setTimeout( function() {
delete this._.timer; delete this._.timer;
doBlur.call( this ); doBlur.call( this );
@ -175,11 +177,12 @@
}, },
/** /**
* Register an UI DOM element to the focus manager, which will make the focus manager "hasFocus" * Registers a UI DOM element to the focus manager, which will make the focus manager "hasFocus"
* once input focus is relieved on the element, it's to be used by plugins to expand the jurisdiction of the editor focus. * once the input focus is relieved on the element.
* This method is designed to be used by plugins to expand the jurisdiction of the editor focus.
* *
* @param {CKEDITOR.dom.element} element The container (top most) element of one UI part. * @param {CKEDITOR.dom.element} element The container (topmost) element of one UI part.
* @param {Boolean} isCapture If specified {@link CKEDITOR.event#useCapture} will be used when listening to the focus event. * @param {Boolean} isCapture If specified, {@link CKEDITOR.event#useCapture} will be used when listening to the focus event.
* @member CKEDITOR.focusManager * @member CKEDITOR.focusManager
*/ */
add: function( element, isCapture ) { add: function( element, isCapture ) {
@ -199,9 +202,10 @@
if ( CKEDITOR.env.ie ) { if ( CKEDITOR.env.ie ) {
focusEvent = 'focusin'; focusEvent = 'focusin';
blurEvent = 'focusout'; blurEvent = 'focusout';
} else } else {
CKEDITOR.event.useCapture = 1; CKEDITOR.event.useCapture = 1;
} }
}
var listeners = { var listeners = {
blur: function() { blur: function() {
@ -225,9 +229,9 @@
}, },
/** /**
* Dismiss an element from the the focus manager delegations added by {@link #add}. * Dismisses an element from the focus manager delegations added by {@link #add}.
* *
* @param {CKEDITOR.dom.element} element The element to be removed from the focusmanager. * @param {CKEDITOR.dom.element} element The element to be removed from the focus manager.
* @member CKEDITOR.focusManager * @member CKEDITOR.focusManager
*/ */
remove: function( element ) { remove: function( element ) {
@ -257,9 +261,9 @@
* Fired when the editor instance loses the input focus. * Fired when the editor instance loses the input focus.
* *
* **Note:** This event will **NOT** be triggered when focus is moved internally, e.g. from * **Note:** This event will **NOT** be triggered when focus is moved internally, e.g. from
* the editable to other part of the editor UI like dialog. * an editable to another part of the editor UI like a dialog window.
* If you're interested on only the editable focus state listen to the {@link CKEDITOR.editable#event-focus} * If you are interested only in the focus state of the editable, listen to the `focus`
* and {@link CKEDITOR.editable#blur} events instead. * and `blur` events of the {@link CKEDITOR.editable} instead.
* *
* editor.on( 'blur', function( e ) { * editor.on( 'blur', function( e ) {
* alert( 'The editor named ' + e.editor.name + ' lost the focus' ); * alert( 'The editor named ' + e.editor.name + ' lost the focus' );

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
( function() { ( function() {
@ -49,13 +49,14 @@
editor.on( 'toHtml', function( evt ) { editor.on( 'toHtml', function( evt ) {
var evtData = evt.data, var evtData = evt.data,
data = evtData.dataValue; data = evtData.dataValue,
fixBodyTag;
// The source data is already HTML, but we need to clean // The source data is already HTML, but we need to clean
// it up and apply the filter. // it up and apply the filter.
data = protectSource( data, editor ); data = protectSource( data, editor );
// Protect content of textareas. (#9995) // Protect content of textareas. (https://dev.ckeditor.com/ticket/9995)
// Do this before protecting attributes to avoid breaking: // Do this before protecting attributes to avoid breaking:
// <textarea><img src="..." /></textarea> // <textarea><img src="..." /></textarea>
data = protectElements( data, protectTextareaRegex ); data = protectElements( data, protectTextareaRegex );
@ -66,23 +67,23 @@
data = protectAttributes( data ); data = protectAttributes( data );
// Protect elements than can't be set inside a DIV. E.g. IE removes // Protect elements than can't be set inside a DIV. E.g. IE removes
// style tags from innerHTML. (#3710) // style tags from innerHTML. (https://dev.ckeditor.com/ticket/3710)
data = protectElements( data, protectElementsRegex ); data = protectElements( data, protectElementsRegex );
// Certain elements has problem to go through DOM operation, protect // Certain elements has problem to go through DOM operation, protect
// them by prefixing 'cke' namespace. (#3591) // them by prefixing 'cke' namespace. (https://dev.ckeditor.com/ticket/3591)
data = protectElementsNames( data ); data = protectElementsNames( data );
// All none-IE browsers ignore self-closed custom elements, // All none-IE browsers ignore self-closed custom elements,
// protecting them into open-close. (#3591) // protecting them into open-close. (https://dev.ckeditor.com/ticket/3591)
data = protectSelfClosingElements( data ); data = protectSelfClosingElements( data );
// Compensate one leading line break after <pre> open as browsers // Compensate one leading line break after <pre> open as browsers
// eat it up. (#5789) // eat it up. (https://dev.ckeditor.com/ticket/5789)
data = protectPreFormatted( data ); data = protectPreFormatted( data );
// There are attributes which may execute JavaScript code inside fixBin. // There are attributes which may execute JavaScript code inside fixBin.
// Encode them greedily. They will be unprotected right after getting HTML from fixBin. (#10) // Encode them greedily. They will be unprotected right after getting HTML from fixBin. (https://dev.ckeditor.com/ticket/10)
data = protectInsecureAttributes( data ); data = protectInsecureAttributes( data );
var fixBin = evtData.context || editor.editable().getName(), var fixBin = evtData.context || editor.editable().getName(),
@ -98,7 +99,7 @@
// Call the browser to help us fixing a possibly invalid HTML // Call the browser to help us fixing a possibly invalid HTML
// structure. // structure.
var el = editor.document.createElement( fixBin ); var el = editor.document.createElement( fixBin );
// Add fake character to workaround IE comments bug. (#3801) // Add fake character to workaround IE comments bug. (https://dev.ckeditor.com/ticket/3801)
el.setHtml( 'a' + data ); el.setHtml( 'a' + data );
data = el.getHtml().substr( 1 ); data = el.getHtml().substr( 1 );
@ -116,10 +117,23 @@
// can be properly filtered. // can be properly filtered.
data = unprotectRealComments( data ); data = unprotectRealComments( data );
if ( evtData.fixForBody === false ) {
fixBodyTag = false;
} else {
fixBodyTag = getFixBodyTag( evtData.enterMode, editor.config.autoParagraph );
}
// Now use our parser to make further fixes to the structure, as // Now use our parser to make further fixes to the structure, as
// well as apply the filter. // well as apply the filter.
evtData.dataValue = CKEDITOR.htmlParser.fragment.fromHtml( data = CKEDITOR.htmlParser.fragment.fromHtml( data, evtData.context, fixBodyTag );
data, evtData.context, evtData.fixForBody === false ? false : getFixBodyTag( evtData.enterMode, editor.config.autoParagraph ) );
// The empty root element needs to be fixed by adding 'p' or 'div' into it.
// This avoids the need to create that element on the first focus (https://dev.ckeditor.com/ticket/12630).
if ( fixBodyTag ) {
fixEmptyRoot( data, fixBodyTag );
}
evtData.dataValue = data;
}, null, null, 5 ); }, null, null, 5 );
// Filter incoming "data". // Filter incoming "data".
@ -149,7 +163,7 @@
editor.on( 'toDataFormat', function( evt ) { editor.on( 'toDataFormat', function( evt ) {
var data = evt.data.dataValue; var data = evt.data.dataValue;
// #10854 - we need to strip leading blockless <br> which FF adds // https://dev.ckeditor.com/ticket/10854 - we need to strip leading blockless <br> which FF adds
// automatically when editable contains only non-editable content. // automatically when editable contains only non-editable content.
// We do that for every browser (so it's a constant behavior) and // We do that for every browser (so it's a constant behavior) and
// not in BR mode, in which chance of valid leading blockless <br> is higher. // not in BR mode, in which chance of valid leading blockless <br> is higher.
@ -178,7 +192,7 @@
data.writeChildrenHtml( writer ); data.writeChildrenHtml( writer );
data = writer.getHtml( true ); data = writer.getHtml( true );
// Restore those non-HTML protected source. (#4475,#4880) // Restore those non-HTML protected source. (https://dev.ckeditor.com/ticket/4475,https://dev.ckeditor.com/ticket/4880)
data = unprotectRealComments( data ); data = unprotectRealComments( data );
data = unprotectSource( data, editor ); data = unprotectSource( data, editor );
@ -188,7 +202,7 @@
CKEDITOR.htmlDataProcessor.prototype = { CKEDITOR.htmlDataProcessor.prototype = {
/** /**
* Processes the input (potentially malformed) HTML to a purified form which * Processes the (potentially malformed) input HTML to a purified form which
* is suitable for using in the WYSIWYG editable. * is suitable for using in the WYSIWYG editable.
* *
* This method fires the {@link CKEDITOR.editor#toHtml} event which makes it possible * This method fires the {@link CKEDITOR.editor#toHtml} event which makes it possible
@ -201,20 +215,22 @@
* @param {String} data The raw data. * @param {String} data The raw data.
* @param {Object} [options] The options object. * @param {Object} [options] The options object.
* @param {String} [options.context] The tag name of a context element within which * @param {String} [options.context] The tag name of a context element within which
* the input is to be processed, default to be the editable element. * the input is to be processed, defaults to the editable element.
* If `null` is passed, then data will be parsed without context (as children of {@link CKEDITOR.htmlParser.fragment}). * If `null` is passed, then data will be parsed without context (as children of {@link CKEDITOR.htmlParser.fragment}).
* See {@link CKEDITOR.htmlParser.fragment#fromHtml} for more details. * See {@link CKEDITOR.htmlParser.fragment#fromHtml} for more details.
* @param {Boolean} [options.fixForBody=true] Whether to trigger the auto paragraph for non-block contents. * @param {Boolean} [options.fixForBody=true] Whether to trigger the auto paragraph for non-block content.
* @param {CKEDITOR.filter} [options.filter] When specified, instead of using the {@link CKEDITOR.editor#filter main filter}, * @param {CKEDITOR.filter} [options.filter] When specified, instead of using the {@link CKEDITOR.editor#filter main filter},
* passed instance will be used to filter the content. * the passed instance will be used to filter the content.
* @param {Boolean} [options.dontFilter] Do not filter data with {@link CKEDITOR.filter} (note: transformations * @param {Boolean} [options.dontFilter] Do not filter data with {@link CKEDITOR.filter} (note: transformations
* will be still applied). * will still be applied).
* @param {Number} [options.enterMode] When specified it will be used instead of the {@link CKEDITOR.editor#enterMode main enterMode}. * @param {Number} [options.enterMode] When specified, it will be used instead of the {@link CKEDITOR.editor#enterMode main enterMode}.
* @param {Boolean} [options.protectedWhitespaces] Indicates that content was wrapped with `<span>` elements to preserve
* leading and trailing whitespaces. Option used by the {@link CKEDITOR.editor#method-insertHtml} method.
* @returns {String} * @returns {String}
*/ */
toHtml: function( data, options, fixForBody, dontFilter ) { toHtml: function( data, options, fixForBody, dontFilter ) {
var editor = this.editor, var editor = this.editor,
context, filter, enterMode; context, filter, enterMode, protectedWhitespaces;
// Typeof null == 'object', so check truthiness of options too. // Typeof null == 'object', so check truthiness of options too.
if ( options && typeof options == 'object' ) { if ( options && typeof options == 'object' ) {
@ -223,10 +239,12 @@
dontFilter = options.dontFilter; dontFilter = options.dontFilter;
filter = options.filter; filter = options.filter;
enterMode = options.enterMode; enterMode = options.enterMode;
protectedWhitespaces = options.protectedWhitespaces;
} }
// Backward compatibility. Since CKEDITOR 4.3 every option was a separate argument. // Backward compatibility. Since CKEDITOR 4.3 every option was a separate argument.
else else {
context = options; context = options;
}
// Fall back to the editable as context if not specified. // Fall back to the editable as context if not specified.
if ( !context && context !== null ) if ( !context && context !== null )
@ -238,7 +256,8 @@
fixForBody: fixForBody, fixForBody: fixForBody,
dontFilter: dontFilter, dontFilter: dontFilter,
filter: filter || editor.filter, filter: filter || editor.filter,
enterMode: enterMode || editor.enterMode enterMode: enterMode || editor.enterMode,
protectedWhitespaces: protectedWhitespaces
} ).dataValue; } ).dataValue;
}, },
@ -246,15 +265,15 @@
* See {@link CKEDITOR.dataProcessor#toDataFormat}. * See {@link CKEDITOR.dataProcessor#toDataFormat}.
* *
* This method fires the {@link CKEDITOR.editor#toDataFormat} event which makes it possible * This method fires the {@link CKEDITOR.editor#toDataFormat} event which makes it possible
* to hook into the process at various steps. * to hook into the process at various stages.
* *
* @param {String} html * @param {String} html
* @param {Object} [options] The options object. * @param {Object} [options] The options object.
* @param {String} [options.context] The tag name of a context element within which * @param {String} [options.context] The tag name of the context element within which
* the input is to be processed, default to be the editable element. * the input is to be processed, defaults to the editable element.
* @param {CKEDITOR.filter} [options.filter] When specified, instead of using the {@link CKEDITOR.editor#filter main filter}, * @param {CKEDITOR.filter} [options.filter] When specified, instead of using the {@link CKEDITOR.editor#filter main filter},
* passed instance will be used to apply content transformations to the content. * the passed instance will be used to apply content transformations to the content.
* @param {Number} [options.enterMode] When specified it will be used instead of the {@link CKEDITOR.editor#enterMode main enterMode}. * @param {Number} [options.enterMode] When specified, it will be used instead of the {@link CKEDITOR.editor#enterMode main enterMode}.
* @returns {String} * @returns {String}
*/ */
toDataFormat: function( html, options ) { toDataFormat: function( html, options ) {
@ -307,18 +326,17 @@
function blockFilter( isOutput, fillEmptyBlock ) { function blockFilter( isOutput, fillEmptyBlock ) {
return function( block ) { return function( block ) {
// DO NOT apply the filler if it's a fragment node.
// DO NOT apply the filer if it's a fragment node.
if ( block.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT ) if ( block.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT )
return; return;
cleanBogus( block ); cleanBogus( block );
// [Opera] it's mandatory for the filler to present inside of empty block when in WYSIWYG. // Add fillers to input (always) and to output (if fillEmptyBlock is ok with that).
if ( ( ( CKEDITOR.env.opera && !isOutput ) || var shouldFillBlock = !isOutput ||
( typeof fillEmptyBlock == 'function' ? fillEmptyBlock( block ) !== false : fillEmptyBlock ) ) && ( typeof fillEmptyBlock == 'function' ? fillEmptyBlock( block ) : fillEmptyBlock ) !== false;
isEmptyBlockNeedFiller( block ) )
{ if ( shouldFillBlock && isEmptyBlockNeedFiller( block ) ) {
block.add( createFiller( isOutput ) ); block.add( createFiller( isOutput ) );
} }
}; };
@ -327,15 +345,13 @@
// Append a filler right after the last line-break BR, found at the end of block. // Append a filler right after the last line-break BR, found at the end of block.
function brFilter( isOutput ) { function brFilter( isOutput ) {
return function( br ) { return function( br ) {
// DO NOT apply the filer if parent's a fragment node. // DO NOT apply the filer if parent's a fragment node.
if ( br.parent.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT ) if ( br.parent.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT )
return; return;
var attrs = br.attributes; var attrs = br.attributes;
// Dismiss BRs that are either bogus or eol marker. // Dismiss BRs that are either bogus or eol marker.
if ( 'data-cke-bogus' in attrs || if ( 'data-cke-bogus' in attrs || 'data-cke-eol' in attrs ) {
'data-cke-eol' in attrs ) {
delete attrs [ 'data-cke-bogus' ]; delete attrs [ 'data-cke-bogus' ];
return; return;
} }
@ -356,14 +372,14 @@
// BR that's not from IE<11 DOM, except for a EOL marker. // BR that's not from IE<11 DOM, except for a EOL marker.
if ( !( isOutput && !CKEDITOR.env.needsBrFiller ) && if ( !( isOutput && !CKEDITOR.env.needsBrFiller ) &&
node.type == CKEDITOR.NODE_ELEMENT && node.name == 'br' && node.type == CKEDITOR.NODE_ELEMENT && node.name == 'br' &&
!node.attributes[ 'data-cke-eol' ] ) !node.attributes[ 'data-cke-eol' ] ) {
return true; return true;
}
var match; var match;
// NBSP, possibly. // NBSP, possibly.
if ( node.type == CKEDITOR.NODE_TEXT && if ( node.type == CKEDITOR.NODE_TEXT && ( match = node.value.match( tailNbspRegex ) ) ) {
( match = node.value.match( tailNbspRegex ) ) )
{
// We need to separate tail NBSP out of a text node, for later removal. // We need to separate tail NBSP out of a text node, for later removal.
if ( match.index ) { if ( match.index ) {
( new CKEDITOR.htmlParser.text( node.value.substring( 0, match.index ) ) ).insertBefore( node ); ( new CKEDITOR.htmlParser.text( node.value.substring( 0, match.index ) ) ).insertBefore( node );
@ -395,19 +411,15 @@
function cleanBogus( block ) { function cleanBogus( block ) {
var bogus = []; var bogus = [];
var last = getLast( block ), node, previous; var last = getLast( block ), node, previous;
if ( last ) {
if ( last ) {
// Check for bogus at the end of this block. // Check for bogus at the end of this block.
// e.g. <p>foo<br /></p> // e.g. <p>foo<br /></p>
maybeBogus( last, 1 ) && bogus.push( last ); maybeBogus( last, 1 ) && bogus.push( last );
while ( last ) { while ( last ) {
// Check for bogus at the end of any pseudo block contained. // Check for bogus at the end of any pseudo block contained.
if ( isBlockBoundary( last ) && if ( isBlockBoundary( last ) && ( node = getPrevious( last ) ) && maybeBogus( node ) ) {
( node = getPrevious( last ) ) &&
maybeBogus( node ) )
{
// Bogus must have inline proceeding, instead single BR between two blocks, // Bogus must have inline proceeding, instead single BR between two blocks,
// is considered as filler, e.g. <hr /><br /><hr /> // is considered as filler, e.g. <hr /><br /><hr />
if ( ( previous = getPrevious( node ) ) && !isBlockBoundary( previous ) ) if ( ( previous = getPrevious( node ) ) && !isBlockBoundary( previous ) )
@ -436,7 +448,7 @@
return false; return false;
// 1. For IE version >=8, empty blocks are displayed correctly themself in wysiwiyg; // 1. For IE version >=8, empty blocks are displayed correctly themself in wysiwiyg;
// 2. For the rest, at least table cell and list item need no filler space. (#6248) // 2. For the rest, at least table cell and list item need no filler space. (https://dev.ckeditor.com/ticket/6248)
if ( !isOutput && !CKEDITOR.env.needsBrFiller && if ( !isOutput && !CKEDITOR.env.needsBrFiller &&
( document.documentMode > 7 || ( document.documentMode > 7 ||
block.name in CKEDITOR.dtd.tr || block.name in CKEDITOR.dtd.tr ||
@ -448,21 +460,21 @@
return !last || block.name == 'form' && last.name == 'input' ; return !last || block.name == 'form' && last.name == 'input' ;
} }
var rules = { elements: {} }; var rules = { elements: {} },
var isOutput = type == 'html'; isOutput = type == 'html',
textBlockTags = CKEDITOR.tools.extend( {}, blockLikeTags );
// Build the list of text blocks. // Build the list of text blocks.
var textBlockTags = CKEDITOR.tools.extend( {}, blockLikeTags );
for ( var i in textBlockTags ) { for ( var i in textBlockTags ) {
if ( !( '#' in dtd[ i ] ) ) if ( !( '#' in dtd[ i ] ) )
delete textBlockTags[ i ]; delete textBlockTags[ i ];
} }
for ( i in textBlockTags ) for ( i in textBlockTags )
rules.elements[ i ] = blockFilter( isOutput, editor.config.fillEmptyBlocks !== false ); rules.elements[ i ] = blockFilter( isOutput, editor.config.fillEmptyBlocks );
// Editable element is to be checked separately. // Editable element has to be checked separately.
rules.root = blockFilter( isOutput ); rules.root = blockFilter( isOutput, false );
rules.elements.br = brFilter( isOutput ); rules.elements.br = brFilter( isOutput );
return rules; return rules;
} }
@ -472,7 +484,7 @@
} }
// Regex to scan for &nbsp; at the end of blocks, which are actually placeholders. // Regex to scan for &nbsp; at the end of blocks, which are actually placeholders.
// Safari transforms the &nbsp; to \xa0. (#4172) // Safari transforms the &nbsp; to \xa0. (https://dev.ckeditor.com/ticket/4172)
var tailNbspRegex = /(?:&nbsp;|\xa0)$/; var tailNbspRegex = /(?:&nbsp;|\xa0)$/;
var protectedSourceMarker = '{cke_protected}'; var protectedSourceMarker = '{cke_protected}';
@ -514,7 +526,7 @@
} }
function append( parent, node ) { function append( parent, node ) {
var last = parent.children[ parent.children.length -1 ]; var last = parent.children[ parent.children.length - 1 ];
parent.children.push( node ); parent.children.push( node );
node.parent = parent; node.parent = parent;
if ( last ) { if ( last ) {
@ -551,18 +563,35 @@
// active in the editing area (IE|WebKit). // active in the editing area (IE|WebKit).
[ ( /^on/ ), 'data-cke-pa-on' ], [ ( /^on/ ), 'data-cke-pa-on' ],
// Prevent iframe's srcdoc attribute from being evaluated in the editable.
[ ( /^srcdoc/ ), 'data-cke-pa-srcdoc' ],
// Don't let some old expando enter editor. Concerns only IE8, // Don't let some old expando enter editor. Concerns only IE8,
// but for consistency remove on all browsers. // but for consistency remove on all browsers.
[ ( /^data-cke-expando$/ ), '' ] [ ( /^data-cke-expando$/ ), '' ]
] ],
elements: {
// Prevent iframe's src attribute with javascript code or data protocol from being evaluated in the editable.
iframe: function( element ) {
if ( element.attributes && element.attributes.src ) {
var src = element.attributes.src.toLowerCase().replace( /[^a-z]/gi, '' );
if ( src.indexOf( 'javascript' ) === 0 || src.indexOf( 'data' ) === 0 ) {
element.attributes[ 'data-cke-pa-src' ] = element.attributes.src;
delete element.attributes.src;
}
}
}
}
}; };
// Disable form elements editing mode provided by some browsers. (#5746) // Disable form elements editing mode provided by some browsers. (https://dev.ckeditor.com/ticket/5746)
function protectReadOnly( element ) { function protectReadOnly( element ) {
var attrs = element.attributes; var attrs = element.attributes;
// We should flag that the element was locked by our code so // We should flag that the element was locked by our code so
// it'll be editable by the editor functions (#6046). // it'll be editable by the editor functions (https://dev.ckeditor.com/ticket/6046).
if ( attrs.contenteditable != 'false' ) if ( attrs.contenteditable != 'false' )
attrs[ 'data-cke-editable' ] = attrs.contenteditable ? 'true' : 1; attrs[ 'data-cke-editable' ] = attrs.contenteditable ? 'true' : 1;
@ -590,9 +619,11 @@
} }
}, },
// Remove empty link but not empty anchor. (#3829) // Remove empty link but not empty anchor. (https://dev.ckeditor.com/ticket/3829, https://dev.ckeditor.com/ticket/13516)
a: function( element ) { a: function( element ) {
if ( !( element.children.length || element.attributes.name || element.attributes[ 'data-cke-saved-name' ] ) ) var attrs = element.attributes;
if ( !( element.children.length || attrs.name || attrs.id || element.attributes[ 'data-cke-saved-name' ] ) )
return false; return false;
} }
} }
@ -627,7 +658,7 @@
if ( attribs[ 'data-cke-temp' ] ) if ( attribs[ 'data-cke-temp' ] )
return false; return false;
// Remove duplicated attributes - #3789. // Remove duplicated attributes - https://dev.ckeditor.com/ticket/3789.
var attributeNames = [ 'name', 'href', 'src' ], var attributeNames = [ 'name', 'href', 'src' ],
savedAttributeName; savedAttributeName;
for ( var i = 0; i < attributeNames.length; i++ ) { for ( var i = 0; i < attributeNames.length; i++ ) {
@ -639,16 +670,16 @@
return element; return element;
}, },
// The contents of table should be in correct order (#4809). // The contents of table should be in correct order (https://dev.ckeditor.com/ticket/4809).
table: function( element ) { table: function( element ) {
// Clone the array as it would become empty during the sort call. // Clone the array as it would become empty during the sort call.
var children = element.children.slice( 0 ); var children = element.children.slice( 0 );
children.sort( function( node1, node2 ) { children.sort( function( node1, node2 ) {
var index1, index2; var index1, index2;
// Compare in the predefined order. // Compare in the predefined order.
if ( node1.type == CKEDITOR.NODE_ELEMENT && if ( node1.type == CKEDITOR.NODE_ELEMENT && node2.type == node1.type ) {
node2.type == node1.type ) {
index1 = CKEDITOR.tools.indexOf( tableOrder, node1.name ); index1 = CKEDITOR.tools.indexOf( tableOrder, node1.name );
index2 = CKEDITOR.tools.indexOf( tableOrder, node2.name ); index2 = CKEDITOR.tools.indexOf( tableOrder, node2.name );
} }
@ -698,7 +729,7 @@
title: function( element ) { title: function( element ) {
var titleText = element.children[ 0 ]; var titleText = element.children[ 0 ];
// Append text-node to title tag if not present (i.e. non-IEs) (#9882). // Append text-node to title tag if not present (i.e. non-IEs) (https://dev.ckeditor.com/ticket/9882).
!titleText && append( element, titleText = new CKEDITOR.htmlParser.text() ); !titleText && append( element, titleText = new CKEDITOR.htmlParser.text() );
// Transfer data-saved title to title tag. // Transfer data-saved title to title tag.
@ -710,7 +741,7 @@
}, },
attributes: { attributes: {
'class': function( value, element ) { 'class': function( value ) {
// Remove all class names starting with "cke_". // Remove all class names starting with "cke_".
return CKEDITOR.tools.ltrim( value.replace( /(?:^|\s+)cke_[^\s]*/g, '' ) ) || false; return CKEDITOR.tools.ltrim( value.replace( /(?:^|\s+)cke_[^\s]*/g, '' ) ) || false;
} }
@ -719,15 +750,15 @@
if ( CKEDITOR.env.ie ) { if ( CKEDITOR.env.ie ) {
// IE outputs style attribute in capital letters. We should convert // IE outputs style attribute in capital letters. We should convert
// them back to lower case, while not hurting the values (#5930) // them back to lower case, while not hurting the values (https://dev.ckeditor.com/ticket/5930)
defaultHtmlFilterRulesForAll.attributes.style = function( value, element ) { defaultHtmlFilterRulesForAll.attributes.style = function( value ) {
return value.replace( /(^|;)([^\:]+)/g, function( match ) { return value.replace( /(^|;)([^\:]+)/g, function( match ) {
return match.toLowerCase(); return match.toLowerCase();
} ); } );
}; };
} }
// Disable form elements editing mode provided by some browsers. (#5746) // Disable form elements editing mode provided by some browsers. (https://dev.ckeditor.com/ticket/5746)
function unprotectReadyOnly( element ) { function unprotectReadyOnly( element ) {
var attrs = element.attributes; var attrs = element.attributes;
switch ( attrs[ 'data-cke-editable' ] ) { switch ( attrs[ 'data-cke-editable' ] ) {
@ -759,8 +790,8 @@
// //
// 'data-x' => '&lt;a href=&quot;X&quot;' // 'data-x' => '&lt;a href=&quot;X&quot;'
// //
// which, can be easily filtered out (#11508). // which, can be easily filtered out (https://dev.ckeditor.com/ticket/11508).
protectAttributeRegex = /([\w-]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi, protectAttributeRegex = /([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,
protectAttributeNameRegex = /^(href|src|name)$/i; protectAttributeNameRegex = /^(href|src|name)$/i;
// Note: we use lazy star '*?' to prevent eating everything up to the last occurrence of </style> or </textarea>. // Note: we use lazy star '*?' to prevent eating everything up to the last occurrence of </style> or </textarea>.
@ -776,8 +807,8 @@
function protectAttributes( html ) { function protectAttributes( html ) {
return html.replace( protectElementRegex, function( element, tag, attributes ) { return html.replace( protectElementRegex, function( element, tag, attributes ) {
return '<' + tag + attributes.replace( protectAttributeRegex, function( fullAttr, attrName ) { return '<' + tag + attributes.replace( protectAttributeRegex, function( fullAttr, attrName ) {
// Avoid corrupting the inline event attributes (#7243). // Avoid corrupting the inline event attributes (https://dev.ckeditor.com/ticket/7243).
// We should not rewrite the existed protected attributes, e.g. clipboard content from editor. (#5218) // We should not rewrite the existed protected attributes, e.g. clipboard content from editor. (https://dev.ckeditor.com/ticket/5218)
if ( protectAttributeNameRegex.test( attrName ) && attributes.indexOf( 'data-cke-saved-' + attrName ) == -1 ) if ( protectAttributeNameRegex.test( attrName ) && attributes.indexOf( 'data-cke-saved-' + attrName ) == -1 )
return ' data-cke-saved-' + fullAttr + ' data-cke-' + CKEDITOR.rnd + '-' + fullAttr; return ' data-cke-saved-' + fullAttr + ' data-cke-' + CKEDITOR.rnd + '-' + fullAttr;
@ -816,7 +847,7 @@
} }
function protectPreFormatted( html ) { function protectPreFormatted( html ) {
return CKEDITOR.env.opera ? html : html.replace( /(<pre\b[^>]*>)(\r\n|\n)/g, '$1$2$2' ); return html.replace( /(<pre\b[^>]*>)(\r\n|\n)/g, '$1$2$2' );
} }
function protectRealComments( html ) { function protectRealComments( html ) {
@ -861,10 +892,13 @@
var regexes = [ var regexes = [
// Script tags will also be forced to be protected, otherwise // Script tags will also be forced to be protected, otherwise
// IE will execute them. // IE will execute them.
( /<script[\s\S]*?<\/script>/gi ), ( /<script[\s\S]*?(<\/script>|$)/gi ),
// <noscript> tags (get lost in IE and messed up in FF). // <noscript> tags (get lost in IE and messed up in FF).
/<noscript[\s\S]*?<\/noscript>/gi /<noscript[\s\S]*?<\/noscript>/gi,
// Avoid meta tags being stripped (https://dev.ckeditor.com/ticket/8117).
/<meta[\s\S]*?\/?>/gi
].concat( protectRegexes ); ].concat( protectRegexes );
// First of any other protection, we must protect all comments // First of any other protection, we must protect all comments
@ -877,7 +911,7 @@
for ( var i = 0; i < regexes.length; i++ ) { for ( var i = 0; i < regexes.length; i++ ) {
data = data.replace( regexes[ i ], function( match ) { data = data.replace( regexes[ i ], function( match ) {
match = match.replace( tempRegex, // There could be protected source inside another one. (#3869). match = match.replace( tempRegex, // There could be protected source inside another one. (https://dev.ckeditor.com/ticket/3869).
function( $, isComment, id ) { function( $, isComment, id ) {
return protectedHtml[ id ]; return protectedHtml[ id ];
} ); } );
@ -895,13 +929,30 @@
// Different protection pattern is used for those that // Different protection pattern is used for those that
// live in attributes to avoid from being HTML encoded. // live in attributes to avoid from being HTML encoded.
// Why so serious? See #9205, #8216, #7805. // Why so serious? See https://dev.ckeditor.com/ticket/9205, https://dev.ckeditor.com/ticket/8216, https://dev.ckeditor.com/ticket/7805, https://dev.ckeditor.com/ticket/11754, https://dev.ckeditor.com/ticket/11846.
return data.replace( /<\w([^'">]+|'[^']*'|"[^"]*")+>/g, function( match ) { data = data.replace( /<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g, function( match ) {
return match.replace( /<!--\{cke_protected\}([^>]*)-->/g, function( match, data ) { return match.replace( /<!--\{cke_protected\}([^>]*)-->/g, function( match, data ) {
store[ store.id ] = decodeURIComponent( data ); store[ store.id ] = decodeURIComponent( data );
return '{cke_protected_' + ( store.id++ ) + '}'; return '{cke_protected_' + ( store.id++ ) + '}';
} ); } );
} ); } );
// This RegExp searches for innerText in all the title/iframe/textarea elements.
// This is because browser doesn't allow HTML in these elements, that's why we can't
// nest comments in there. (https://dev.ckeditor.com/ticket/11223)
data = data.replace( /<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g, function( match, tagName, tagAttributes, innerText ) {
return '<' + tagName + tagAttributes + '>' + unprotectSource( unprotectRealComments( innerText ), editor ) + '</' + tagName + '>';
} );
return data;
}
// Creates a block if the root element is empty.
function fixEmptyRoot( root, fixBodyTag ) {
if ( !root.children.length && CKEDITOR.dtd[ root.name ][ fixBodyTag ] ) {
var fixBodyElement = new CKEDITOR.htmlParser.element( fixBodyTag );
root.add( fixBodyElement );
}
} }
} )(); } )();
@ -921,7 +972,7 @@
* }; * };
* *
* @since 3.5 * @since 3.5
* @cfg {Boolean} [fillEmptyBlocks=true] * @cfg {Boolean/Function} [fillEmptyBlocks=true]
* @member CKEDITOR.config * @member CKEDITOR.config
*/ */
@ -937,7 +988,7 @@
* {@link CKEDITOR.htmlParser.fragment} {@link CKEDITOR.htmlParser.element}. * {@link CKEDITOR.htmlParser.fragment} {@link CKEDITOR.htmlParser.element}.
* * 5-9: Data is available in the parsed format, but {@link CKEDITOR.htmlDataProcessor#dataFilter} * * 5-9: Data is available in the parsed format, but {@link CKEDITOR.htmlDataProcessor#dataFilter}
* is not applied yet. * is not applied yet.
* * 6: Data is filtered with the {CKEDITOR.filter content filter}. * * 6: Data is filtered with the {@link CKEDITOR.filter content filter}.
* * 10: Data is processed with {@link CKEDITOR.htmlDataProcessor#dataFilter}. * * 10: Data is processed with {@link CKEDITOR.htmlDataProcessor#dataFilter}.
* * 10-14: Data is available in the parsed format and {@link CKEDITOR.htmlDataProcessor#dataFilter} * * 10-14: Data is available in the parsed format and {@link CKEDITOR.htmlDataProcessor#dataFilter}
* has already been applied. * has already been applied.
@ -961,6 +1012,7 @@
* @param {Boolean} data.dontFilter See {@link CKEDITOR.htmlDataProcessor#toHtml} The `dontFilter` argument. * @param {Boolean} data.dontFilter See {@link CKEDITOR.htmlDataProcessor#toHtml} The `dontFilter` argument.
* @param {Boolean} data.filter See {@link CKEDITOR.htmlDataProcessor#toHtml} The `filter` argument. * @param {Boolean} data.filter See {@link CKEDITOR.htmlDataProcessor#toHtml} The `filter` argument.
* @param {Boolean} data.enterMode See {@link CKEDITOR.htmlDataProcessor#toHtml} The `enterMode` argument. * @param {Boolean} data.enterMode See {@link CKEDITOR.htmlDataProcessor#toHtml} The `enterMode` argument.
* @param {Boolean} [data.protectedWhitespaces] See {@link CKEDITOR.htmlDataProcessor#toHtml} The `protectedWhitespaces` argument.
*/ */
/** /**
@ -999,4 +1051,3 @@
* @param {Boolean} data.filter See {@link CKEDITOR.htmlDataProcessor#toDataFormat} The `filter` argument. * @param {Boolean} data.filter See {@link CKEDITOR.htmlDataProcessor#toDataFormat} The `filter` argument.
* @param {Boolean} data.enterMode See {@link CKEDITOR.htmlDataProcessor#toDataFormat} The `enterMode` argument. * @param {Boolean} data.enterMode See {@link CKEDITOR.htmlDataProcessor#toDataFormat} The `enterMode` argument.
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -17,7 +17,7 @@
*/ */
CKEDITOR.htmlParser = function() { CKEDITOR.htmlParser = function() {
this._ = { this._ = {
htmlPartsRegex: new RegExp( '<(?:(?:\\/([^>]+)>)|(?:!--([\\S|\\s]*?)-->)|(?:([^\\s>]+)\\s*((?:(?:"[^"]*")|(?:\'[^\']*\')|[^"\'>])*)\\/?>))', 'g' ) htmlPartsRegex: /<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)-->)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g
}; };
}; };
@ -129,14 +129,12 @@ CKEDITOR.htmlParser = function() {
nextIndex = this._.htmlPartsRegex.lastIndex; nextIndex = this._.htmlPartsRegex.lastIndex;
/* // "parts" is an array with the following items:
"parts" is an array with the following items: // 0 : The entire match for opening/closing tags and comments.
0 : The entire match for opening/closing tags and comments. // : Group filled with the tag name for closing tags.
1 : Group filled with the tag name for closing tags. // 2 : Group filled with the comment text.
2 : Group filled with the comment text. // 3 : Group filled with the tag name for opening tags.
3 : Group filled with the tag name for opening tags. // 4 : Group filled with the attributes part of opening tags.
4 : Group filled with the attributes part of opening tags.
*/
// Closing tag // Closing tag
if ( ( tagName = parts[ 1 ] ) ) { if ( ( tagName = parts[ 1 ] ) ) {
@ -165,14 +163,14 @@ CKEDITOR.htmlParser = function() {
tagName = tagName.toLowerCase(); tagName = tagName.toLowerCase();
// There are some tag names that can break things, so let's // There are some tag names that can break things, so let's
// simply ignore them when parsing. (#5224) // simply ignore them when parsing. (https://dev.ckeditor.com/ticket/5224)
if ( /="/.test( tagName ) ) if ( /="/.test( tagName ) )
continue; continue;
var attribs = {}, var attribs = {},
attribMatch, attribMatch,
attribsPart = parts[ 4 ], attribsPart = parts[ 4 ],
selfClosing = !!( attribsPart && attribsPart.charAt( attribsPart.length - 1 ) == '/' ); selfClosing = !!parts[ 5 ];
if ( attribsPart ) { if ( attribsPart ) {
while ( ( attribMatch = attribsRegex.exec( attribsPart ) ) ) { while ( ( attribMatch = attribsRegex.exec( attribsPart ) ) ) {

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -32,7 +32,7 @@ CKEDITOR.htmlParser.basicWriter = CKEDITOR.tools.createClass( {
* @param {Object} attributes The attributes defined for this tag. The * @param {Object} attributes The attributes defined for this tag. The
* attributes could be used to inspect the tag. * attributes could be used to inspect the tag.
*/ */
openTag: function( tagName, attributes ) { openTag: function( tagName ) {
this._.output.push( '<', tagName ); this._.output.push( '<', tagName );
}, },
@ -67,7 +67,7 @@ CKEDITOR.htmlParser.basicWriter = CKEDITOR.tools.createClass( {
* @param {String} attValue The attribute value. * @param {String} attValue The attribute value.
*/ */
attribute: function( attName, attValue ) { attribute: function( attName, attValue ) {
// Browsers don't always escape special character in attribute values. (#4683, #4719). // Browsers don't always escape special character in attribute values. (https://dev.ckeditor.com/ticket/4683, https://dev.ckeditor.com/ticket/4719).
if ( typeof attValue == 'string' ) if ( typeof attValue == 'string' )
attValue = CKEDITOR.tools.htmlEncodeAttr( attValue ); attValue = CKEDITOR.tools.htmlEncodeAttr( attValue );

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
'use strict'; 'use strict';

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
'use strict'; 'use strict';

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
'use strict'; 'use strict';
@ -12,7 +12,7 @@
* @extends CKEDITOR.htmlParser.node * @extends CKEDITOR.htmlParser.node
* @constructor Creates an element class instance. * @constructor Creates an element class instance.
* @param {String} name The element name. * @param {String} name The element name.
* @param {Object} attributes And object holding all attributes defined for * @param {Object} attributes An object storing all attributes defined for
* this element. * this element.
*/ */
CKEDITOR.htmlParser.element = function( name, attributes ) { CKEDITOR.htmlParser.element = function( name, attributes ) {
@ -24,7 +24,7 @@ CKEDITOR.htmlParser.element = function( name, attributes ) {
this.name = name; this.name = name;
/** /**
* Holds the attributes defined for this element. * Stores the attributes defined for this element.
* *
* @property {Object} * @property {Object}
*/ */
@ -35,13 +35,15 @@ CKEDITOR.htmlParser.element = function( name, attributes ) {
*/ */
this.children = []; this.children = [];
// Reveal the real semantic of our internal custom tag name (#6639), // Reveal the real semantic of our internal custom tag name (https://dev.ckeditor.com/ticket/6639),
// when resolving whether it's block like. // when resolving whether it's block like.
var realName = name || '', var realName = name || '',
prefixed = realName.match( /^cke:(.*)/ ); prefixed = realName.match( /^cke:(.*)/ );
prefixed && ( realName = prefixed[ 1 ] ); prefixed && ( realName = prefixed[ 1 ] );
var isBlockLike = !!( CKEDITOR.dtd.$nonBodyContent[ realName ] || CKEDITOR.dtd.$block[ realName ] || CKEDITOR.dtd.$listItem[ realName ] || CKEDITOR.dtd.$tableContent[ realName ] || CKEDITOR.dtd.$nonEditable[ realName ] || realName == 'br' ); var isBlockLike = !!( CKEDITOR.dtd.$nonBodyContent[ realName ] || CKEDITOR.dtd.$block[ realName ] ||
CKEDITOR.dtd.$listItem[ realName ] || CKEDITOR.dtd.$tableContent[ realName ] ||
CKEDITOR.dtd.$nonEditable[ realName ] || realName == 'br' );
this.isEmpty = !!CKEDITOR.dtd.$empty[ name ]; this.isEmpty = !!CKEDITOR.dtd.$empty[ name ];
this.isUnknown = !CKEDITOR.dtd[ name ]; this.isUnknown = !CKEDITOR.dtd[ name ];
@ -54,12 +56,12 @@ CKEDITOR.htmlParser.element = function( name, attributes ) {
}; };
/** /**
* Object presentation of CSS style declaration text. * Object presentation of the CSS style declaration text.
* *
* @class * @class
* @constructor Creates a cssStyle class instance. * @constructor Creates a `cssStyle` class instance.
* @param {CKEDITOR.htmlParser.element/String} elementOrStyleText * @param {CKEDITOR.htmlParser.element/String} elementOrStyleText
* A html parser element or the inline style text. * An HTML parser element or the inline style text.
*/ */
CKEDITOR.htmlParser.cssStyle = function() { CKEDITOR.htmlParser.cssStyle = function() {
var styleText, var styleText,
@ -82,7 +84,7 @@ CKEDITOR.htmlParser.cssStyle = function() {
rules: rules, rules: rules,
/** /**
* Apply the styles onto the specified element or object. * Applies the styles to the specified element or object.
* *
* @param {CKEDITOR.htmlParser.element/CKEDITOR.dom.element/Object} obj * @param {CKEDITOR.htmlParser.element/CKEDITOR.dom.element/Object} obj
*/ */
@ -94,7 +96,7 @@ CKEDITOR.htmlParser.cssStyle = function() {
}, },
/** /**
* Serialize CSS style declaration to string. * Serializes CSS style declaration to a string.
* *
* @returns {String} * @returns {String}
*/ */
@ -137,7 +139,7 @@ CKEDITOR.htmlParser.cssStyle = function() {
add: fragProto.add, add: fragProto.add,
/** /**
* Clone this element. * Clones this element.
* *
* @returns {CKEDITOR.htmlParser.element} The element clone. * @returns {CKEDITOR.htmlParser.element} The element clone.
*/ */
@ -146,13 +148,13 @@ CKEDITOR.htmlParser.cssStyle = function() {
}, },
/** /**
* Filter this element and its children with given filter. * Filters this element and its children with the given filter.
* *
* @since 4.1 * @since 4.1
* @param {CKEDITOR.htmlParser.filter} filter * @param {CKEDITOR.htmlParser.filter} filter
* @returns {Boolean} Method returns `false` when this element has * @returns {Boolean} The method returns `false` when this element has
* been removed or replaced with other. This is an information for * been removed or replaced with another. This information means that
* {@link #filterChildren} that it has to repeat filter on current * {@link #filterChildren} has to repeat the filter on the current
* position in parent's children array. * position in parent's children array.
*/ */
filter: function( filter, context ) { filter: function( filter, context ) {
@ -232,9 +234,10 @@ CKEDITOR.htmlParser.cssStyle = function() {
delete attributes[ a ]; delete attributes[ a ];
a = newAttrName; a = newAttrName;
continue; continue;
} else } else {
break; break;
} }
}
if ( newAttrName ) { if ( newAttrName ) {
if ( ( value = filter.onAttribute( context, element, newAttrName, value ) ) === false ) if ( ( value = filter.onAttribute( context, element, newAttrName, value ) ) === false )
@ -251,10 +254,10 @@ CKEDITOR.htmlParser.cssStyle = function() {
}, },
/** /**
* Filter this element's children with given filter. * Filters this element's children with the given filter.
* *
* Element's children may only be filtered once by one * Element's children may only be filtered once by one
* instance of filter. * instance of the filter.
* *
* @method filterChildren * @method filterChildren
* @param {CKEDITOR.htmlParser.filter} filter * @param {CKEDITOR.htmlParser.filter} filter
@ -262,11 +265,11 @@ CKEDITOR.htmlParser.cssStyle = function() {
filterChildren: fragProto.filterChildren, filterChildren: fragProto.filterChildren,
/** /**
* Writes the element HTML to a CKEDITOR.htmlWriter. * Writes the element HTML to the CKEDITOR.htmlWriter.
* *
* @param {CKEDITOR.htmlParser.basicWriter} writer The writer to which write the HTML. * @param {CKEDITOR.htmlParser.basicWriter} writer The writer to which HTML will be written.
* @param {CKEDITOR.htmlParser.filter} [filter] The filter to be applied to this node. * @param {CKEDITOR.htmlParser.filter} [filter] The filter to be applied to this node.
* **Note:** it's unsafe to filter offline (not appended) node. * **Note:** It is unsafe to filter an offline (not appended) node.
*/ */
writeHtml: function( writer, filter ) { writeHtml: function( writer, filter ) {
if ( filter ) if ( filter )
@ -306,15 +309,15 @@ CKEDITOR.htmlParser.cssStyle = function() {
}, },
/** /**
* Send children of this element to the writer. * Sends children of this element to the writer.
* *
* @param {CKEDITOR.htmlParser.basicWriter} writer The writer to which write the HTML. * @param {CKEDITOR.htmlParser.basicWriter} writer The writer to which HTML will be written.
* @param {CKEDITOR.htmlParser.filter} [filter] * @param {CKEDITOR.htmlParser.filter} [filter]
*/ */
writeChildrenHtml: fragProto.writeChildrenHtml, writeChildrenHtml: fragProto.writeChildrenHtml,
/** /**
* Replace this element with its children. * Replaces this element with its children.
* *
* @since 4.1 * @since 4.1
*/ */
@ -328,9 +331,9 @@ CKEDITOR.htmlParser.cssStyle = function() {
}, },
/** /**
* Execute callback on each node (of given type) in this element. * Executes a callback on each node (of the given type) in this element.
* *
* // Create <p> element with foo<b>bar</b>bom as its content. * // Create a <p> element with foo<b>bar</b>bom as its content.
* var elP = CKEDITOR.htmlParser.fragment.fromHtml( 'foo<b>bar</b>bom', 'p' ); * var elP = CKEDITOR.htmlParser.fragment.fromHtml( 'foo<b>bar</b>bom', 'p' );
* elP.forEach( function( node ) { * elP.forEach( function( node ) {
* console.log( node ); * console.log( node );
@ -345,19 +348,19 @@ CKEDITOR.htmlParser.cssStyle = function() {
* *
* @since 4.1 * @since 4.1
* @param {Function} callback Function to be executed on every node. * @param {Function} callback Function to be executed on every node.
* **Since 4.3** if `callback` returned `false` descendants of current node will be ignored. * **Since 4.3**: If `callback` returned `false`, the descendants of the current node will be ignored.
* @param {CKEDITOR.htmlParser.node} callback.node Node passed as argument. * @param {CKEDITOR.htmlParser.node} callback.node Node passed as an argument.
* @param {Number} [type] If specified `callback` will be executed only on nodes of this type. * @param {Number} [type] Whether the specified `callback` will be executed only on nodes of this type.
* @param {Boolean} [skipRoot] Don't execute `callback` on this element. * @param {Boolean} [skipRoot] Do not execute `callback` on this element.
*/ */
forEach: fragProto.forEach, forEach: fragProto.forEach,
/** /**
* Gets this element's first child. If `condition` is given returns * Gets this element's first child. If `condition` is given, this method returns
* first child which satisfies that condition. * the first child which satisfies that condition.
* *
* @since 4.3 * @since 4.3
* @param {String/Object/Function} condition Name of a child, hash of names or validator function. * @param {String/Object/Function} condition Name of a child, a hash of names, or a validator function.
* @returns {CKEDITOR.htmlParser.node} * @returns {CKEDITOR.htmlParser.node}
*/ */
getFirst: function( condition ) { getFirst: function( condition ) {
@ -412,12 +415,12 @@ CKEDITOR.htmlParser.cssStyle = function() {
}, },
/** /**
* Splits this element at given index. * Splits this element at the given index.
* *
* @since 4.3 * @since 4.3
* @param {Number} index Index at which element will be split &ndash; `0` means beginning, * @param {Number} index Index at which the element will be split &mdash; `0` means the beginning,
* `1` after first child node, etc. * `1` after the first child node, etc.
* @returns {CKEDITOR.htmlParser.element} New element, following this one. * @returns {CKEDITOR.htmlParser.element} The new element following this one.
*/ */
split: function( index ) { split: function( index ) {
var cloneChildren = this.children.splice( index, this.children.length - index ), var cloneChildren = this.children.splice( index, this.children.length - index ),
@ -440,14 +443,60 @@ CKEDITOR.htmlParser.cssStyle = function() {
}, },
/** /**
* Removes class name from classes list. * Searches through the current node children to find nodes matching the `criteria`.
*
* @param {String/Function} criteria Tag name or evaluator function.
* @param {Boolean} [recursive=false]
* @returns {CKEDITOR.htmlParser.node[]}
*/
find: function( criteria, recursive ) {
if ( recursive === undefined ) {
recursive = false;
}
var ret = [],
i;
for ( i = 0; i < this.children.length; i++ ) {
var curChild = this.children[ i ];
if ( typeof criteria == 'function' && criteria( curChild ) ) {
ret.push( curChild );
} else if ( typeof criteria == 'string' && curChild.name === criteria ) {
ret.push( curChild );
}
if ( recursive && curChild.find ) {
ret = ret.concat( curChild.find( criteria, recursive ) );
}
}
return ret;
},
/**
* Adds a class name to the list of classes.
*
* @since 4.4
* @param {String} className The class name to be added.
*/
addClass: function( className ) {
if ( this.hasClass( className ) )
return;
var c = this.attributes[ 'class' ] || '';
this.attributes[ 'class' ] = c + ( c ? ' ' : '' ) + className;
},
/**
* Removes a class name from the list of classes.
* *
* @since 4.3 * @since 4.3
* @param {String} className The class name to be removed. * @param {String} className The class name to be removed.
*/ */
removeClass: function( className ) { removeClass: function( className ) {
var classes = this.attributes[ 'class' ], var classes = this.attributes[ 'class' ];
index;
if ( !classes ) if ( !classes )
return; return;
@ -494,10 +543,10 @@ CKEDITOR.htmlParser.cssStyle = function() {
if ( !ctx.nonEditable && this.attributes.contenteditable == 'false' ) if ( !ctx.nonEditable && this.attributes.contenteditable == 'false' )
changes.push( 'nonEditable', true ); changes.push( 'nonEditable', true );
// A context to be given nestedEditable must be nonEditable first (by inheritance) (#11372). // A context to be given nestedEditable must be nonEditable first (by inheritance) (https://dev.ckeditor.com/ticket/11372, https://dev.ckeditor.com/ticket/11698).
// Never set "nestedEditable" context for a body. If body is processed then it indicates // Special case: https://dev.ckeditor.com/ticket/11504 - filter starts on <body contenteditable=true>,
// a fullPage editor and there's no slightest change of nesting such editable (#11504). // so ctx.nonEditable has not been yet set to true.
else if ( this.name != 'body' && !ctx.nestedEditable && this.attributes.contenteditable == 'true' ) else if ( ctx.nonEditable && !ctx.nestedEditable && this.attributes.contenteditable == 'true' )
changes.push( 'nestedEditable', true ); changes.push( 'nestedEditable', true );
if ( changes.length ) { if ( changes.length ) {

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
'use strict'; 'use strict';
@ -344,7 +344,7 @@
// Update currentValue and corresponding argument in args array. // Update currentValue and corresponding argument in args array.
// Updated values will be used in next for-loop step. // Updated values will be used in next for-loop step.
if ( ret != undefined ) if ( ret != null )
args[ 0 ] = currentValue = ret; args[ 0 ] = currentValue = ret;
// ret == undefined will continue loop as nothing has happened. // ret == undefined will continue loop as nothing has happened.

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
'use strict'; 'use strict';
@ -61,7 +61,7 @@ CKEDITOR.htmlParser.fragment = function() {
if ( node.attributes[ 'data-cke-survive' ] ) if ( node.attributes[ 'data-cke-survive' ] )
return false; return false;
// Empty link is to be removed when empty but not anchor. (#7894) // Empty link is to be removed when empty but not anchor. (https://dev.ckeditor.com/ticket/7894)
return node.name == 'a' && node.attributes.href || CKEDITOR.dtd.$removeEmpty[ node.name ]; return node.name == 'a' && node.attributes.href || CKEDITOR.dtd.$removeEmpty[ node.name ];
} }
@ -130,7 +130,7 @@ CKEDITOR.htmlParser.fragment = function() {
i--; i--;
} else { } else {
// Some element of the same type cannot be nested, flat them, // Some element of the same type cannot be nested, flat them,
// e.g. <a href="#">foo<a href="#">bar</a></a>. (#7894) // e.g. <a href="#">foo<a href="#">bar</a></a>. (https://dev.ckeditor.com/ticket/7894)
if ( pendingName == currentNode.name ) if ( pendingName == currentNode.name )
addElement( currentNode, currentNode.parent, 1 ), i--; addElement( currentNode, currentNode.parent, 1 ), i--;
} }
@ -143,7 +143,7 @@ CKEDITOR.htmlParser.fragment = function() {
addElement( pendingBRs.shift(), currentNode ); addElement( pendingBRs.shift(), currentNode );
} }
// Rtrim empty spaces on block end boundary. (#3585) // Rtrim empty spaces on block end boundary. (https://dev.ckeditor.com/ticket/3585)
function removeTailWhitespace( element ) { function removeTailWhitespace( element ) {
if ( element._.isBlockLike && element.name != 'pre' && element.name != 'textarea' ) { if ( element._.isBlockLike && element.name != 'pre' && element.name != 'textarea' ) {
@ -202,18 +202,19 @@ CKEDITOR.htmlParser.fragment = function() {
if ( element.returnPoint ) { if ( element.returnPoint ) {
currentNode = element.returnPoint; currentNode = element.returnPoint;
delete element.returnPoint; delete element.returnPoint;
} else } else {
currentNode = moveCurrent ? target : savedCurrent; currentNode = moveCurrent ? target : savedCurrent;
} }
}
// Auto paragraphing should happen when inline content enters the root element. // Auto paragraphing should happen when inline content enters the root element.
function checkAutoParagraphing( parent, node ) { function checkAutoParagraphing( parent, node ) {
// Check for parent that can contain block. // Check for parent that can contain block.
if ( ( parent == root || parent.name == 'body' ) && fixingBlock && if ( ( parent == root || parent.name == 'body' ) && fixingBlock &&
( !parent.name || CKEDITOR.dtd[ parent.name ][ fixingBlock ] ) ) ( !parent.name || CKEDITOR.dtd[ parent.name ][ fixingBlock ] ) ) {
{
var name, realName; var name, realName;
if ( node.attributes && ( realName = node.attributes[ 'data-cke-real-element-type' ] ) ) if ( node.attributes && ( realName = node.attributes[ 'data-cke-real-element-type' ] ) )
name = realName; name = realName;
else else
@ -257,8 +258,9 @@ CKEDITOR.htmlParser.fragment = function() {
else if ( tagName == 'br' && inPre ) { else if ( tagName == 'br' && inPre ) {
currentNode.add( new CKEDITOR.htmlParser.text( '\n' ) ); currentNode.add( new CKEDITOR.htmlParser.text( '\n' ) );
return; return;
} else if ( tagName == 'textarea' ) } else if ( tagName == 'textarea' ) {
inTextarea = true; inTextarea = true;
}
if ( tagName == 'br' ) { if ( tagName == 'br' ) {
pendingBRs.push( element ); pendingBRs.push( element );
@ -273,10 +275,10 @@ CKEDITOR.htmlParser.fragment = function() {
// If the element cannot be child of the current element. // If the element cannot be child of the current element.
if ( !element.isUnknown && !currentNode.isUnknown && !currentDtd[ tagName ] ) { if ( !element.isUnknown && !currentNode.isUnknown && !currentDtd[ tagName ] ) {
// Current node doesn't have a close tag, time for a close // Current node doesn't have a close tag, time for a close
// as this element isn't fit in. (#7497) // as this element isn't fit in. (https://dev.ckeditor.com/ticket/7497)
if ( currentNode.isOptionalClose ) if ( currentNode.isOptionalClose )
parser.onTagClose( currentName ); parser.onTagClose( currentName );
// Fixing malformed nested lists by moving it into a previous list item. (#3828) // Fixing malformed nested lists by moving it into a previous list item. (https://dev.ckeditor.com/ticket/3828)
else if ( tagName in listBlocks && currentName in listBlocks ) { else if ( tagName in listBlocks && currentName in listBlocks ) {
var children = currentNode.children, var children = currentNode.children,
lastChild = children[ children.length - 1 ]; lastChild = children[ children.length - 1 ];
@ -289,7 +291,7 @@ CKEDITOR.htmlParser.fragment = function() {
currentNode = lastChild; currentNode = lastChild;
} }
// Establish new list root for orphan list items, but NOT to create // Establish new list root for orphan list items, but NOT to create
// new list for the following ones, fix them instead. (#6975) // new list for the following ones, fix them instead. (https://dev.ckeditor.com/ticket/6975)
// <dl><dt>foo<dd>bar</dl> // <dl><dt>foo<dd>bar</dl>
// <ul><li>foo<li>bar</ul> // <ul><li>foo<li>bar</ul>
else if ( tagName in CKEDITOR.dtd.$listItem && else if ( tagName in CKEDITOR.dtd.$listItem &&
@ -323,9 +325,10 @@ CKEDITOR.htmlParser.fragment = function() {
break; break;
} }
} }
} else } else {
break; break;
} }
}
checkPending( tagName ); checkPending( tagName );
sendPendingBRs(); sendPendingBRs();
@ -406,7 +409,7 @@ CKEDITOR.htmlParser.fragment = function() {
var currentName = currentNode.name, var currentName = currentNode.name,
currentDtd = currentName ? ( CKEDITOR.dtd[ currentName ] || ( currentNode._.isBlockLike ? CKEDITOR.dtd.div : CKEDITOR.dtd.span ) ) : rootDtd; currentDtd = currentName ? ( CKEDITOR.dtd[ currentName ] || ( currentNode._.isBlockLike ? CKEDITOR.dtd.div : CKEDITOR.dtd.span ) ) : rootDtd;
// Fix orphan text in list/table. (#8540) (#8870) // Fix orphan text in list/table. (https://dev.ckeditor.com/ticket/8540) (https://dev.ckeditor.com/ticket/8870)
if ( !inTextarea && !currentDtd[ '#' ] && currentName in nonBreakingBlocks ) { if ( !inTextarea && !currentDtd[ '#' ] && currentName in nonBreakingBlocks ) {
parser.onTagOpen( structureFixes[ currentName ] || '' ); parser.onTagOpen( structureFixes[ currentName ] || '' );
parser.onText( text ); parser.onText( text );

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
'use strict'; 'use strict';
@ -104,9 +104,15 @@
*/ */
getAscendant: function( condition ) { getAscendant: function( condition ) {
var checkFn = var checkFn =
typeof condition == 'function' ? condition : typeof condition == 'function' ?
typeof condition == 'string' ? function( el ) { return el.name == condition; } : condition :
function( el ) { return el.name in condition; }; typeof condition == 'string' ?
function( el ) {
return el.name == condition;
} :
function( el ) {
return el.name in condition;
};
var parent = this.parent; var parent = this.parent;

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
'use strict'; 'use strict';

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -15,16 +15,16 @@ CKEDITOR.keystrokeHandler = function( editor ) {
return editor.keystrokeHandler; return editor.keystrokeHandler;
/** /**
* List of keystrokes associated to commands. Each entry points to the * A list of keystrokes associated with commands. Each entry points to the
* command to be executed. * command to be executed.
* *
* Since CKEditor 4 there's no need to modify this property directly during the runtime. * Since CKEditor 4 there is no need to modify this property directly during the runtime.
* Use {@link CKEDITOR.editor#setKeystroke} instead. * Use {@link CKEDITOR.editor#setKeystroke} instead.
*/ */
this.keystrokes = {}; this.keystrokes = {};
/** /**
* List of keystrokes that should be blocked if not defined at * A list of keystrokes that should be blocked if not defined in
* {@link #keystrokes}. In this way it is possible to block the default * {@link #keystrokes}. In this way it is possible to block the default
* browser behavior for those keystrokes. * browser behavior for those keystrokes.
*/ */
@ -48,7 +48,7 @@ CKEDITOR.keystrokeHandler = function( editor ) {
var command = this.keystrokes[ keyCombination ]; var command = this.keystrokes[ keyCombination ];
var editor = this._.editor; var editor = this._.editor;
cancel = ( editor.fire( 'key', { keyCode: keyCombination } ) === false ); cancel = ( editor.fire( 'key', { keyCode: keyCombination, domEvent: event } ) === false );
if ( !cancel ) { if ( !cancel ) {
if ( command ) { if ( command ) {
@ -76,7 +76,7 @@ CKEDITOR.keystrokeHandler = function( editor ) {
CKEDITOR.keystrokeHandler.prototype = { CKEDITOR.keystrokeHandler.prototype = {
/** /**
* Attaches this keystroke handle to a DOM object. Keystrokes typed * Attaches this keystroke handle to a DOM object. Keystrokes typed
* over this object will get handled by this keystrokeHandler. * over this object will be handled by this keystrokeHandler.
* *
* @param {CKEDITOR.dom.domObject} domObject The DOM object to attach to. * @param {CKEDITOR.dom.domObject} domObject The DOM object to attach to.
*/ */
@ -87,14 +87,14 @@ CKEDITOR.keystrokeHandler = function( editor ) {
// Some browsers instead, don't cancel key events in the keydown, but in the // Some browsers instead, don't cancel key events in the keydown, but in the
// keypress. So we must do a longer trip in those cases. // keypress. So we must do a longer trip in those cases.
if ( CKEDITOR.env.opera || ( CKEDITOR.env.gecko && CKEDITOR.env.mac ) ) if ( CKEDITOR.env.gecko && CKEDITOR.env.mac )
domObject.on( 'keypress', onKeyPress, this ); domObject.on( 'keypress', onKeyPress, this );
} }
}; };
} )(); } )();
/** /**
* A list associating keystrokes to editor commands. Each element in the list * A list associating keystrokes with editor commands. Each element in the list
* is an array where the first item is the keystroke, and the second is the * is an array where the first item is the keystroke, and the second is the
* name of the command to be executed. * name of the command to be executed.
* *
@ -102,33 +102,33 @@ CKEDITOR.keystrokeHandler = function( editor ) {
* set by plugins (like `link` and `basicstyles`). If you want to set a keystroke * set by plugins (like `link` and `basicstyles`). If you want to set a keystroke
* for your plugin or during the runtime, use {@link CKEDITOR.editor#setKeystroke} instead. * for your plugin or during the runtime, use {@link CKEDITOR.editor#setKeystroke} instead.
* *
* Since default keystrokes are set by {@link CKEDITOR.editor#setKeystroke} * Since default keystrokes are set by the {@link CKEDITOR.editor#setKeystroke}
* method, by default `config.keystrokes` is an empty array. * method, by default `config.keystrokes` is an empty array.
* *
* See {@link CKEDITOR.editor#setKeystroke} documentation for more details * See {@link CKEDITOR.editor#setKeystroke} documentation for more details
* regarding the start up order. * regarding the start up order.
* *
* // Change default CTRL + L keystroke for 'link' command to CTRL + SHIFT + L. * // Change default Ctrl+L keystroke for 'link' command to Ctrl+Shift+L.
* config.keystrokes = [ * config.keystrokes = [
* ... * ...
* [ CKEDITOR.CTRL + CKEDITOR.SHIFT + 76, 'link' ], // CTRL + SHIFT + L * [ CKEDITOR.CTRL + CKEDITOR.SHIFT + 76, 'link' ], // Ctrl+Shift+L
* ... * ...
* ]; * ];
* *
* To reset a particular keystroke, the following approach can be used: * To reset a particular keystroke, the following approach can be used:
* *
* // Disable default CTRL + L keystroke which executes link command by default. * // Disable default Ctrl+L keystroke which executes the 'link' command by default.
* config.keystrokes = [ * config.keystrokes = [
* ... * ...
* [ CKEDITOR.CTRL + 76, null ], // CTRL + L * [ CKEDITOR.CTRL + 76, null ], // Ctrl+L
* ... * ...
* ]; * ];
* *
* To reset all default keystrokes an {@link CKEDITOR#instanceReady} callback should be * In order to reset all default keystrokes, a {@link CKEDITOR#instanceReady} callback should be
* used. This is since editor defaults are merged rather than overwritten by * used. This is since editor defaults are merged rather than overwritten by
* user keystrokes. * user keystrokes.
* *
* **Note**: This can be potentially harmful for an editor. Avoid this unless you're * **Note**: This can be potentially harmful for the editor. Avoid this unless you are
* aware of the consequences. * aware of the consequences.
* *
* // Reset all default keystrokes. * // Reset all default keystrokes.
@ -141,13 +141,29 @@ CKEDITOR.keystrokeHandler = function( editor ) {
*/ */
/** /**
* Fired when any keyboard key (or combination) is pressed into the editing area. * Fired when any keyboard key (or a combination thereof) is pressed in the editing area.
*
* editor.on( 'key', function( evt ) {
* if ( evt.data.keyCode == CKEDITOR.CTRL + 90 ) {
* // Do something...
*
* // Cancel the event, so other listeners will not be executed and
* // the keydown's default behavior will be prevented.
* evt.cancel();
* }
* } );
*
* Usually you will want to use the {@link CKEDITOR.editor#setKeystroke} method or
* the {@link CKEDITOR.config#keystrokes} option to attach a keystroke to some {@link CKEDITOR.command command}.
* Key event listeners are usuful when some action should be executed conditionally, based
* for example on precise selection location.
* *
* @event key * @event key
* @member CKEDITOR.editor * @member CKEDITOR.editor
* @param data * @param data
* @param {Number} data.keyCode A number representing the key code (or combination). * @param {Number} data.keyCode A number representing the key code (or a combination thereof).
* It is the sum of the current key code and the {@link CKEDITOR#CTRL}, {@link CKEDITOR#SHIFT} * It is the sum of the current key code and the {@link CKEDITOR#CTRL}, {@link CKEDITOR#SHIFT}
* and {@link CKEDITOR#ALT} constants, if those are pressed. * and {@link CKEDITOR#ALT} constants, if those are pressed.
* @param {CKEDITOR.dom.event} data.domEvent A `keydown` DOM event instance. Available since CKEditor 4.4.1.
* @param {CKEDITOR.editor} editor This editor instance. * @param {CKEDITOR.editor} editor This editor instance.
*/ */

View File

@ -1,11 +1,9 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
( function() { ( function() {
var loadedLangs = {};
/** /**
* Stores language-related functions. * Stores language-related functions.
* *
@ -16,14 +14,16 @@
/** /**
* The list of languages available in the editor core. * The list of languages available in the editor core.
* *
* alert( CKEDITOR.lang.en ); // 1 * alert( CKEDITOR.lang.languages.en ); // 1
*/ */
languages: { af: 1, ar: 1, bg: 1, bn: 1, bs: 1, ca: 1, cs: 1, cy: 1, da: 1, de: 1, el: 1, languages: {
'en-au': 1, 'en-ca': 1, 'en-gb': 1, en: 1, eo: 1, es: 1, et: 1, eu: 1, fa: 1, fi: 1, fo: 1, af: 1, ar: 1, az: 1, bg: 1, bn: 1, bs: 1, ca: 1, cs: 1, cy: 1, da: 1, de: 1, 'de-ch': 1, el: 1,
'en-au': 1, 'en-ca': 1, 'en-gb': 1, en: 1, eo: 1, es: 1, 'es-mx':1, et: 1, eu: 1, fa: 1, fi: 1, fo: 1,
'fr-ca': 1, fr: 1, gl: 1, gu: 1, he: 1, hi: 1, hr: 1, hu: 1, id: 1, is: 1, it: 1, ja: 1, ka: 1, 'fr-ca': 1, fr: 1, gl: 1, gu: 1, he: 1, hi: 1, hr: 1, hu: 1, id: 1, is: 1, it: 1, ja: 1, ka: 1,
km: 1, ko: 1, ku: 1, lt: 1, lv: 1, mk: 1, mn: 1, ms: 1, nb: 1, nl: 1, no: 1, pl: 1, 'pt-br': 1, km: 1, ko: 1, ku: 1, lt: 1, lv: 1, mk: 1, mn: 1, ms: 1, nb: 1, nl: 1, no: 1, oc: 1, pl: 1, 'pt-br': 1,
pt: 1, ro: 1, ru: 1, si: 1, sk: 1, sl: 1, sq: 1, 'sr-latn': 1, sr: 1, sv: 1, th: 1, tr: 1, ug: 1, pt: 1, ro: 1, ru: 1, si: 1, sk: 1, sl: 1, sq: 1, 'sr-latn': 1, sr: 1, sv: 1, th: 1, tr: 1, tt: 1, ug: 1,
uk: 1, vi: 1, 'zh-cn': 1, zh: 1 }, uk: 1, vi: 1, 'zh-cn': 1, zh: 1
},
/** /**
* The list of languages that are written Right-To-Left (RTL) and are supported by the editor. * The list of languages that are written Right-To-Left (RTL) and are supported by the editor.
@ -49,13 +49,16 @@
if ( !languageCode || !CKEDITOR.lang.languages[ languageCode ] ) if ( !languageCode || !CKEDITOR.lang.languages[ languageCode ] )
languageCode = this.detect( defaultLanguage, languageCode ); languageCode = this.detect( defaultLanguage, languageCode );
if ( !this[ languageCode ] ) { var that = this,
CKEDITOR.scriptLoader.load( CKEDITOR.getUrl( 'lang/' + languageCode + '.js' ), function() { loadedCallback = function() {
this[ languageCode ].dir = this.rtl[ languageCode ] ? 'rtl' : 'ltr'; that[ languageCode ].dir = that.rtl[ languageCode ] ? 'rtl' : 'ltr';
callback( languageCode, this[ languageCode ] ); callback( languageCode, that[ languageCode ] );
}, this ); };
} else
callback( languageCode, this[ languageCode ] ); if ( !this[ languageCode ] )
CKEDITOR.scriptLoader.load( CKEDITOR.getUrl( 'lang/' + languageCode + '.js' ), loadedCallback, this );
else
loadedCallback();
}, },
/** /**

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -9,7 +9,7 @@
*/ */
if ( typeof CKEDITOR == 'undefined' ) if ( typeof CKEDITOR == 'undefined' )
CKEDITOR = {}; CKEDITOR = {}; // jshint ignore:line
if ( !CKEDITOR.loader ) { if ( !CKEDITOR.loader ) {
/** /**
@ -21,8 +21,17 @@ if ( !CKEDITOR.loader ) {
CKEDITOR.loader = ( function() { CKEDITOR.loader = ( function() {
// Table of script names and their dependencies. // Table of script names and their dependencies.
var scripts = { var scripts = {
'_bootstrap': [ 'config', 'creators/inline', 'creators/themedui', 'editable', 'ckeditor', 'plugins', 'scriptloader', 'style', 'tools', /* The following are entries that we want to force loading at the end to avoid dependence recursion */ 'dom/comment', 'dom/elementpath', 'dom/text', 'dom/rangelist', 'skin' ], '_bootstrap': [
'ckeditor': [ 'ckeditor_basic', 'dom', 'dtd', 'dom/document', 'dom/element', 'dom/iterator', 'editor', 'event', 'htmldataprocessor', 'htmlparser', 'htmlparser/element', 'htmlparser/fragment', 'htmlparser/filter', 'htmlparser/basicwriter', 'template', 'tools' ], 'config', 'creators/inline', 'creators/themedui', 'editable', 'ckeditor', 'plugins',
'scriptloader', 'style', 'tools',
// The following are entries that we want to force loading at the end to avoid dependence recursion.
'dom/comment', 'dom/elementpath', 'dom/text', 'dom/rangelist', 'skin'
],
'ckeditor': [
'ckeditor_basic', 'log', 'dom', 'dtd', 'dom/document', 'dom/element', 'dom/iterator', 'editor', 'event',
'htmldataprocessor', 'htmlparser', 'htmlparser/element', 'htmlparser/fragment', 'htmlparser/filter',
'htmlparser/basicwriter', 'template', 'tools'
],
'ckeditor_base': [], 'ckeditor_base': [],
'ckeditor_basic': [ 'editor_basic', 'env', 'event' ], 'ckeditor_basic': [ 'editor_basic', 'env', 'event' ],
'command': [], 'command': [],
@ -45,7 +54,10 @@ if ( !CKEDITOR.loader ) {
'dom/window': [ 'dom/domobject' ], 'dom/window': [ 'dom/domobject' ],
'dtd': [ 'tools' ], 'dtd': [ 'tools' ],
'editable': [ 'editor', 'tools' ], 'editable': [ 'editor', 'tools' ],
'editor': [ 'command', 'config', 'editor_basic', 'filter', 'focusmanager', 'keystrokehandler', 'lang', 'plugins', 'tools', 'ui' ], 'editor': [
'command', 'config', 'editor_basic', 'filter', 'focusmanager', 'keystrokehandler', 'lang',
'plugins', 'tools', 'ui'
],
'editor_basic': [ 'event' ], 'editor_basic': [ 'event' ],
'env': [], 'env': [],
'event': [], 'event': [],
@ -63,6 +75,7 @@ if ( !CKEDITOR.loader ) {
'htmlparser/node': [ 'htmlparser' ], 'htmlparser/node': [ 'htmlparser' ],
'keystrokehandler': [ 'event' ], 'keystrokehandler': [ 'event' ],
'lang': [], 'lang': [],
'log': [ 'ckeditor_basic' ],
'plugins': [ 'resourcemanager' ], 'plugins': [ 'resourcemanager' ],
'resourcemanager': [ 'scriptloader', 'tools' ], 'resourcemanager': [ 'scriptloader', 'tools' ],
'scriptloader': [ 'dom/element', 'env' ], 'scriptloader': [ 'dom/element', 'env' ],
@ -76,51 +89,16 @@ if ( !CKEDITOR.loader ) {
'creators/inline': [] 'creators/inline': []
}; };
var basePath = ( function() { // The production implementation contains a fixed timestamp generated by the releaser.
// This is a copy of CKEDITOR.basePath, but requires the script having
// "_source/loader.js".
if ( CKEDITOR && CKEDITOR.basePath )
return CKEDITOR.basePath;
// Find out the editor directory path, based on its <script> tag.
var path = '';
var scripts = document.getElementsByTagName( 'script' );
for ( var i = 0; i < scripts.length; i++ ) {
var match = scripts[ i ].src.match( /(^|.*?[\\\/])(?:_source\/)?core\/loader.js(?:\?.*)?$/i );
if ( match ) {
path = match[ 1 ];
break;
}
}
// In IE (only) the script.src string is the raw valued entered in the
// HTML. Other browsers return the full resolved URL instead.
if ( path.indexOf( '://' ) == -1 ) {
// Absolute path.
if ( path.indexOf( '/' ) === 0 )
path = location.href.match( /^.*?:\/\/[^\/]*/ )[ 0 ] + path;
// Relative path.
else
path = location.href.match( /^[^\?]*\// )[ 0 ] + path;
}
return path;
} )();
var timestamp = ( CKEDITOR && CKEDITOR.timestamp ) || ( new Date() ).valueOf(); // %REMOVE_LINE%
/* // %REMOVE_LINE%
* The production implementation contains a fixed timestamp // %REMOVE_LINE%
* generated by the releaser // %REMOVE_LINE%
var timestamp = '%TIMESTAMP%'; var timestamp = '%TIMESTAMP%';
*/ // %REMOVE_LINE% // The development implementation contains a current timestamp. // %REMOVE_LINE%
timestamp = ( CKEDITOR && CKEDITOR.timestamp ) || ( new Date() ).valueOf(); // %REMOVE_LINE%
var getUrl = function( resource ) { var getUrl = function( resource ) {
if ( CKEDITOR && CKEDITOR.getUrl ) if ( CKEDITOR && CKEDITOR.getUrl )
return CKEDITOR.getUrl( resource ); return CKEDITOR.getUrl( resource );
return basePath + resource + ( resource.indexOf( '?' ) >= 0 ? '&' : '?' ) + 't=' + timestamp; return CKEDITOR.basePath + resource + ( resource.indexOf( '?' ) >= 0 ? '&' : '?' ) + 't=' + timestamp;
}; };
var pendingLoad = []; var pendingLoad = [];
@ -164,9 +142,9 @@ if ( !CKEDITOR.loader ) {
} }
// We must guarantee the execution order of the scripts, so we // We must guarantee the execution order of the scripts, so we
// need to load them one by one. (#4145) // need to load them one by one. (https://dev.ckeditor.com/ticket/4145)
// The following if/else block has been taken from the scriptloader core code. // The following if/else block has been taken from the scriptloader core code.
if ( typeof( script.onreadystatechange ) !== "undefined" ) { if ( typeof script.onreadystatechange !== 'undefined' ) {
/** @ignore */ /** @ignore */
script.onreadystatechange = function() { script.onreadystatechange = function() {
if ( script.readyState == 'loaded' || script.readyState == 'complete' ) { if ( script.readyState == 'loaded' || script.readyState == 'complete' ) {
@ -178,7 +156,7 @@ if ( !CKEDITOR.loader ) {
/** @ignore */ /** @ignore */
script.onload = function() { script.onload = function() {
// Some browsers, such as Safari, may call the onLoad function // Some browsers, such as Safari, may call the onLoad function
// immediately. Which will break the loading sequence. (#3661) // immediately. Which will break the loading sequence. (https://dev.ckeditor.com/ticket/3661)
setTimeout( function() { setTimeout( function() {
onScriptLoaded( scriptName ); onScriptLoaded( scriptName );
}, 0 ); }, 0 );

View File

@ -0,0 +1,127 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
/**
* @fileOverview Defines {@link CKEDITOR#verbosity} and binary flags {@link CKEDITOR#VERBOSITY_WARN} and
* {@link CKEDITOR#VERBOSITY_ERROR}. Defines also the {@link CKEDITOR#error} and {@link CKEDITOR#warn} functions
* and the default handler for the {@link CKEDITOR#log} event.
*/
/* global console */
'use strict';
/**
* Warning reporting verbosity level. When {@link CKEDITOR#verbosity} is set to this value, only {@link CKEDITOR#warn}
* messages will be output to the console. It is a binary flag so it might be combined with
* the {@link CKEDITOR#VERBOSITY_ERROR} flag.
*
* @since 4.5.4
* @readonly
* @property {Number} [=1]
* @member CKEDITOR
*/
CKEDITOR.VERBOSITY_WARN = 1;
/**
* Error reporting verbosity level. When {@link CKEDITOR#verbosity} is set to this value, only {@link CKEDITOR#error}
* messages will be output to the console. It is a binary flag so it might be combined with
* the {@link CKEDITOR#VERBOSITY_WARN} flag.
*
* @since 4.5.4
* @readonly
* @property {Number} [=2]
* @member CKEDITOR
*/
CKEDITOR.VERBOSITY_ERROR = 2;
/**
* Verbosity of {@link CKEDITOR#error} and {@link CKEDITOR#warn} methods. Accepts binary flags
* {@link CKEDITOR#VERBOSITY_WARN} and {@link CKEDITOR#VERBOSITY_ERROR}.
*
* CKEDITOR.verbosity = 0; // No console output after CKEDITOR.warn and CKEDITOR.error methods.
* CKEDITOR.verbosity = CKEDITOR.VERBOSITY_WARN; // Console output after CKEDITOR.warn only.
* CKEDITOR.verbosity = CKEDITOR.VERBOSITY_ERROR; // Console output after CKEDITOR.error only.
* CKEDITOR.verbosity = CKEDITOR.VERBOSITY_WARN | CKEDITOR.VERBOSITY_ERROR; // Console output after both methods.
*
* Default value enables both {@link CKEDITOR#VERBOSITY_WARN} and {@link CKEDITOR#VERBOSITY_ERROR}.
*
* @since 4.5.4
* @member CKEDITOR
* @type {Number}
*/
CKEDITOR.verbosity = CKEDITOR.VERBOSITY_WARN | CKEDITOR.VERBOSITY_ERROR;
/**
* Warning reporting function. When {@link CKEDITOR#verbosity} has the {@link CKEDITOR#VERBOSITY_WARN} flag set, it fires
* the {@link CKEDITOR#log} event with type set to `warn`. Fired event contains also provided `errorCode` and `additionalData`.
*
* @since 4.5.4
* @member CKEDITOR
* @param {String} errorCode Error code describing reported problem.
* @param {Object} [additionalData] Additional data associated with reported problem.
*/
CKEDITOR.warn = function( errorCode, additionalData ) {
if ( CKEDITOR.verbosity & CKEDITOR.VERBOSITY_WARN ) {
CKEDITOR.fire( 'log', { type: 'warn', errorCode: errorCode, additionalData: additionalData } );
}
};
/**
* Error reporting function. When {@link CKEDITOR#verbosity} has {@link CKEDITOR#VERBOSITY_ERROR} flag set, it fires
* {@link CKEDITOR#log} event with the type set to `error`. The fired event also contains the provided `errorCode` and
* `additionalData`.
*
* @since 4.5.4
* @member CKEDITOR
* @param {String} errorCode Error code describing the reported problem.
* @param {Object} [additionalData] Additional data associated with the reported problem.
*/
CKEDITOR.error = function( errorCode, additionalData ) {
if ( CKEDITOR.verbosity & CKEDITOR.VERBOSITY_ERROR ) {
CKEDITOR.fire( 'log', { type: 'error', errorCode: errorCode, additionalData: additionalData } );
}
};
/**
* Fired by {@link CKEDITOR#warn} and {@link CKEDITOR#error} methods.
* Default listener logs provided information to the console.
*
* This event can be used to provide a custom error/warning handler:
*
* CKEDTIOR.on( 'log', function( evt ) {
* // Cancel default listener.
* evt.cancel();
* // Log event data.
* console.log( evt.data.type, evt.data.errorCode, evt.data.additionalData );
* } );
*
* @since 4.5.4
* @event log
* @member CKEDITOR
* @param data
* @param {String} data.type Log type. Can be `error` or `warn`.
* @param {String} data.errorCode Error code describing the reported problem.
* @param {Object} [data.additionalData] Additional data associated with this log event.
*/
CKEDITOR.on( 'log', function( evt ) {
if ( !window.console || !window.console.log ) {
return;
}
var type = console[ evt.data.type ] ? evt.data.type : 'log',
errorCode = evt.data.errorCode,
additionalData = evt.data.additionalData,
prefix = '[CKEDITOR] ',
errorCodeLabel = 'Error code: ';
if ( additionalData ) {
console[ type ]( prefix + errorCodeLabel + errorCode + '.', additionalData );
} else {
console[ type ]( prefix + errorCodeLabel + errorCode + '.' );
}
console[ type ]( prefix + 'For more information about this error go to https://docs.ckeditor.com/ckeditor4/docs/#!/guide/dev_errors-section-' + errorCode );
}, null, null, 999 );

View File

@ -1,19 +1,25 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
* @fileOverview Defines the "virtual" {@link CKEDITOR.pluginDefinition} class which * @fileOverview Defines the "virtual" {@link CKEDITOR.pluginDefinition} class which
* contains the defintion of a plugin. This file is for documentation * contains the defintion of a plugin. This file serves documentation
* purposes only. * purposes only.
*/ */
/** /**
* Virtual class which just illustrates the features of plugin objects to be * A virtual class that just illustrates the features of plugin objects which are
* passed to the {@link CKEDITOR.plugins#add} method. * passed to the {@link CKEDITOR.plugins#add} method.
* *
* This class is not really part of the API, so its constructor should not be called. * This class is not really a part of the API, so its constructor should not be called.
*
* See also:
*
* * [The Plugin SDK](#!/guide/plugin_sdk_intro)
* * [Creating a CKEditor plugin in 20 Lines of Code](#!/guide/plugin_sdk_sample)
* * [Creating a Simple Plugin Tutorial](#!/guide/plugin_sdk_sample_1)
* *
* @class CKEDITOR.pluginDefinition * @class CKEDITOR.pluginDefinition
* @abstract * @abstract
@ -24,70 +30,145 @@
* does not determine the loading order of the plugins. * does not determine the loading order of the plugins.
* *
* CKEDITOR.plugins.add( 'sample', { * CKEDITOR.plugins.add( 'sample', {
* requires: 'button,selection'
* } );
*
* Or:
*
* CKEDITOR.plugins.add( 'sample', {
* requires: [ 'button', 'selection' ] * requires: [ 'button', 'selection' ]
* } ); * } );
* *
* @property {Array} requires * @property {String/String[]} requires
*/ */
/** /**
* A list of language files available for this plugin. These files are stored inside * The list of language files available for this plugin. These files are stored inside
* the `lang` directory inside the plugin directory, follow the name * the `lang` directory in the plugin directory, follow the name
* pattern of `langCode.js`, and contain the language definition created with * pattern of `langCode.js`, and contain the language definition created with
* {@link CKEDITOR.plugins#setLang}. * {@link CKEDITOR.plugins#setLang}.
* *
* When the plugin is being loaded, the editor checks this list to see if * When the plugin is being loaded, the editor checks this list to see if
* a language file of the current editor language ({@link CKEDITOR.editor#langCode}) * a language file in the current editor language ({@link CKEDITOR.editor#langCode})
* is available, and if so, loads it. Otherwise, the file represented by the first item * is available, and if so, loads it. Otherwise, the file represented by the first item
* in the list is loaded. * in the list is loaded.
* *
* CKEDITOR.plugins.add( 'sample', { * CKEDITOR.plugins.add( 'sample', {
* lang: 'en,fr'
* } );
*
* Or:
*
* CKEDITOR.plugins.add( 'sample', {
* lang: [ 'en', 'fr' ] * lang: [ 'en', 'fr' ]
* } ); * } );
* *
* @property {Array} lang * @property {String/String[]} lang
*/ */
/** /**
* A function called on initialization of every editor instance created in the * A function called when the plugin definition is loaded for the first time.
* page before the {@link #init} call task. The `beforeInit` function will be called for * It is usually used to execute some code once for the entire page,
* all plugins, after that the `init` function is called for all of them. This * for instance code that uses the {@link CKEDITOR}'s methods such as the {@link CKEDITOR#addCss} method.
* feature makes it possible to initialize things that could be used in the
* `init` function of other plugins.
* *
* CKEDITOR.plugins.add( 'sample', { * CKEDITOR.plugins.add( 'sample', {
* beforeInit: function( editor ) { * onLoad: function() {
* alert( 'Editor "' + editor.name + '" is to be initialized!' ); * CKEDITOR.addCss( '.cke_some_class { ... }' );
* } * }
* } ); * } );
* *
* Read more about the initialization order in the {@link #init} method documentation.
*
* @method onLoad
*/
/**
* A function called on initialization of every editor instance created on the
* page before the {@link #init} call task. This feature makes it possible to
* initialize things that could be used in the `init` function of other plugins.
*
* CKEDITOR.plugins.add( 'sample1', {
* beforeInit: function( editor ) {
* editor.foo = 'bar';
* }
* } );
*
* CKEDITOR.plugins.add( 'sample2', {
* init: function( editor ) {
* // This will work regardless of order in which
* // plugins sample1 and sample2 where initialized.
* console.log( editor.foo ); // 'bar'
* }
* } );
*
* Read more about the initialization order in the {@link #init} method documentation.
*
* @method beforeInit * @method beforeInit
* @param {CKEDITOR.editor} editor The editor instance being initialized. * @param {CKEDITOR.editor} editor The editor instance being initialized.
*/ */
/** /**
* Function called on initialization of every editor instance created in the page. * A function called on initialization of every editor instance created on the page.
* *
* CKEDITOR.plugins.add( 'sample', { * CKEDITOR.plugins.add( 'sample', {
* init: function( editor ) { * init: function( editor ) {
* alert( 'Editor "' + editor.name + '" is being initialized!' ); * console.log( 'Editor "' + editor.name + '" is being initialized!' );
* } * }
* } ); * } );
* *
* Initialization order:
*
* 1. The {@link #beforeInit} methods of all enabled plugins are executed.
* 2. The {@link #init} methods of all enabled plugins are executed.
* 3. The {@link #afterInit} methods of all enabled plugins are executed.
* 4. The {@link CKEDITOR.editor#pluginsLoaded} event is fired.
*
* **Note:** The order in which the `init` methods are called does not depend on the plugins' {@link #requires requirements}
* or the order set in the {@link CKEDITOR.config#plugins} option. It may be random and therefore it is
* recommended to use the {@link #beforeInit} and {@link #afterInit} methods in order to ensure
* the right execution sequence.
*
* See also the {@link #onLoad} method.
*
* @method init * @method init
* @param {CKEDITOR.editor} editor The editor instance being initialized. * @param {CKEDITOR.editor} editor The editor instance being initialized.
*/ */
/**
* A function called on initialization of every editor instance created on the
* page after the {@link #init} call task. This feature makes it possible to use things
* that were initialized in the `init` function of other plugins.
*
* CKEDITOR.plugins.add( 'sample1', {
* afterInit: function( editor ) {
* // This will work regardless of order in which
* // plugins sample1 and sample2 where initialized.
* console.log( editor.foo ); // 'bar'
* }
* } );
*
* CKEDITOR.plugins.add( 'sample2', {
* init: function( editor ) {
* editor.foo = 'bar';
* }
* } );
*
* Read more about the initialization order in the {@link #init} method documentation.
*
* @method afterInit
* @param {CKEDITOR.editor} editor The editor instance being initialized.
*/
/** /**
* Announces the plugin as HiDPI-ready (optimized for high pixel density screens, e.g. *Retina*) * Announces the plugin as HiDPI-ready (optimized for high pixel density screens, e.g. *Retina*)
* by providing high-resolution icons and images. HiDPI icons must be twice as big * by providing high-resolution icons and images. HiDPI icons must be twice as big
* (defaults are `16px x 16px`) and stored under `plugin_name/icons/hidpi/` directory. * (defaults are `16px x 16px`) and stored under `plugin_name/icons/hidpi/` directory.
* *
* The common place for additional HiDPI images used by the plugin (**but not icons**) * The common place for additional HiDPI images used by the plugin (**but not icons**)
* is `plugin_name/images/hidpi/` directory. * is the `plugin_name/images/hidpi/` directory.
* *
* This property is optional and only makes sense if `32px x 32px` icons * This property is optional and only makes sense if `32px x 32px` icons
* and high-resolution images actually exist. If this flag is set `true`, the editor * and high-resolution images actually exist. If this flag is set to `true`, the editor
* will automatically detect the HiDPI environment and attempt to load the * will automatically detect the HiDPI environment and attempt to load the
* high-resolution resources. * high-resolution resources.
* *

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -71,7 +71,7 @@ CKEDITOR.resourceManager.prototype = {
*/ */
add: function( name, definition ) { add: function( name, definition ) {
if ( this.registered[ name ] ) if ( this.registered[ name ] )
throw '[CKEDITOR.resourceManager.add] The resource name "' + name + '" is already registered.'; throw new Error( '[CKEDITOR.resourceManager.add] The resource name "' + name + '" is already registered.' );
var resource = this.registered[ name ] = definition || {}; var resource = this.registered[ name ] = definition || {};
resource.name = name; resource.name = name;
@ -124,13 +124,13 @@ CKEDITOR.resourceManager.prototype = {
* Registers one or more resources to be loaded from an external path * Registers one or more resources to be loaded from an external path
* instead of the core base path. * instead of the core base path.
* *
* // Loads a plugin from '/myplugin/samples/plugin.js'. * // Loads a plugin from '/myplugins/sample/plugin.js'.
* CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/' ); * CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/' );
* *
* // Loads a plugin from '/myplugin/samples/my_plugin.js'. * // Loads a plugin from '/myplugins/sample/my_plugin.js'.
* CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/', 'my_plugin.js' ); * CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/', 'my_plugin.js' );
* *
* // Loads a plugin from '/myplugin/samples/my_plugin.js'. * // Loads a plugin from '/myplugins/sample/my_plugin.js'.
* CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/my_plugin.js', '' ); * CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/my_plugin.js', '' );
* *
* @param {String} names The resource names, separated by commas. * @param {String} names The resource names, separated by commas.
@ -201,14 +201,15 @@ CKEDITOR.resourceManager.prototype = {
if ( !( url in urlsNames ) ) if ( !( url in urlsNames ) )
urlsNames[ url ] = []; urlsNames[ url ] = [];
urlsNames[ url ].push( name ); urlsNames[ url ].push( name );
} else } else {
resources[ name ] = this.get( name ); resources[ name ] = this.get( name );
} }
}
CKEDITOR.scriptLoader.load( urls, function( completed, failed ) { CKEDITOR.scriptLoader.load( urls, function( completed, failed ) {
if ( failed.length ) { if ( failed.length ) {
throw '[CKEDITOR.resourceManager.load] Resource name "' + urlsNames[ failed[ 0 ] ].join( ',' ) throw new Error( '[CKEDITOR.resourceManager.load] Resource name "' + urlsNames[ failed[ 0 ] ].join( ',' ) +
+ '" was not found at "' + failed[ 0 ] + '".'; '" was not found at "' + failed[ 0 ] + '".' );
} }
for ( var i = 0; i < completed.length; i++ ) { for ( var i = 0; i < completed.length; i++ ) {

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -115,11 +115,12 @@ CKEDITOR.scriptLoader = ( function() {
var script = new CKEDITOR.dom.element( 'script' ); var script = new CKEDITOR.dom.element( 'script' );
script.setAttributes( { script.setAttributes( {
type: 'text/javascript', type: 'text/javascript',
src: url } ); src: url
} );
if ( callback ) { if ( callback ) {
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 11 ) { // The onload or onerror event does not fire in IE8 and IE9 Quirks Mode (https://dev.ckeditor.com/ticket/14849).
// FIXME: For IE, we are not able to return false on error (like 404). if ( CKEDITOR.env.ie && ( CKEDITOR.env.version <= 8 || CKEDITOR.env.ie9Compat ) ) {
script.$.onreadystatechange = function() { script.$.onreadystatechange = function() {
if ( script.$.readyState == 'loaded' || script.$.readyState == 'complete' ) { if ( script.$.readyState == 'loaded' || script.$.readyState == 'complete' ) {
script.$.onreadystatechange = null; script.$.onreadystatechange = null;
@ -129,13 +130,12 @@ CKEDITOR.scriptLoader = ( function() {
} else { } else {
script.$.onload = function() { script.$.onload = function() {
// Some browsers, such as Safari, may call the onLoad function // Some browsers, such as Safari, may call the onLoad function
// immediately. Which will break the loading sequence. (#3661) // immediately. Which will break the loading sequence. (https://dev.ckeditor.com/ticket/3661)
setTimeout( function() { setTimeout( function() {
onLoad( url, true ); onLoad( url, true );
}, 0 ); }, 0 );
}; };
// FIXME: Opera and Safari will not fire onerror.
script.$.onerror = function() { script.$.onerror = function() {
onLoad( url, false ); onLoad( url, false );
}; };

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -51,8 +51,9 @@
CKEDITOR.scriptLoader.load( CKEDITOR.getUrl( getConfigPath() + 'skin.js' ), function() { CKEDITOR.scriptLoader.load( CKEDITOR.getUrl( getConfigPath() + 'skin.js' ), function() {
loadCss( part, fn ); loadCss( part, fn );
} ); } );
} else } else {
loadCss( part, fn ); loadCss( part, fn );
}
}, },
/** /**
@ -85,7 +86,7 @@
this.icons[ name ] = { this.icons[ name ] = {
path: path, path: path,
offset: offset || 0, offset: offset || 0,
bgsize : bgsize || '16px' bgsize: bgsize || '16px'
}; };
} }
}, },
@ -124,8 +125,12 @@
offset = overrideOffset || ( icon && icon.offset ); offset = overrideOffset || ( icon && icon.offset );
bgsize = overrideBgsize || ( icon && icon.bgsize ) || '16px'; bgsize = overrideBgsize || ( icon && icon.bgsize ) || '16px';
// If we use apostrophes in background-image, we must escape apostrophes in path (just to be sure). (https://dev.ckeditor.com/ticket/13361)
if ( path )
path = path.replace( /'/g, '\\\'' );
return path && return path &&
( 'background-image:url(' + CKEDITOR.getUrl( path ) + ');background-position:0 ' + offset + 'px;background-size:' + bgsize + ';' ); ( 'background-image:url(\'' + CKEDITOR.getUrl( path ) + '\');background-position:0 ' + offset + 'px;background-size:' + bgsize + ';' );
} }
}; };
@ -135,7 +140,9 @@
if ( uas ) { if ( uas ) {
// Having versioned UA checked first. // Having versioned UA checked first.
uas = uas.split( ',' ).sort( function( a, b ) { return a > b ? -1 : 1; } ); uas = uas.split( ',' ).sort( function( a, b ) {
return a > b ? -1 : 1;
} );
// Loop through all ua entries, checking is any of them match the current ua. // Loop through all ua entries, checking is any of them match the current ua.
for ( var i = 0, ua; i < uas.length; i++ ) { for ( var i = 0, ua; i < uas.length; i++ ) {
@ -192,16 +199,24 @@
var uiStyle = getStylesheet( CKEDITOR.document ); var uiStyle = getStylesheet( CKEDITOR.document );
return ( this.setUiColor = function( color ) { return ( this.setUiColor = function( color ) {
var chameleon = CKEDITOR.skin.chameleon;
var replace = [ [ uiColorRegexp, color ] ];
this.uiColor = color; this.uiColor = color;
var chameleon = CKEDITOR.skin.chameleon,
editorStyleContent = '',
panelStyleContent = '';
if ( typeof chameleon == 'function' ) {
editorStyleContent = chameleon( this, 'editor' );
panelStyleContent = chameleon( this, 'panel' );
}
var replace = [ [ uiColorRegexp, color ] ];
// Update general style. // Update general style.
updateStylesheets( [ uiStyle ], chameleon( this, 'editor' ), replace ); updateStylesheets( [ uiStyle ], editorStyleContent, replace );
// Update panel styles. // Update panel styles.
updateStylesheets( uiColorMenus, chameleon( this, 'panel' ), replace ); updateStylesheets( uiColorMenus, panelStyleContent, replace );
} ).call( this, color ); } ).call( this, color );
} }
} ); } );
@ -214,8 +229,8 @@
var node = document.getById( uiColorStylesheetId ); var node = document.getById( uiColorStylesheetId );
if ( !node ) { if ( !node ) {
node = document.getHead().append( 'style' ); node = document.getHead().append( 'style' );
node.setAttribute( "id", uiColorStylesheetId ); node.setAttribute( 'id', uiColorStylesheetId );
node.setAttribute( "type", "text/css" ); node.setAttribute( 'type', 'text/css' );
} }
return node; return node;
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -9,12 +9,7 @@
*/ */
( function() { ( function() {
var cache = {}, var rePlaceholder = /{([^}]+)}/g;
rePlaceholder = /{([^}]+)}/g,
reQuote = /'/g,
reEscapableChars = /([\\'])/g,
reNewLine = /\n/g,
reCarriageReturn = /\r/g;
/** /**
* Lightweight template used to build the output string from variables. * Lightweight template used to build the output string from variables.
@ -28,42 +23,35 @@
* @param {String} source The template source. * @param {String} source The template source.
*/ */
CKEDITOR.template = function( source ) { CKEDITOR.template = function( source ) {
// Builds an optimized function body for the output() method, focused on performance. /**
// For example, if we have this "source": * The current template source.
// '<div style="{style}">{editorName}</div>' *
// ... the resulting function body will be (apart from the "buffer" handling): * @readonly
// return [ '<div style="', data['style'] == undefined ? '{style}' : data['style'], '">', data['editorName'] == undefined ? '{editorName}' : data['editorName'], '</div>' ].join(''); * @member CKEDITOR.template
* @property {String}
// Try to read from the cache. */
if ( cache[ source ] ) this.source = String( source );
this.output = cache[ source ];
else {
var fn = source
// Escape chars like slash "\" or single quote "'".
.replace( reEscapableChars, '\\$1' )
.replace( reNewLine, '\\n' )
.replace( reCarriageReturn, '\\r' )
// Inject the template keys replacement.
.replace( rePlaceholder, function( m, key ) {
return "',data['" + key + "']==undefined?'{" + key + "}':data['" + key + "'],'";
} );
fn = "return buffer?buffer.push('" + fn + "'):['" + fn + "'].join('');";
this.output = cache[ source ] = Function( 'data', 'buffer', fn );
}
}; };
} )();
/** /**
* Processes the template, filling its variables with the provided data. * Processes the template, filling its variables with the provided data.
* *
* @method output * @method
* @param {Object} data An object containing properties which values will be * @member CKEDITOR.template
* @param {Object} data An object containing properties whose values will be
* used to fill the template variables. The property names must match the * used to fill the template variables. The property names must match the
* template variables names. Variables without matching properties will be * template variables names. Variables without matching properties will be
* kept untouched. * kept untouched.
* @param {Array} [buffer] An array into which the output data will be pushed into. * @param {Array} [buffer] An array that the output data will be pushed into.
* The number of entries appended to the array is unknown. * The number of entries appended to the array is unknown.
* @returns {String/Number} If `buffer` has not been provided, the processed * @returns {String/Number} If `buffer` has not been provided, the processed
* template output data, otherwise the new length of `buffer`. * template output data; otherwise the new length of `buffer`.
*/ */
CKEDITOR.template.prototype.output = function( data, buffer ) {
var output = this.source.replace( rePlaceholder, function( fullMatch, dataKey ) {
return data[ dataKey ] !== undefined ? data[ dataKey ] : fullMatch;
} );
return buffer ? buffer.push( output ) : output;
};
} )();

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -8,7 +8,7 @@
* *
* @class * @class
* @mixins CKEDITOR.event * @mixins CKEDITOR.event
* @constructor Creates an ui class instance. * @constructor Creates a `ui` class instance.
* @param {CKEDITOR.editor} editor The editor instance. * @param {CKEDITOR.editor} editor The editor instance.
*/ */
CKEDITOR.ui = function( editor ) { CKEDITOR.ui = function( editor ) {
@ -20,7 +20,7 @@ CKEDITOR.ui = function( editor ) {
this.editor = editor; this.editor = editor;
/** /**
* Object used to hold private stuff. * Object used to store private stuff.
* *
* @private * @private
*/ */
@ -64,7 +64,7 @@ CKEDITOR.ui.prototype = {
}, },
/** /**
* Retrieve the created ui objects by name. * Retrieves the created UI objects by name.
* *
* @param {String} name The name of the UI definition. * @param {String} name The name of the UI definition.
*/ */
@ -75,7 +75,7 @@ CKEDITOR.ui.prototype = {
/** /**
* Gets a UI object. * Gets a UI object.
* *
* @param {String} name The UI item hame. * @param {String} name The UI item name.
* @returns {Object} The UI element. * @returns {Object} The UI element.
*/ */
create: function( name ) { create: function( name ) {
@ -99,7 +99,7 @@ CKEDITOR.ui.prototype = {
/** /**
* Adds a handler for a UI item type. The handler is responsible for * Adds a handler for a UI item type. The handler is responsible for
* transforming UI item definitions in UI objects. * transforming UI item definitions into UI objects.
* *
* @param {Object} type The item type. * @param {Object} type The item type.
* @param {Object} handler The handler definition. * @param {Object} handler The handler definition.
@ -109,15 +109,15 @@ CKEDITOR.ui.prototype = {
}, },
/** /**
* Returns the unique DOM element that represents one editor's UI part, as * Returns the unique DOM element that represents one editor's UI part, also known as "space".
* the editor UI is made completely decoupled from DOM (no DOM reference hold), * There are 3 main editor spaces available: `top`, `contents` and `bottom`
* this method is mainly used to retrieve the rendered DOM part by name. * and their availability depends on editor type.
* *
* // Hide the bottom space in the UI. * // Hide the bottom space in the UI.
* var bottom = editor.ui.getSpace( 'bottom' ); * var bottom = editor.ui.space( 'bottom' );
* bottom.setStyle( 'display', 'none' ); * bottom.setStyle( 'display', 'none' );
* *
* @param {String} name The space name. * @param {String} name The name of the space.
* @returns {CKEDITOR.dom.element} The element that represents the space. * @returns {CKEDITOR.dom.element} The element that represents the space.
*/ */
space: function( name ) { space: function( name ) {
@ -125,10 +125,10 @@ CKEDITOR.ui.prototype = {
}, },
/** /**
* Generate the HTML ID from a specific UI space name. * Returns the HTML ID for a specific UI space name.
* *
* @param name * @param {String} name The name of the space.
* @todo param and return types? * @returns {String} The ID of an element representing this space in the DOM.
*/ */
spaceId: function( name ) { spaceId: function( name ) {
return this.editor.id + '_' + name; return this.editor.id + '_' + name;
@ -141,19 +141,19 @@ CKEDITOR.event.implementOn( CKEDITOR.ui );
* Internal event fired when a new UI element is ready. * Internal event fired when a new UI element is ready.
* *
* @event ready * @event ready
* @param {Object} data The new element. * @param {Object} data The new UI element.
*/ */
/** /**
* Virtual class which just illustrates the features of handler objects to be * Virtual class which just illustrates the features of handler objects to be
* passed to the {@link CKEDITOR.ui#addHandler} function. * passed to the {@link CKEDITOR.ui#addHandler} function.
* This class is not really part of the API, so don't call its constructor. * This class is not really a part of the API, so do not call its constructor.
* *
* @class CKEDITOR.ui.handlerDefinition * @class CKEDITOR.ui.handlerDefinition
*/ */
/** /**
* Transforms an item definition into an UI item object. * Transforms an item definition into a UI item object.
* *
* editorInstance.ui.addHandler( CKEDITOR.UI_BUTTON, { * editorInstance.ui.addHandler( CKEDITOR.UI_BUTTON, {
* create: function( definition ) { * create: function( definition ) {
@ -166,3 +166,20 @@ CKEDITOR.event.implementOn( CKEDITOR.ui );
* @returns {Object} The UI element. * @returns {Object} The UI element.
* @todo We lack the "UI element" abstract super class. * @todo We lack the "UI element" abstract super class.
*/ */
/**
* The element in the {@link CKEDITOR#document host page's document} that contains the editor content.
* If the [fixed editor UI](#!/guide/dev_uitypes-section-fixed-user-interface) is used, then it will be set to
* `editor.ui.space( 'contents' )` &mdash; i.e. the `<div>` which contains the editor `<iframe>` (in case of classic editor)
* or {@link CKEDITOR.editable} (in case of inline editor). Otherwise it is set to the {@link CKEDITOR.editable} itself.
*
* Use the position of this element if you need to position elements placed in the host page's document relatively to the
* editor content.
*
* var editor = CKEDITOR.instances.editor1;
* console.log( editor.ui.contentsElement.getName() ); // 'div'
*
* @since 4.5
* @readonly
* @property {CKEDITOR.dom.element} contentsElement
*/

View File

@ -1,5 +1,5 @@
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
af.js Found: 62 Missing: 4 af.js Found: 62 Missing: 4
ar.js Found: 51 Missing: 15 ar.js Found: 51 Missing: 15

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -19,8 +19,8 @@
*/ */
CKEDITOR.lang[ 'af' ] = { CKEDITOR.lang[ 'af' ] = {
// ARIA description. // ARIA description.
editor: 'Teksverwerker', editor: 'Woordverwerker',
editorPanel: 'Rich Text Editor panel', // MISSING editorPanel: 'Woordverwerkerpaneel',
// Common messages and labels. // Common messages and labels.
common: { common: {
@ -32,18 +32,18 @@ CKEDITOR.lang[ 'af' ] = {
url: 'URL', url: 'URL',
protocol: 'Protokol', protocol: 'Protokol',
upload: 'Oplaai', upload: 'Oplaai',
uploadSubmit: 'Stuur na bediener', uploadSubmit: 'Stuur aan die bediener',
image: 'Afbeelding', image: 'Beeld',
flash: 'Flash', flash: 'Flash',
form: 'Vorm', form: 'Vorm',
checkbox: 'Merkhokkie', checkbox: 'Merkhokkie',
radio: 'Radioknoppie', radio: 'Radioknoppie',
textField: 'Teksveld', textField: 'Teksveld',
textarea: 'Teks-area', textarea: 'Teksarea',
hiddenField: 'Blinde veld', hiddenField: 'Versteekteveld',
button: 'Knop', button: 'Knop',
select: 'Keuseveld', select: 'Keuseveld',
imageButton: 'Afbeeldingsknop', imageButton: 'Beeldknop',
notSet: '<geen instelling>', notSet: '<geen instelling>',
id: 'Id', id: 'Id',
name: 'Naam', name: 'Naam',
@ -59,14 +59,14 @@ CKEDITOR.lang[ 'af' ] = {
cancel: 'Kanselleer', cancel: 'Kanselleer',
close: 'Sluit', close: 'Sluit',
preview: 'Voorbeeld', preview: 'Voorbeeld',
resize: 'Sleep om te herskaal', resize: 'Skalierung',
generalTab: 'Algemeen', generalTab: 'Algemeen',
advancedTab: 'Gevorderd', advancedTab: 'Gevorderd',
validateNumberFailed: 'Hierdie waarde is nie \'n getal nie.', validateNumberFailed: 'Hierdie waarde is nie \'n nommer nie.',
confirmNewPage: 'Alle wysiginge sal verlore gaan. Is u seker dat u \'n nuwe bladsy wil laai?', confirmNewPage: 'Alle wysiginge sal verlore gaan. Is jy seker dat jy \'n nuwe bladsy wil laai?',
confirmCancel: 'Sommige opsies is gewysig. Is u seker dat u hierdie dialoogvenster wil sluit?', confirmCancel: 'Sommige opsies is gewysig. Is jy seker dat jy hierdie dialoogvenster wil sluit?',
options: 'Opsies', options: 'Opsies',
target: 'Doel', target: 'Teiken',
targetNew: 'Nuwe venster (_blank)', targetNew: 'Nuwe venster (_blank)',
targetTop: 'Boonste venster (_top)', targetTop: 'Boonste venster (_top)',
targetSelf: 'Selfde venster (_self)', targetSelf: 'Selfde venster (_self)',
@ -77,22 +77,71 @@ CKEDITOR.lang[ 'af' ] = {
cssClasses: 'CSS klasse', cssClasses: 'CSS klasse',
width: 'Breedte', width: 'Breedte',
height: 'Hoogte', height: 'Hoogte',
align: 'Oplyn', align: 'Orienteerung',
alignLeft: 'Links', left: 'Links',
alignRight: 'Regs', right: 'Regs',
alignCenter: 'Sentreer', center: 'Middel',
justify: 'Eweredig',
alignLeft: 'Links oplyn',
alignRight: 'Regs oplyn',
alignCenter: 'Align Center', // MISSING
alignTop: 'Bo', alignTop: 'Bo',
alignMiddle: 'Middel', alignMiddle: 'Middel',
alignBottom: 'Onder', alignBottom: 'Onder',
invalidValue : 'Invalid value.', // MISSING alignNone: 'Geen',
invalidValue: 'Ongeldige waarde',
invalidHeight: 'Hoogte moet \'n getal wees', invalidHeight: 'Hoogte moet \'n getal wees',
invalidWidth: 'Breedte moet \'n getal wees.', invalidWidth: 'Breedte moet \'n getal wees.',
invalidCssLength: 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidHtmlLength: 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).', // MISSING invalidCssLength: 'Die waarde vir die "%1" veld moet \'n posetiewe getal wees met of sonder \'n geldige CSS eenheid (px, %, in, cm, mm, em, ex, pt, of pc).',
invalidInlineStyle: 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.', // MISSING invalidHtmlLength: 'Die waarde vir die "%1" veld moet \'n posetiewe getal wees met of sonder \'n geldige HTML eenheid (px of %).',
cssLengthTooltip: 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING invalidInlineStyle: 'Ongeldige CSS. Formaat is een of meer sleutel-wert paare, "naam : wert" met kommapunte gesky.',
cssLengthTooltip: 'Voeg \'n getal wert in pixel in, of \'n waarde met geldige CSS eenheid (px, %, in, cm, mm, em, ex, pt, of pc).',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, nie beskikbaar nie</span>' unavailable: '%1<span class="cke_accessibility">, nie beskikbaar nie</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Backspace',
13: 'Enter',
16: 'Skuif',
17: 'Ctrl',
18: 'Alt',
32: 'Spasie',
35: 'Einde',
36: 'Tuis',
46: 'Verwyder',
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Bevel'
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Sleutel kombenasie',
optionDefault: 'Default' // MISSING
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -78,21 +78,70 @@ CKEDITOR.lang[ 'ar' ] = {
width: 'العرض', width: 'العرض',
height: 'الإرتفاع', height: 'الإرتفاع',
align: 'محاذاة', align: 'محاذاة',
alignLeft: 'يسار', left: 'يسار',
alignRight: 'يمين', right: 'يمين',
alignCenter: 'وسط', center: 'وسط',
justify: 'ضبط',
alignLeft: 'محاذاة إلى اليسار',
alignRight: 'محاذاة إلى اليمين',
alignCenter: 'Align Center', // MISSING
alignTop: 'أعلى', alignTop: 'أعلى',
alignMiddle: 'وسط', alignMiddle: 'وسط',
alignBottom: 'أسفل', alignBottom: 'أسفل',
invalidValue : 'قيمة غير مفبولة.', alignNone: 'None', // MISSING
invalidValue: 'قيمة غير مفبولة.',
invalidHeight: 'الارتفاع يجب أن يكون عدداً.', invalidHeight: 'الارتفاع يجب أن يكون عدداً.',
invalidWidth: 'العرض يجب أن يكون عدداً.', invalidWidth: 'العرض يجب أن يكون عدداً.',
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidCssLength: 'قيمة الخانة المخصصة لـ "%1" يجب أن تكون رقما موجبا، باستخدام أو من غير استخدام وحدة CSS قياس مقبولة (px, %, in, cm, mm, em, ex, pt, or pc).', invalidCssLength: 'قيمة الخانة المخصصة لـ "%1" يجب أن تكون رقما موجبا، باستخدام أو من غير استخدام وحدة CSS قياس مقبولة (px, %, in, cm, mm, em, ex, pt, or pc).',
invalidHtmlLength: 'قيمة الخانة المخصصة لـ "%1" يجب أن تكون رقما موجبا، باستخدام أو من غير استخدام وحدة HTML قياس مقبولة (px or %).', invalidHtmlLength: 'قيمة الخانة المخصصة لـ "%1" يجب أن تكون رقما موجبا، باستخدام أو من غير استخدام وحدة HTML قياس مقبولة (px or %).',
invalidInlineStyle: 'قيمة الخانة المخصصة لـ Inline Style يجب أن تختوي على مجموع واحد أو أكثر بالشكل التالي: "name : value", مفصولة بفاصلة منقزطة.', invalidInlineStyle: 'قيمة الخانة المخصصة لـ Inline Style يجب أن تختوي على مجموع واحد أو أكثر بالشكل التالي: "name : value", مفصولة بفاصلة منقزطة.',
cssLengthTooltip: 'أدخل رقما للقيمة بالبكسل أو رقما بوحدة CSS مقبولة (px, %, in, cm, mm, em, ex, pt, or pc).', cssLengthTooltip: 'أدخل رقما للقيمة بالبكسل أو رقما بوحدة CSS مقبولة (px, %, in, cm, mm, em, ex, pt, or pc).',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, غير متاح</span>' unavailable: '%1<span class="cke_accessibility">, غير متاح</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Backspace', // MISSING
13: 'Enter', // MISSING
16: 'Shift', // MISSING
17: 'Ctrl', // MISSING
18: 'Alt', // MISSING
32: 'Space', // MISSING
35: 'End', // MISSING
36: 'Home', // MISSING
46: 'Delete', // MISSING
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Command' // MISSING
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Keyboard shortcut', // MISSING
optionDefault: 'Default' // MISSING
} }
}; };

View File

@ -0,0 +1,147 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
/**
* @fileOverview Defines the {@link CKEDITOR.lang} object for the
* Azerbaijani language.
*/
/**#@+
@type String
@example
*/
/**
* Contains the dictionary of language entries.
* @namespace
*/
CKEDITOR.lang[ 'az' ] = {
// ARIA description.
editor: 'Mətn Redaktoru',
editorPanel: 'Mətn Redaktorun Paneli',
// Common messages and labels.
common: {
// Screenreader titles. Please note that screenreaders are not always capable
// of reading non-English words. So be careful while translating it.
editorHelp: 'Yardım üçün ALT 0 düymələrini basın',
browseServer: 'Fayların siyahı',
url: 'URL',
protocol: 'Protokol',
upload: 'Serverə yüklə',
uploadSubmit: 'Göndər',
image: 'Şəkil',
flash: 'Flash',
form: 'Forma',
checkbox: 'Çekboks',
radio: 'Radio düyməsi',
textField: 'Mətn xanası',
textarea: 'Mətn',
hiddenField: 'Gizli xana',
button: 'Düymə',
select: 'Opsiyaların seçilməsi',
imageButton: 'Şəkil tipli düymə',
notSet: '<seçilməmiş>',
id: 'Id',
name: 'Ad',
langDir: 'Yaziların istiqaməti',
langDirLtr: 'Soldan sağa (LTR)',
langDirRtl: 'Sağdan sola (RTL)',
langCode: 'Dilin kodu',
longDescr: 'URL-ın ətraflı izahı',
cssClass: 'CSS klassları',
advisoryTitle: 'Başlıq',
cssStyle: 'CSS',
ok: 'Tədbiq et',
cancel: 'İmtina et',
close: 'Bağla',
preview: 'Baxış',
resize: 'Eni dəyiş',
generalTab: 'Əsas',
advancedTab: 'Əlavə',
validateNumberFailed: 'Rəqəm deyil.',
confirmNewPage: 'Yadda saxlanılmamış dəyişikliklər itiriləcək. Davam etmək istədiyinizə əminsinizmi?',
confirmCancel: 'Dəyişikliklər edilib. Pəncərəni bağlamaq istəyirsizə əminsinizmi?',
options: 'Seçimlər',
target: 'Hədəf çərçivə',
targetNew: 'Yeni pəncərə (_blank)',
targetTop: 'Əsas pəncərə (_top)',
targetSelf: 'Carı pəncərə (_self)',
targetParent: 'Ana pəncərə (_parent)',
langDirLTR: 'Soldan sağa (LTR)',
langDirRTL: 'Sağdan sola (RTL)',
styles: 'Üslub',
cssClasses: 'Üslub klası',
width: 'En',
height: 'Uzunluq',
align: 'Yerləşmə',
left: 'Sol',
right: 'Sağ',
center: 'Mərkəz',
justify: 'Eninə görə',
alignLeft: 'Soldan düzləndir',
alignRight: 'Sağdan düzləndir',
alignCenter: 'Align Center', // MISSING
alignTop: 'Yuxarı',
alignMiddle: 'Orta',
alignBottom: 'Aşağı',
alignNone: 'Yoxdur',
invalidValue: 'Yanlışdır.',
invalidHeight: 'Hündürlük rəqəm olmalıdır.',
invalidWidth: 'En rəqəm olmalıdır.',
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidCssLength: '"%1" xanasında göstərilən məzmun tam və müsbət olmalıdır, CSS-də olan ölçü vahidlərin (px, %, in, cm, mm, em, ex, pt, or pc) istifadısinə icazə verilir.',
invalidHtmlLength: '"%1" xanasında göstərilən məzmun tam və müsbət olmalıdır HTML-də olan ölçü vahidlərin (px və ya %) istifadısinə icazə verilir.',
invalidInlineStyle: 'Teq içində olan üslub "ad : məzmun" şəklidə, nöqtə-verqül işarəsi ilə bitməlidir',
cssLengthTooltip: 'Piksel sayı və ya digər CSS ölçü vahidləri (px, %, in, cm, mm, em, ex, pt, or pc) daxil edin.',
// Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, mövcud deyil</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Backspace',
13: 'Enter',
16: 'Shift',
17: 'Ctrl',
18: 'Alt',
32: 'Boşluq',
35: 'Son',
36: 'Evə',
46: 'Sil',
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Əmr'
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Qısayol düymələri',
optionDefault: 'Default' // MISSING
}
};

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -20,7 +20,7 @@
CKEDITOR.lang[ 'bg' ] = { CKEDITOR.lang[ 'bg' ] = {
// ARIA description. // ARIA description.
editor: 'Текстов редактор за форматиран текст', editor: 'Текстов редактор за форматиран текст',
editorPanel: 'Rich Text Editor panel', // MISSING editorPanel: 'Панел на текстовия редактор',
// Common messages and labels. // Common messages and labels.
common: { common: {
@ -78,21 +78,70 @@ CKEDITOR.lang[ 'bg' ] = {
width: 'Ширина', width: 'Ширина',
height: 'Височина', height: 'Височина',
align: 'Подравняване', align: 'Подравняване',
alignLeft: 'Ляво', left: 'Ляво',
alignRight: 'Дясно', right: 'Дясно',
alignCenter: 'Център', center: 'Център',
justify: 'Двустранно подравняване',
alignLeft: 'Подравни в ляво',
alignRight: 'Подравни в дясно',
alignCenter: 'Align Center', // MISSING
alignTop: 'Горе', alignTop: 'Горе',
alignMiddle: 'По средата', alignMiddle: 'По средата',
alignBottom: 'Долу', alignBottom: 'Долу',
invalidValue : 'Невалидна стойност.', alignNone: 'Без подравняване',
invalidValue: 'Невалидна стойност.',
invalidHeight: 'Височината трябва да е число.', invalidHeight: 'Височината трябва да е число.',
invalidWidth: 'Ширина требе да е число.', invalidWidth: 'Ширина требе да е число.',
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidCssLength: 'Стойността на полето "%1" трябва да бъде положително число с или без валидна CSS измервателна единица (px, %, in, cm, mm, em, ex, pt, или pc).', invalidCssLength: 'Стойността на полето "%1" трябва да бъде положително число с или без валидна CSS измервателна единица (px, %, in, cm, mm, em, ex, pt, или pc).',
invalidHtmlLength: 'Стойността на полето "%1" трябва да бъде положително число с или без валидна HTML измервателна единица (px или %).', invalidHtmlLength: 'Стойността на полето "%1" трябва да бъде положително число с или без валидна HTML измервателна единица (px или %).',
invalidInlineStyle: 'Стойността на стилa трябва да съдържат една или повече двойки във формат "name : value", разделени с двоеточие.', invalidInlineStyle: 'Стойността на стилa трябва да съдържат една или повече двойки във формат "name : value", разделени с двоеточие.',
cssLengthTooltip: 'Въведете числена стойност в пиксели или друга валидна CSS единица (px, %, in, cm, mm, em, ex, pt, или pc).', cssLengthTooltip: 'Въведете числена стойност в пиксели или друга валидна CSS единица (px, %, in, cm, mm, em, ex, pt, или pc).',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, недостъпно</span>' unavailable: '%1<span class="cke_accessibility">, недостъпно</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Backspace', // MISSING
13: 'Enter', // MISSING
16: 'Shift', // MISSING
17: 'Ctrl', // MISSING
18: 'Alt', // MISSING
32: 'Space', // MISSING
35: 'End', // MISSING
36: 'Home', // MISSING
46: 'Delete', // MISSING
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Command' // MISSING
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Keyboard shortcut', // MISSING
optionDefault: 'Default' // MISSING
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -78,21 +78,70 @@ CKEDITOR.lang[ 'bn' ] = {
width: 'প্রস্থ', width: 'প্রস্থ',
height: 'দৈর্ঘ্য', height: 'দৈর্ঘ্য',
align: 'এলাইন', align: 'এলাইন',
alignLeft: 'বামে', left: 'বামে',
alignRight: 'ডানে', right: 'ডানে',
alignCenter: 'মাঝখানে', center: 'মাঝখানে',
justify: 'ব্লক জাস্টিফাই',
alignLeft: 'বা দিকে ঘেঁষা',
alignRight: 'ডান দিকে ঘেঁষা',
alignCenter: 'Align Center', // MISSING
alignTop: 'উপর', alignTop: 'উপর',
alignMiddle: 'মধ্য', alignMiddle: 'মধ্য',
alignBottom: 'নীচে', alignBottom: 'নীচে',
invalidValue : 'Invalid value.', // MISSING alignNone: 'None', // MISSING
invalidValue: 'Invalid value.', // MISSING
invalidHeight: 'Height must be a number.', // MISSING invalidHeight: 'Height must be a number.', // MISSING
invalidWidth: 'Width must be a number.', // MISSING invalidWidth: 'Width must be a number.', // MISSING
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidCssLength: 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING invalidCssLength: 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
invalidHtmlLength: 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).', // MISSING invalidHtmlLength: 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).', // MISSING
invalidInlineStyle: 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.', // MISSING invalidInlineStyle: 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.', // MISSING
cssLengthTooltip: 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING cssLengthTooltip: 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, unavailable</span>' // MISSING unavailable: '%1<span class="cke_accessibility">, unavailable</span>', // MISSING
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Backspace', // MISSING
13: 'Enter', // MISSING
16: 'Shift', // MISSING
17: 'Ctrl', // MISSING
18: 'Alt', // MISSING
32: 'Space', // MISSING
35: 'End', // MISSING
36: 'Home', // MISSING
46: 'Delete', // MISSING
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Command' // MISSING
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Keyboard shortcut', // MISSING
optionDefault: 'Default' // MISSING
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -78,21 +78,70 @@ CKEDITOR.lang[ 'bs' ] = {
width: 'Širina', width: 'Širina',
height: 'Visina', height: 'Visina',
align: 'Poravnanje', align: 'Poravnanje',
alignLeft: 'Lijevo', left: 'Lijevo',
alignRight: 'Desno', right: 'Desno',
alignCenter: 'Centar', center: 'Centar',
justify: 'Puno poravnanje',
alignLeft: 'Lijevo poravnanje',
alignRight: 'Desno poravnanje',
alignCenter: 'Align Center', // MISSING
alignTop: 'Vrh', alignTop: 'Vrh',
alignMiddle: 'Sredina', alignMiddle: 'Sredina',
alignBottom: 'Dno', alignBottom: 'Dno',
invalidValue : 'Invalid value.', // MISSING alignNone: 'None', // MISSING
invalidValue: 'Invalid value.', // MISSING
invalidHeight: 'Height must be a number.', // MISSING invalidHeight: 'Height must be a number.', // MISSING
invalidWidth: 'Width must be a number.', // MISSING invalidWidth: 'Width must be a number.', // MISSING
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidCssLength: 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING invalidCssLength: 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
invalidHtmlLength: 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).', // MISSING invalidHtmlLength: 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).', // MISSING
invalidInlineStyle: 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.', // MISSING invalidInlineStyle: 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.', // MISSING
cssLengthTooltip: 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING cssLengthTooltip: 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, unavailable</span>' // MISSING unavailable: '%1<span class="cke_accessibility">, unavailable</span>', // MISSING
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Backspace', // MISSING
13: 'Enter', // MISSING
16: 'Shift', // MISSING
17: 'Ctrl', // MISSING
18: 'Alt', // MISSING
32: 'Space', // MISSING
35: 'End', // MISSING
36: 'Home', // MISSING
46: 'Delete', // MISSING
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Command' // MISSING
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Keyboard shortcut', // MISSING
optionDefault: 'Default' // MISSING
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -78,21 +78,70 @@ CKEDITOR.lang[ 'ca' ] = {
width: 'Amplada', width: 'Amplada',
height: 'Alçada', height: 'Alçada',
align: 'Alineació', align: 'Alineació',
alignLeft: 'Ajusta a l\'esquerra', left: 'Ajusta a l\'esquerra',
alignRight: 'Ajusta a la dreta', right: 'Ajusta a la dreta',
alignCenter: 'Centre', center: 'Centre',
justify: 'Justificat',
alignLeft: 'Alinea a l\'esquerra',
alignRight: 'Alinea a la dreta',
alignCenter: 'Align Center', // MISSING
alignTop: 'Superior', alignTop: 'Superior',
alignMiddle: 'Centre', alignMiddle: 'Centre',
alignBottom: 'Inferior', alignBottom: 'Inferior',
invalidValue : 'Valor no vàlid.', alignNone: 'Cap',
invalidValue: 'Valor no vàlid.',
invalidHeight: 'L\'alçada ha de ser un número.', invalidHeight: 'L\'alçada ha de ser un número.',
invalidWidth: 'L\'amplada ha de ser un número.', invalidWidth: 'L\'amplada ha de ser un número.',
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidCssLength: 'El valor especificat per als "%1" camps ha de ser un número positiu amb o sense unitat de mesura vàlida de CSS (px, %, in, cm, mm, em, ex, pt o pc).', invalidCssLength: 'El valor especificat per als "%1" camps ha de ser un número positiu amb o sense unitat de mesura vàlida de CSS (px, %, in, cm, mm, em, ex, pt o pc).',
invalidHtmlLength: 'El valor especificat per als "%1" camps ha de ser un número positiu amb o sense unitat de mesura vàlida d\'HTML (px o %).', invalidHtmlLength: 'El valor especificat per als "%1" camps ha de ser un número positiu amb o sense unitat de mesura vàlida d\'HTML (px o %).',
invalidInlineStyle: 'El valor especificat per l\'estil en línia ha de constar d\'una o més tuples amb el format "name: value", separats per punt i coma.', invalidInlineStyle: 'El valor especificat per l\'estil en línia ha de constar d\'una o més tuples amb el format "name: value", separats per punt i coma.',
cssLengthTooltip: 'Introduïu un número per un valor en píxels o un número amb una unitat vàlida de CSS (px, %, in, cm, mm, em, ex, pt o pc).', cssLengthTooltip: 'Introduïu un número per un valor en píxels o un número amb una unitat vàlida de CSS (px, %, in, cm, mm, em, ex, pt o pc).',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, no disponible</span>' unavailable: '%1<span class="cke_accessibility">, no disponible</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Retrocés',
13: 'Intro',
16: 'Majúscules',
17: 'Ctrl',
18: 'Alt',
32: 'Space', // MISSING
35: 'Fi',
36: 'Inici',
46: 'Eliminar',
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Command' // MISSING
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Keyboard shortcut', // MISSING
optionDefault: 'Default' // MISSING
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -78,21 +78,70 @@ CKEDITOR.lang[ 'cs' ] = {
width: 'Šířka', width: 'Šířka',
height: 'Výška', height: 'Výška',
align: 'Zarovnání', align: 'Zarovnání',
alignLeft: 'Vlevo', left: 'Vlevo',
alignRight: 'Vpravo', right: 'Vpravo',
alignCenter: 'Na střed', center: 'Na střed',
justify: 'Zarovnat do bloku',
alignLeft: 'Zarovnat vlevo',
alignRight: 'Zarovnat vpravo',
alignCenter: 'Align Center', // MISSING
alignTop: 'Nahoru', alignTop: 'Nahoru',
alignMiddle: 'Na střed', alignMiddle: 'Na střed',
alignBottom: 'Dolů', alignBottom: 'Dolů',
invalidValue : 'Neplatná hodnota.', alignNone: 'Žádné',
invalidValue: 'Neplatná hodnota.',
invalidHeight: 'Zadaná výška musí být číslo.', invalidHeight: 'Zadaná výška musí být číslo.',
invalidWidth: 'Šířka musí být číslo.', invalidWidth: 'Šířka musí být číslo.',
invalidLength: 'Hodnota určená pro pole "%1" musí být kladné číslo bez nebo s platnou jednotkou míry (%2).',
invalidCssLength: 'Hodnota určená pro pole "%1" musí být kladné číslo bez nebo s platnou jednotkou míry CSS (px, %, in, cm, mm, em, ex, pt, nebo pc).', invalidCssLength: 'Hodnota určená pro pole "%1" musí být kladné číslo bez nebo s platnou jednotkou míry CSS (px, %, in, cm, mm, em, ex, pt, nebo pc).',
invalidHtmlLength: 'Hodnota určená pro pole "%1" musí být kladné číslo bez nebo s platnou jednotkou míry HTML (px nebo %).', invalidHtmlLength: 'Hodnota určená pro pole "%1" musí být kladné číslo bez nebo s platnou jednotkou míry HTML (px nebo %).',
invalidInlineStyle: 'Hodnota určená pro řádkový styl se musí skládat z jedné nebo více n-tic ve formátu "název : hodnota", oddělené středníky', invalidInlineStyle: 'Hodnota určená pro řádkový styl se musí skládat z jedné nebo více n-tic ve formátu "název : hodnota", oddělené středníky',
cssLengthTooltip: 'Zadejte číslo jako hodnotu v pixelech nebo číslo s platnou jednotkou CSS (px, %, v cm, mm, em, ex, pt, nebo pc).', cssLengthTooltip: 'Zadejte číslo jako hodnotu v pixelech nebo číslo s platnou jednotkou CSS (px, %, v cm, mm, em, ex, pt, nebo pc).',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, nedostupné</span>' unavailable: '%1<span class="cke_accessibility">, nedostupné</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Backspace',
13: 'Enter',
16: 'Shift',
17: 'Ctrl',
18: 'Alt',
32: 'Mezerník',
35: 'Konec',
36: 'Domů',
46: 'Smazat',
112: 'F1',
113: 'F2',
114: 'F3',
115: 'F4',
116: 'F5',
117: 'F6',
118: 'F7',
119: 'F8',
120: 'F9',
121: 'F10',
122: 'F11',
123: 'F12',
124: 'F13',
125: 'F14',
126: 'F15',
127: 'F16',
128: 'F17',
129: 'F18',
130: 'F19',
131: 'F20',
132: 'F21',
133: 'F22',
134: 'F23',
135: 'F24',
224: 'Command'
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Klávesová zkratka',
optionDefault: 'Výchozí'
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -78,21 +78,70 @@ CKEDITOR.lang[ 'cy' ] = {
width: 'Lled', width: 'Lled',
height: 'Uchder', height: 'Uchder',
align: 'Alinio', align: 'Alinio',
alignLeft: 'Chwith', left: 'Chwith',
alignRight: 'Dde', right: 'Dde',
alignCenter: 'Canol', center: 'Canol',
justify: 'Unioni',
alignLeft: 'Alinio i\'r Chwith',
alignRight: 'Alinio i\'r Dde',
alignCenter: 'Align Center', // MISSING
alignTop: 'Brig', alignTop: 'Brig',
alignMiddle: 'Canol', alignMiddle: 'Canol',
alignBottom: 'Gwaelod', alignBottom: 'Gwaelod',
invalidValue : 'Gwerth annilys.', alignNone: 'None', // MISSING
invalidValue: 'Gwerth annilys.',
invalidHeight: 'Mae\'n rhaid i\'r uchder fod yn rhif.', invalidHeight: 'Mae\'n rhaid i\'r uchder fod yn rhif.',
invalidWidth: 'Mae\'n rhaid i\'r lled fod yn rhif.', invalidWidth: 'Mae\'n rhaid i\'r lled fod yn rhif.',
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidCssLength: 'Mae\'n rhaid i\'r gwerth ar gyfer maes "%1" fod yn rhif positif gyda neu heb uned fesuriad CSS dilys (px, %, in, cm, mm, em, ex, pt, neu pc).', invalidCssLength: 'Mae\'n rhaid i\'r gwerth ar gyfer maes "%1" fod yn rhif positif gyda neu heb uned fesuriad CSS dilys (px, %, in, cm, mm, em, ex, pt, neu pc).',
invalidHtmlLength: 'Mae\'n rhaid i\'r gwerth ar gyfer maes "%1" fod yn rhif positif gyda neu heb uned fesuriad HTML dilys (px neu %).', invalidHtmlLength: 'Mae\'n rhaid i\'r gwerth ar gyfer maes "%1" fod yn rhif positif gyda neu heb uned fesuriad HTML dilys (px neu %).',
invalidInlineStyle: 'Mae\'n rhaid i\'r gwerth ar gyfer arddull mewn-llinell gynnwys un set neu fwy ar y fformat "enw : gwerth", wedi\'u gwahanu gyda hanner colon.', invalidInlineStyle: 'Mae\'n rhaid i\'r gwerth ar gyfer arddull mewn-llinell gynnwys un set neu fwy ar y fformat "enw : gwerth", wedi\'u gwahanu gyda hanner colon.',
cssLengthTooltip: 'Rhowch rif am werth mewn picsel neu rhif gydag uned CSS dilys (px, %, in, cm, mm, em, pt neu pc).', cssLengthTooltip: 'Rhowch rif am werth mewn picsel neu rhif gydag uned CSS dilys (px, %, in, cm, mm, em, pt neu pc).',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, ddim ar gael</span>' unavailable: '%1<span class="cke_accessibility">, ddim ar gael</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Backspace', // MISSING
13: 'Enter', // MISSING
16: 'Shift', // MISSING
17: 'Ctrl', // MISSING
18: 'Alt', // MISSING
32: 'Space', // MISSING
35: 'End', // MISSING
36: 'Home', // MISSING
46: 'Delete', // MISSING
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Command' // MISSING
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Keyboard shortcut', // MISSING
optionDefault: 'Default' // MISSING
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -20,7 +20,7 @@
CKEDITOR.lang[ 'da' ] = { CKEDITOR.lang[ 'da' ] = {
// ARIA description. // ARIA description.
editor: 'Rich Text Editor', editor: 'Rich Text Editor',
editorPanel: 'Rich Text Editor panel', // MISSING editorPanel: 'Rich Text Editor panel',
// Common messages and labels. // Common messages and labels.
common: { common: {
@ -78,21 +78,70 @@ CKEDITOR.lang[ 'da' ] = {
width: 'Bredde', width: 'Bredde',
height: 'Højde', height: 'Højde',
align: 'Justering', align: 'Justering',
alignLeft: 'Venstre', left: 'Venstre',
alignRight: 'Højre', right: 'Højre',
center: 'Center',
justify: 'Lige margener',
alignLeft: 'Venstrestillet',
alignRight: 'Højrestillet',
alignCenter: 'Centreret', alignCenter: 'Centreret',
alignTop: 'Øverst', alignTop: 'Øverst',
alignMiddle: 'Centreret', alignMiddle: 'Centreret',
alignBottom: 'Nederst', alignBottom: 'Nederst',
invalidValue : 'Invalid value.', // MISSING alignNone: 'Ingen',
invalidValue: 'Ugyldig værdi.',
invalidHeight: 'Højde skal være et tal.', invalidHeight: 'Højde skal være et tal.',
invalidWidth: 'Bredde skal være et tal.', invalidWidth: 'Bredde skal være et tal.',
invalidLength: 'Værdien angivet for feltet "%1" skal være et positivt heltal med eller uden en gyldig måleenhed (%2).',
invalidCssLength: 'Værdien specificeret for "%1" feltet skal være et positivt nummer med eller uden en CSS måleenhed (px, %, in, cm, mm, em, ex, pt, eller pc).', invalidCssLength: 'Værdien specificeret for "%1" feltet skal være et positivt nummer med eller uden en CSS måleenhed (px, %, in, cm, mm, em, ex, pt, eller pc).',
invalidHtmlLength: 'Værdien specificeret for "%1" feltet skal være et positivt nummer med eller uden en CSS måleenhed (px eller %).', invalidHtmlLength: 'Værdien specificeret for "%1" feltet skal være et positivt nummer med eller uden en CSS måleenhed (px eller %).',
invalidInlineStyle: 'Værdien specificeret for inline style skal indeholde en eller flere elementer med et format som "name:value", separeret af semikoloner', invalidInlineStyle: 'Værdien specificeret for inline style skal indeholde en eller flere elementer med et format som "name:value", separeret af semikoloner',
cssLengthTooltip: 'Indsæt en numerisk værdi i pixel eller nummer med en gyldig CSS værdi (px, %, in, cm, mm, em, ex, pt, eller pc).', cssLengthTooltip: 'Indsæt en numerisk værdi i pixel eller nummer med en gyldig CSS værdi (px, %, in, cm, mm, em, ex, pt, eller pc).',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, ikke tilgængelig</span>' unavailable: '%1<span class="cke_accessibility">, ikke tilgængelig</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Backspace',
13: 'Retur',
16: 'Shift',
17: 'Ctrl',
18: 'Alt',
32: 'Mellemrum',
35: 'End',
36: 'Home',
46: 'Slet',
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Kommando'
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Tastatur genvej',
optionDefault: 'Default' // MISSING
} }
}; };

View File

@ -0,0 +1,146 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
/**
* @fileOverview
*/
/**#@+
@type String
@example
*/
/**
* Contains the dictionary of language entries.
* @namespace
*/
CKEDITOR.lang[ 'de-ch' ] = {
// ARIA description.
editor: 'WYSIWYG-Editor',
editorPanel: 'WYSIWYG-Editor-Leiste',
// Common messages and labels.
common: {
// Screenreader titles. Please note that screenreaders are not always capable
// of reading non-English words. So be careful while translating it.
editorHelp: 'Drücken Sie ALT 0 für Hilfe',
browseServer: 'Server durchsuchen',
url: 'URL',
protocol: 'Protokoll',
upload: 'Hochladen',
uploadSubmit: 'Zum Server senden',
image: 'Bild',
flash: 'Flash',
form: 'Formular',
checkbox: 'Kontrollbox',
radio: 'Optionsfeld',
textField: 'Textfeld',
textarea: 'Textfeld',
hiddenField: 'Verstecktes Feld',
button: 'Schaltfläche',
select: 'Auswahlfeld',
imageButton: 'Bildschaltfläche',
notSet: '<nicht festgelegt>',
id: 'Kennung',
name: 'Name',
langDir: 'Schreibrichtung',
langDirLtr: 'Links nach Rechts (LTR)',
langDirRtl: 'Rechts nach Links (RTL)',
langCode: 'Sprachcode',
longDescr: 'Langbeschreibungs-URL',
cssClass: 'Formatvorlagenklassen',
advisoryTitle: 'Titel Beschreibung',
cssStyle: 'Stil',
ok: 'OK',
cancel: 'Abbrechen',
close: 'Schliessen',
preview: 'Vorschau',
resize: 'Grösse ändern',
generalTab: 'Allgemein',
advancedTab: 'Erweitert',
validateNumberFailed: 'Dieser Wert ist keine Nummer.',
confirmNewPage: 'Alle nicht gespeicherten Änderungen gehen verlohren. Sind Sie sicher die neue Seite zu laden?',
confirmCancel: 'Einige Optionen wurden geändert. Wollen Sie den Dialog dennoch schliessen?',
options: 'Optionen',
target: 'Zielseite',
targetNew: 'Neues Fenster (_blank)',
targetTop: 'Oberstes Fenster (_top)',
targetSelf: 'Gleiches Fenster (_self)',
targetParent: 'Oberes Fenster (_parent)',
langDirLTR: 'Links nach Rechts (LNR)',
langDirRTL: 'Rechts nach Links (RNL)',
styles: 'Style',
cssClasses: 'Stylesheet Klasse',
width: 'Breite',
height: 'Höhe',
align: 'Ausrichtung',
left: 'Links',
right: 'Rechts',
center: 'Zentriert',
justify: 'Blocksatz',
alignLeft: 'Linksbündig',
alignRight: 'Rechtsbündig',
alignCenter: 'Align Center', // MISSING
alignTop: 'Oben',
alignMiddle: 'Mitte',
alignBottom: 'Unten',
alignNone: 'Keine',
invalidValue: 'Ungültiger Wert.',
invalidHeight: 'Höhe muss eine Zahl sein.',
invalidWidth: 'Breite muss eine Zahl sein.',
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidCssLength: 'Wert spezifiziert für "%1" Feld muss ein positiver numerischer Wert sein mit oder ohne korrekte CSS Messeinheit (px, %, in, cm, mm, em, ex, pt oder pc).',
invalidHtmlLength: 'Wert spezifiziert für "%1" Feld muss ein positiver numerischer Wert sein mit oder ohne korrekte HTML Messeinheit (px oder %).',
invalidInlineStyle: 'Wert spezifiziert für inline Stilart muss enthalten ein oder mehr Tupels mit dem Format "Name : Wert" getrennt mit Semikolons.',
cssLengthTooltip: 'Gebe eine Zahl ein für ein Wert in pixels oder eine Zahl mit einer korrekten CSS Messeinheit (px, %, in, cm, mm, em, ex, pt oder pc).',
// Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, nicht verfügbar</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Rücktaste',
13: 'Eingabe',
16: 'Umschalt',
17: 'Strg',
18: 'Alt',
32: 'Space', // MISSING
35: 'Ende',
36: 'Pos1',
46: 'Entfernen',
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Command' // MISSING
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Keyboard shortcut', // MISSING
optionDefault: 'Default' // MISSING
}
};

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -36,34 +36,34 @@ CKEDITOR.lang[ 'de' ] = {
image: 'Bild', image: 'Bild',
flash: 'Flash', flash: 'Flash',
form: 'Formular', form: 'Formular',
checkbox: 'Checkbox', checkbox: 'Kontrollbox',
radio: 'Radiobutton', radio: 'Optionsfeld',
textField: 'Textfeld einzeilig', textField: 'Textfeld',
textarea: 'Textfeld mehrzeilig', textarea: 'Textfeld',
hiddenField: 'Verstecktes Feld', hiddenField: 'Verstecktes Feld',
button: 'Klickbutton', button: 'Schaltfläche',
select: 'Auswahlfeld', select: 'Auswahlfeld',
imageButton: 'Bildbutton', imageButton: 'Bildschaltfläche',
notSet: '<nichts>', notSet: '<nicht festgelegt>',
id: 'ID', id: 'Kennung',
name: 'Name', name: 'Name',
langDir: 'Schreibrichtung', langDir: 'Schreibrichtung',
langDirLtr: 'Links nach Rechts (LTR)', langDirLtr: 'Links nach Rechts (LTR)',
langDirRtl: 'Rechts nach Links (RTL)', langDirRtl: 'Rechts nach Links (RTL)',
langCode: 'Sprachenkürzel', langCode: 'Sprachcode',
longDescr: 'Langform URL', longDescr: 'Langbeschreibungs-URL',
cssClass: 'Stylesheet Klasse', cssClass: 'Formatvorlagenklassen',
advisoryTitle: 'Titel Beschreibung', advisoryTitle: 'Titel Beschreibung',
cssStyle: 'Style', cssStyle: 'Stil',
ok: 'OK', ok: 'OK',
cancel: 'Abbrechen', cancel: 'Abbrechen',
close: 'Schließen', close: 'Schließen',
preview: 'Vorschau', preview: 'Vorschau',
resize: 'Zum Vergrößern ziehen', resize: 'Größe ändern',
generalTab: 'Allgemein', generalTab: 'Allgemein',
advancedTab: 'Erweitert', advancedTab: 'Erweitert',
validateNumberFailed: 'Dieser Wert ist keine Nummer.', validateNumberFailed: 'Dieser Wert ist keine Nummer.',
confirmNewPage: 'Alle nicht gespeicherten Änderungen gehen verlohren. Sind Sie sicher die neue Seite zu laden?', confirmNewPage: 'Alle nicht gespeicherten Änderungen gehen verloren. Sind Sie sicher die neue Seite zu laden?',
confirmCancel: 'Einige Optionen wurden geändert. Wollen Sie den Dialog dennoch schließen?', confirmCancel: 'Einige Optionen wurden geändert. Wollen Sie den Dialog dennoch schließen?',
options: 'Optionen', options: 'Optionen',
target: 'Zielseite', target: 'Zielseite',
@ -78,21 +78,70 @@ CKEDITOR.lang[ 'de' ] = {
width: 'Breite', width: 'Breite',
height: 'Höhe', height: 'Höhe',
align: 'Ausrichtung', align: 'Ausrichtung',
alignLeft: 'Links', left: 'Links',
alignRight: 'Rechts', right: 'Rechts',
alignCenter: 'Zentriert', center: 'Zentriert',
justify: 'Blocksatz',
alignLeft: 'Linksbündig',
alignRight: 'Rechtsbündig',
alignCenter: 'Align Center', // MISSING
alignTop: 'Oben', alignTop: 'Oben',
alignMiddle: 'Mitte', alignMiddle: 'Mitte',
alignBottom: 'Unten', alignBottom: 'Unten',
invalidValue : 'Ungültiger Wert.', alignNone: 'Keine',
invalidValue: 'Ungültiger Wert.',
invalidHeight: 'Höhe muss eine Zahl sein.', invalidHeight: 'Höhe muss eine Zahl sein.',
invalidWidth: 'Breite muss eine Zahl sein.', invalidWidth: 'Breite muss eine Zahl sein.',
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidCssLength: 'Wert spezifiziert für "%1" Feld muss ein positiver numerischer Wert sein mit oder ohne korrekte CSS Messeinheit (px, %, in, cm, mm, em, ex, pt oder pc).', invalidCssLength: 'Wert spezifiziert für "%1" Feld muss ein positiver numerischer Wert sein mit oder ohne korrekte CSS Messeinheit (px, %, in, cm, mm, em, ex, pt oder pc).',
invalidHtmlLength: 'Wert spezifiziert für "%1" Feld muss ein positiver numerischer Wert sein mit oder ohne korrekte HTML Messeinheit (px oder %).', invalidHtmlLength: 'Wert spezifiziert für "%1" Feld muss ein positiver numerischer Wert sein mit oder ohne korrekte HTML Messeinheit (px oder %).',
invalidInlineStyle: 'Wert spezifiziert für inline Stilart muss enthalten ein oder mehr Tupels mit dem Format "Name : Wert" getrennt mit Semikolons.', invalidInlineStyle: 'Wert spezifiziert für inline Stilart muss enthalten ein oder mehr Tupels mit dem Format "Name : Wert" getrennt mit Semikolons.',
cssLengthTooltip: 'Gebe eine Zahl ein für ein Wert in pixels oder eine Zahl mit einer korrekten CSS Messeinheit (px, %, in, cm, mm, em, ex, pt oder pc).', cssLengthTooltip: 'Gebe eine Zahl ein für ein Wert in pixels oder eine Zahl mit einer korrekten CSS Messeinheit (px, %, in, cm, mm, em, ex, pt oder pc).',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, nicht verfügbar</span>' unavailable: '%1<span class="cke_accessibility">, nicht verfügbar</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Rücktaste',
13: 'Eingabe',
16: 'Umschalt',
17: 'Strg',
18: 'Alt',
32: 'Leer',
35: 'Ende',
36: 'Pos1',
46: 'Entfernen',
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Befehl'
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Tastaturkürzel',
optionDefault: 'Default' // MISSING
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -78,21 +78,70 @@ CKEDITOR.lang[ 'el' ] = {
width: 'Πλάτος', width: 'Πλάτος',
height: 'Ύψος', height: 'Ύψος',
align: 'Στοίχιση', align: 'Στοίχιση',
alignLeft: 'Αριστερά', left: 'Αριστερά',
alignRight: 'Δεξιά', right: 'Δεξιά',
alignCenter: 'Κέντρο', center: 'Κέντρο',
justify: 'Πλήρης Στοίχιση',
alignLeft: 'Στοίχιση Αριστερά',
alignRight: 'Στοίχιση Δεξιά',
alignCenter: 'Align Center', // MISSING
alignTop: 'Πάνω', alignTop: 'Πάνω',
alignMiddle: 'Μέση', alignMiddle: 'Μέση',
alignBottom: 'Κάτω', alignBottom: 'Κάτω',
invalidValue : 'Μη έγκυρη τιμή.', alignNone: 'Χωρίς',
invalidValue: 'Μη έγκυρη τιμή.',
invalidHeight: 'Το ύψος πρέπει να είναι ένας αριθμός.', invalidHeight: 'Το ύψος πρέπει να είναι ένας αριθμός.',
invalidWidth: 'Το πλάτος πρέπει να είναι ένας αριθμός.', invalidWidth: 'Το πλάτος πρέπει να είναι ένας αριθμός.',
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidCssLength: 'Η τιμή που ορίζεται για το πεδίο "%1" πρέπει να είναι ένας θετικός αριθμός με ή χωρίς μια έγκυρη μονάδα μέτρησης CSS (px, %, in, cm, mm, em, ex, pt, ή pc).', invalidCssLength: 'Η τιμή που ορίζεται για το πεδίο "%1" πρέπει να είναι ένας θετικός αριθμός με ή χωρίς μια έγκυρη μονάδα μέτρησης CSS (px, %, in, cm, mm, em, ex, pt, ή pc).',
invalidHtmlLength: 'Η τιμή που ορίζεται για το πεδίο "%1" πρέπει να είναι ένας θετικός αριθμός με ή χωρίς μια έγκυρη μονάδα μέτρησης HTML (px ή %).', invalidHtmlLength: 'Η τιμή που ορίζεται για το πεδίο "%1" πρέπει να είναι ένας θετικός αριθμός με ή χωρίς μια έγκυρη μονάδα μέτρησης HTML (px ή %).',
invalidInlineStyle: 'Η τιμή για το εν σειρά στυλ πρέπει να περιέχει ένα ή περισσότερα ζεύγη με την μορφή "όνομα: τιμή" διαχωρισμένα με Ελληνικό ερωτηματικό.', invalidInlineStyle: 'Η τιμή για το εν σειρά στυλ πρέπει να περιέχει ένα ή περισσότερα ζεύγη με την μορφή "όνομα: τιμή" διαχωρισμένα με Ελληνικό ερωτηματικό.',
cssLengthTooltip: 'Εισάγεται μια τιμή σε pixel ή έναν αριθμό μαζί με μια έγκυρη μονάδα μέτρησης CSS (px, %, in, cm, mm, em, ex, pt, ή pc).', cssLengthTooltip: 'Εισάγεται μια τιμή σε pixel ή έναν αριθμό μαζί με μια έγκυρη μονάδα μέτρησης CSS (px, %, in, cm, mm, em, ex, pt, ή pc).',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, δεν είναι διαθέσιμο</span>' unavailable: '%1<span class="cke_accessibility">, δεν είναι διαθέσιμο</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Backspace',
13: 'Enter',
16: 'Shift',
17: 'Ctrl',
18: 'Alt',
32: 'Κενό',
35: 'End',
36: 'Home',
46: 'Delete',
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Εντολή'
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Συντόμευση πληκτρολογίου',
optionDefault: 'Default' // MISSING
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -20,13 +20,13 @@
CKEDITOR.lang[ 'en-au' ] = { CKEDITOR.lang[ 'en-au' ] = {
// ARIA description. // ARIA description.
editor: 'Rich Text Editor', editor: 'Rich Text Editor',
editorPanel: 'Rich Text Editor panel', // MISSING editorPanel: 'Rich Text Editor panel',
// Common messages and labels. // Common messages and labels.
common: { common: {
// Screenreader titles. Please note that screenreaders are not always capable // Screenreader titles. Please note that screenreaders are not always capable
// of reading non-English words. So be careful while translating it. // of reading non-English words. So be careful while translating it.
editorHelp: 'Press ALT 0 for help', // MISSING editorHelp: 'Press ALT 0 for help',
browseServer: 'Browse Server', browseServer: 'Browse Server',
url: 'URL', url: 'URL',
@ -57,42 +57,91 @@ CKEDITOR.lang[ 'en-au' ] = {
cssStyle: 'Style', cssStyle: 'Style',
ok: 'OK', ok: 'OK',
cancel: 'Cancel', cancel: 'Cancel',
close: 'Close', // MISSING close: 'Close',
preview: 'Preview', preview: 'Preview',
resize: 'Resize', // MISSING resize: 'Resize',
generalTab: 'General', generalTab: 'General',
advancedTab: 'Advanced', advancedTab: 'Advanced',
validateNumberFailed: 'This value is not a number.', validateNumberFailed: 'This value is not a number.',
confirmNewPage: 'Any unsaved changes to this content will be lost. Are you sure you want to load new page?', confirmNewPage: 'Any unsaved changes to this content will be lost. Are you sure you want to load new page?',
confirmCancel: 'You have changed some options. Are you sure you want to close the dialog window?', confirmCancel: 'You have changed some options. Are you sure you want to close the dialog window?',
options: 'Options', // MISSING options: 'Options',
target: 'Target', target: 'Target',
targetNew: 'New Window (_blank)', // MISSING targetNew: 'New Window (_blank)',
targetTop: 'Topmost Window (_top)', // MISSING targetTop: 'Topmost Window (_top)',
targetSelf: 'Same Window (_self)', // MISSING targetSelf: 'Same Window (_self)',
targetParent: 'Parent Window (_parent)', // MISSING targetParent: 'Parent Window (_parent)',
langDirLTR: 'Left to Right (LTR)', langDirLTR: 'Left to Right (LTR)',
langDirRTL: 'Right to Left (RTL)', langDirRTL: 'Right to Left (RTL)',
styles: 'Style', styles: 'Style',
cssClasses: 'Stylesheet Classes', cssClasses: 'Stylesheet Classes',
width: 'Width', // MISSING width: 'Width',
height: 'Height', // MISSING height: 'Height',
align: 'Align', align: 'Align',
alignLeft: 'Left', // MISSING left: 'Left', // MISSING
alignRight: 'Right', // MISSING right: 'Right', // MISSING
alignCenter: 'Centre', center: 'Center', // MISSING
alignTop: 'Top', // MISSING justify: 'Justify', // MISSING
alignMiddle: 'Middle', // MISSING alignLeft: 'Align Left', // MISSING
alignBottom: 'Bottom', // MISSING alignRight: 'Align Right', // MISSING
invalidValue : 'Invalid value.', // MISSING alignCenter: 'Align Center', // MISSING
invalidHeight: 'Height must be a number.', // MISSING alignTop: 'Top',
invalidWidth: 'Width must be a number.', // MISSING alignMiddle: 'Middle',
invalidCssLength: 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING alignBottom: 'Bottom',
invalidHtmlLength: 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).', // MISSING alignNone: 'None',
invalidInlineStyle: 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.', // MISSING invalidValue: 'Invalid value.',
cssLengthTooltip: 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING invalidHeight: 'Height must be a number.',
invalidWidth: 'Width must be a number.',
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).',
invalidCssLength: 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).',
invalidHtmlLength: 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).',
invalidInlineStyle: 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.',
cssLengthTooltip: 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, unavailable</span>' // MISSING unavailable: '%1<span class="cke_accessibility">, unavailable</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Backspace',
13: 'Enter',
16: 'Shift',
17: 'Ctrl',
18: 'Alt',
32: 'Space',
35: 'End',
36: 'Home',
46: 'Delete',
112: 'F1',
113: 'F2',
114: 'F3',
115: 'F4',
116: 'F5',
117: 'F6',
118: 'F7',
119: 'F8',
120: 'F9',
121: 'F10',
122: 'F11',
123: 'F12',
124: 'F13',
125: 'F14',
126: 'F15',
127: 'F16',
128: 'F17',
129: 'F18',
130: 'F19',
131: 'F20',
132: 'F21',
133: 'F22',
134: 'F23',
135: 'F24',
224: 'Command'
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Keyboard shortcut',
optionDefault: 'Default'
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -78,21 +78,70 @@ CKEDITOR.lang[ 'en-ca' ] = {
width: 'Width', // MISSING width: 'Width', // MISSING
height: 'Height', // MISSING height: 'Height', // MISSING
align: 'Align', align: 'Align',
alignLeft: 'Left', // MISSING left: 'Left', // MISSING
alignRight: 'Right', // MISSING right: 'Right', // MISSING
alignCenter: 'Centre', center: 'Centre',
justify: 'Justify',
alignLeft: 'Align Left',
alignRight: 'Align Right',
alignCenter: 'Align Center', // MISSING
alignTop: 'Top', // MISSING alignTop: 'Top', // MISSING
alignMiddle: 'Middle', // MISSING alignMiddle: 'Middle', // MISSING
alignBottom: 'Bottom', // MISSING alignBottom: 'Bottom', // MISSING
invalidValue : 'Invalid value.', // MISSING alignNone: 'None', // MISSING
invalidValue: 'Invalid value.', // MISSING
invalidHeight: 'Height must be a number.', // MISSING invalidHeight: 'Height must be a number.', // MISSING
invalidWidth: 'Width must be a number.', // MISSING invalidWidth: 'Width must be a number.', // MISSING
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidCssLength: 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING invalidCssLength: 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
invalidHtmlLength: 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).', // MISSING invalidHtmlLength: 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).', // MISSING
invalidInlineStyle: 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.', // MISSING invalidInlineStyle: 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.', // MISSING
cssLengthTooltip: 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING cssLengthTooltip: 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, unavailable</span>' // MISSING unavailable: '%1<span class="cke_accessibility">, unavailable</span>', // MISSING
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Backspace', // MISSING
13: 'Enter', // MISSING
16: 'Shift', // MISSING
17: 'Ctrl', // MISSING
18: 'Alt', // MISSING
32: 'Space', // MISSING
35: 'End', // MISSING
36: 'Home', // MISSING
46: 'Delete', // MISSING
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Command' // MISSING
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Keyboard shortcut', // MISSING
optionDefault: 'Default' // MISSING
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -78,21 +78,70 @@ CKEDITOR.lang[ 'en-gb' ] = {
width: 'Width', width: 'Width',
height: 'Height', height: 'Height',
align: 'Align', align: 'Align',
alignLeft: 'Left', left: 'Left', // MISSING
alignRight: 'Right', right: 'Right', // MISSING
alignCenter: 'Centre', center: 'Center', // MISSING
justify: 'Justify', // MISSING
alignLeft: 'Align Left', // MISSING
alignRight: 'Align Right', // MISSING
alignCenter: 'Align Center', // MISSING
alignTop: 'Top', alignTop: 'Top',
alignMiddle: 'Middle', alignMiddle: 'Middle',
alignBottom: 'Bottom', alignBottom: 'Bottom',
invalidValue : 'Invalid value.', alignNone: 'None',
invalidValue: 'Invalid value.',
invalidHeight: 'Height must be a number.', invalidHeight: 'Height must be a number.',
invalidWidth: 'Width must be a number.', invalidWidth: 'Width must be a number.',
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidCssLength: 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).', invalidCssLength: 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).',
invalidHtmlLength: 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).', invalidHtmlLength: 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).',
invalidInlineStyle: 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.', invalidInlineStyle: 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.',
cssLengthTooltip: 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).', cssLengthTooltip: 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, unavailable</span>' unavailable: '%1<span class="cke_accessibility">, unavailable</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Backspace', // MISSING
13: 'Enter', // MISSING
16: 'Shift', // MISSING
17: 'Ctrl', // MISSING
18: 'Alt', // MISSING
32: 'Space', // MISSING
35: 'End', // MISSING
36: 'Home', // MISSING
46: 'Delete', // MISSING
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Command' // MISSING
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Keyboard shortcut', // MISSING
optionDefault: 'Default' // MISSING
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -78,21 +78,70 @@ CKEDITOR.lang[ 'en' ] = {
width: 'Width', width: 'Width',
height: 'Height', height: 'Height',
align: 'Alignment', align: 'Alignment',
alignLeft: 'Left', left: 'Left',
alignRight: 'Right', right: 'Right',
alignCenter: 'Center', center: 'Center',
justify: 'Justify',
alignLeft: 'Align Left',
alignRight: 'Align Right',
alignCenter: 'Align Center',
alignTop: 'Top', alignTop: 'Top',
alignMiddle: 'Middle', alignMiddle: 'Middle',
alignBottom: 'Bottom', alignBottom: 'Bottom',
invalidValue : 'Invalid value.', alignNone: 'None',
invalidValue: 'Invalid value.',
invalidHeight: 'Height must be a number.', invalidHeight: 'Height must be a number.',
invalidWidth: 'Width must be a number.', invalidWidth: 'Width must be a number.',
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).',
invalidCssLength: 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).', invalidCssLength: 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).',
invalidHtmlLength: 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).', invalidHtmlLength: 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).',
invalidInlineStyle: 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.', invalidInlineStyle: 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.',
cssLengthTooltip: 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).', cssLengthTooltip: 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, unavailable</span>' unavailable: '%1<span class="cke_accessibility">, unavailable</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Backspace',
13: 'Enter',
16: 'Shift',
17: 'Ctrl',
18: 'Alt',
32: 'Space',
35: 'End',
36: 'Home',
46: 'Delete',
112: 'F1',
113: 'F2',
114: 'F3',
115: 'F4',
116: 'F5',
117: 'F6',
118: 'F7',
119: 'F8',
120: 'F9',
121: 'F10',
122: 'F11',
123: 'F12',
124: 'F13',
125: 'F14',
126: 'F15',
127: 'F16',
128: 'F17',
129: 'F18',
130: 'F19',
131: 'F20',
132: 'F21',
133: 'F22',
134: 'F23',
135: 'F24',
224: 'Command'
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Keyboard shortcut',
optionDefault: 'Default'
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -19,8 +19,8 @@
*/ */
CKEDITOR.lang[ 'eo' ] = { CKEDITOR.lang[ 'eo' ] = {
// ARIA description. // ARIA description.
editor: 'Redaktilo por Riĉiga Teksto', editor: 'RiĉTeksta Redaktilo',
editorPanel: 'Rich Text Editor panel', // MISSING editorPanel: 'Panelo de la RiĉTeksta Redaktilo',
// Common messages and labels. // Common messages and labels.
common: { common: {
@ -78,21 +78,70 @@ CKEDITOR.lang[ 'eo' ] = {
width: 'Larĝo', width: 'Larĝo',
height: 'Alto', height: 'Alto',
align: 'Ĝisrandigo', align: 'Ĝisrandigo',
alignLeft: 'Maldekstre', left: 'Maldekstre',
alignRight: 'Dekstre', right: 'Dekstre',
alignCenter: 'Centre', center: 'Centre',
justify: 'Ĝisrandigi Ambaŭflanke',
alignLeft: 'Ĝisrandigi maldekstren',
alignRight: 'Ĝisrandigi dekstren',
alignCenter: 'Align Center', // MISSING
alignTop: 'Supre', alignTop: 'Supre',
alignMiddle: 'Centre', alignMiddle: 'Centre',
alignBottom: 'Malsupre', alignBottom: 'Malsupre',
invalidValue : 'Nevalida Valoro', alignNone: 'Neniu',
invalidValue: 'Nevalida Valoro',
invalidHeight: 'Alto devas esti nombro.', invalidHeight: 'Alto devas esti nombro.',
invalidWidth: 'Larĝo devas esti nombro.', invalidWidth: 'Larĝo devas esti nombro.',
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidCssLength: 'La valoro indikita por la "%1" kampo devas esti pozitiva nombro kun aŭ sen valida CSSmezurunuo (px, %, in, cm, mm, em, ex, pt, or pc).', invalidCssLength: 'La valoro indikita por la "%1" kampo devas esti pozitiva nombro kun aŭ sen valida CSSmezurunuo (px, %, in, cm, mm, em, ex, pt, or pc).',
invalidHtmlLength: 'La valoro indikita por la "%1" kampo devas esti pozitiva nombro kun aŭ sen valida HTMLmezurunuo (px or %).', invalidHtmlLength: 'La valoro indikita por la "%1" kampo devas esti pozitiva nombro kun aŭ sen valida HTMLmezurunuo (px or %).',
invalidInlineStyle: 'La valoro indikita por la enlinia stilo devas konsisti el unu aŭ pluraj elementoj kun la formato de "nomo : valoro", apartigitaj per punktokomoj.', invalidInlineStyle: 'La valoro indikita por la enlinia stilo devas konsisti el unu aŭ pluraj elementoj kun la formato de "nomo : valoro", apartigitaj per punktokomoj.',
cssLengthTooltip: 'Entajpu nombron por rastrumera valoro aŭ nombron kun valida CSSunuo (px, %, in, cm, mm, em, ex, pt, or pc).', cssLengthTooltip: 'Entajpu nombron por rastrumera valoro aŭ nombron kun valida CSSunuo (px, %, in, cm, mm, em, ex, pt, or pc).',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, nehavebla</span>' unavailable: '%1<span class="cke_accessibility">, nehavebla</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Retropaŝo',
13: 'Enigi',
16: 'Registrumo',
17: 'Stirklavo',
18: 'Alt-klavo',
32: 'Spaco',
35: 'Fino',
36: 'Hejmo',
46: 'Forigi',
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Komando'
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Fulmoklavo',
optionDefault: 'Defaŭlta'
} }
}; };

View File

@ -0,0 +1,146 @@
/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
/**
* @fileOverview
*/
/**#@+
@type String
@example
*/
/**
* Contains the dictionary of language entries.
* @namespace
*/
CKEDITOR.lang[ 'es-mx' ] = {
// ARIA description.
editor: 'Editor de texto enriquecido',
editorPanel: 'Panel del editor de texto',
// Common messages and labels.
common: {
// Screenreader titles. Please note that screenreaders are not always capable
// of reading non-English words. So be careful while translating it.
editorHelp: 'Presiona ALT + 0 para ayuda',
browseServer: 'Examinar servidor',
url: 'URL',
protocol: 'Protocolo',
upload: 'Subir',
uploadSubmit: 'Enviar al servidor',
image: 'Imagen',
flash: 'Flash',
form: 'Formulario',
checkbox: 'Casilla de verificación',
radio: 'Botón de opción',
textField: 'Campo de texto',
textarea: 'Área de texto',
hiddenField: 'Campo oculto',
button: 'Botón',
select: 'Campo de selección',
imageButton: 'Botón de imagen',
notSet: '<not set>',
id: 'Id',
name: 'Nombre',
langDir: 'Dirección de idiomas',
langDirLtr: 'Izquierda a derecha (LTR)',
langDirRtl: 'Derecha a izquierda (RTL)',
langCode: 'Código de lenguaje',
longDescr: 'URL descripción larga',
cssClass: 'Clases de hoja de estilo',
advisoryTitle: 'Título del anuncio',
cssStyle: 'Estilo',
ok: 'OK',
cancel: 'Cancelar',
close: 'Cerrar',
preview: 'Vista previa',
resize: 'Redimensionar',
generalTab: 'General',
advancedTab: 'Avanzada',
validateNumberFailed: 'Este valor no es un número.',
confirmNewPage: 'Se perderán todos los cambios no guardados en este contenido. ¿Seguro que quieres cargar nueva página?',
confirmCancel: 'Ha cambiado algunas opciones. ¿Está seguro de que desea cerrar la ventana de diálogo?',
options: 'Opciones',
target: 'Objetivo',
targetNew: 'Nueva ventana (_blank)',
targetTop: 'Ventana superior (_top)',
targetSelf: 'Misma ventana (_self)',
targetParent: 'Ventana principal (_parent)',
langDirLTR: 'Izquierda a Derecha (LTR)',
langDirRTL: 'Derecha a Izquierda (RTL)',
styles: 'Estilo',
cssClasses: 'Clases de hojas de estilo',
width: 'Ancho',
height: 'Alto',
align: 'Alineación',
left: 'Izquierda',
right: 'Derecha',
center: 'Centrado',
justify: 'Justificado',
alignLeft: 'Alinear a la izquierda',
alignRight: 'Alinear a la derecha',
alignCenter: 'Align Center', // MISSING
alignTop: 'Arriba',
alignMiddle: 'En medio',
alignBottom: 'Abajo',
alignNone: 'Ninguno',
invalidValue: 'Valor inválido',
invalidHeight: 'La altura debe ser un número.',
invalidWidth: 'La anchura debe ser un número.',
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidCssLength: 'El valor especificado para el campo "% 1" debe ser un número positivo con o sin una unidad de medida CSS válida (px, %, in, cm, mm, em, ex, pt, or pc).',
invalidHtmlLength: 'El valor especificado para el campo "% 1" debe ser un número positivo con o sin una unidad de medición HTML válida (px or %).',
invalidInlineStyle: 'El valor especificado para el estilo en línea debe constar de una o más tuplas con el formato de "nombre: valor", separados por punto y coma',
cssLengthTooltip: 'Introduzca un número para un valor en píxeles o un número con una unidad CSS válida (px, %, in, cm, mm, em, ex, pt, or pc).',
// Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, no disponible</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Retroceso',
13: 'Intro',
16: 'Shift',
17: 'Ctrl',
18: 'Alt',
32: 'Espacio',
35: 'Fin',
36: 'Inicio',
46: 'Borrar',
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Comando'
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Atajo de teclado',
optionDefault: 'Default' // MISSING
}
};

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -78,21 +78,70 @@ CKEDITOR.lang[ 'es' ] = {
width: 'Anchura', width: 'Anchura',
height: 'Altura', height: 'Altura',
align: 'Alineación', align: 'Alineación',
alignLeft: 'Izquierda', left: 'Izquierda',
alignRight: 'Derecha', right: 'Derecha',
alignCenter: 'Centrado', center: 'Centrado',
justify: 'Justificado',
alignLeft: 'Alinear a Izquierda',
alignRight: 'Alinear a Derecha',
alignCenter: 'Align Center', // MISSING
alignTop: 'Tope', alignTop: 'Tope',
alignMiddle: 'Centro', alignMiddle: 'Centro',
alignBottom: 'Pie', alignBottom: 'Pie',
invalidValue : 'Valor no válido', alignNone: 'Ninguno',
invalidValue: 'Valor no válido',
invalidHeight: 'Altura debe ser un número.', invalidHeight: 'Altura debe ser un número.',
invalidWidth: 'Anchura debe ser un número.', invalidWidth: 'Anchura debe ser un número.',
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidCssLength: 'El valor especificado para el campo "%1" debe ser un número positivo, incluyendo optionalmente una unidad de medida CSS válida (px, %, in, cm, mm, em, ex, pt, o pc).', invalidCssLength: 'El valor especificado para el campo "%1" debe ser un número positivo, incluyendo optionalmente una unidad de medida CSS válida (px, %, in, cm, mm, em, ex, pt, o pc).',
invalidHtmlLength: 'El valor especificado para el campo "%1" debe ser un número positivo, incluyendo optionalmente una unidad de medida HTML válida (px o %).', invalidHtmlLength: 'El valor especificado para el campo "%1" debe ser un número positivo, incluyendo optionalmente una unidad de medida HTML válida (px o %).',
invalidInlineStyle: 'El valor especificado para el estilo debe consistir en uno o más pares con el formato "nombre: valor", separados por punto y coma.', invalidInlineStyle: 'El valor especificado para el estilo debe consistir en uno o más pares con el formato "nombre: valor", separados por punto y coma.',
cssLengthTooltip: 'Introduca un número para el valor en pixels o un número con una unidad de medida CSS válida (px, %, in, cm, mm, em, ex, pt, o pc).', cssLengthTooltip: 'Introduca un número para el valor en pixels o un número con una unidad de medida CSS válida (px, %, in, cm, mm, em, ex, pt, o pc).',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, no disponible</span>' unavailable: '%1<span class="cke_accessibility">, no disponible</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Retroceso',
13: 'Ingresar',
16: 'Mayús.',
17: 'Ctrl',
18: 'Alt',
32: 'Space', // MISSING
35: 'Fin',
36: 'Inicio',
46: 'Suprimir',
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Command' // MISSING
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Keyboard shortcut', // MISSING
optionDefault: 'Default' // MISSING
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -78,21 +78,70 @@ CKEDITOR.lang[ 'et' ] = {
width: 'Laius', width: 'Laius',
height: 'Kõrgus', height: 'Kõrgus',
align: 'Joondus', align: 'Joondus',
alignLeft: 'Vasak', left: 'Vasak',
alignRight: 'Paremale', right: 'Paremale',
alignCenter: 'Kesk', center: 'Kesk',
justify: 'Rööpjoondus',
alignLeft: 'Vasakjoondus',
alignRight: 'Paremjoondus',
alignCenter: 'Align Center', // MISSING
alignTop: 'Üles', alignTop: 'Üles',
alignMiddle: 'Keskele', alignMiddle: 'Keskele',
alignBottom: 'Alla', alignBottom: 'Alla',
invalidValue : 'Vigane väärtus.', alignNone: 'None', // MISSING
invalidValue: 'Vigane väärtus.',
invalidHeight: 'Kõrgus peab olema number.', invalidHeight: 'Kõrgus peab olema number.',
invalidWidth: 'Laius peab olema number.', invalidWidth: 'Laius peab olema number.',
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidCssLength: '"%1" välja jaoks määratud väärtus peab olema positiivne täisarv CSS ühikuga (px, %, in, cm, mm, em, ex, pt või pc) või ilma.', invalidCssLength: '"%1" välja jaoks määratud väärtus peab olema positiivne täisarv CSS ühikuga (px, %, in, cm, mm, em, ex, pt või pc) või ilma.',
invalidHtmlLength: '"%1" välja jaoks määratud väärtus peab olema positiivne täisarv HTML ühikuga (px või %) või ilma.', invalidHtmlLength: '"%1" välja jaoks määratud väärtus peab olema positiivne täisarv HTML ühikuga (px või %) või ilma.',
invalidInlineStyle: 'Reasisese stiili määrangud peavad koosnema paarisväärtustest (tuples), mis on semikoolonitega eraldatult järgnevas vormingus: "nimi : väärtus".', invalidInlineStyle: 'Reasisese stiili määrangud peavad koosnema paarisväärtustest (tuples), mis on semikoolonitega eraldatult järgnevas vormingus: "nimi : väärtus".',
cssLengthTooltip: 'Sisesta väärtus pikslites või number koos sobiva CSS-i ühikuga (px, %, in, cm, mm, em, ex, pt või pc).', cssLengthTooltip: 'Sisesta väärtus pikslites või number koos sobiva CSS-i ühikuga (px, %, in, cm, mm, em, ex, pt või pc).',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, pole saadaval</span>' unavailable: '%1<span class="cke_accessibility">, pole saadaval</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Backspace', // MISSING
13: 'Enter', // MISSING
16: 'Shift',
17: 'Ctrl',
18: 'Alt',
32: 'Tühik',
35: 'End',
36: 'Home',
46: 'Kustuta',
112: 'F1',
113: 'F2',
114: 'F3',
115: 'F4',
116: 'F5',
117: 'F6',
118: 'F7',
119: 'F8',
120: 'F9',
121: 'F10',
122: 'F11',
123: 'F12',
124: 'F13',
125: 'F14',
126: 'F15',
127: 'F16',
128: 'F17',
129: 'F18',
130: 'F19',
131: 'F20',
132: 'F21',
133: 'F22',
134: 'F23',
135: 'F24',
224: 'Command' // MISSING
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Keyboard shortcut', // MISSING
optionDefault: 'Vaikeväärtus'
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -19,80 +19,129 @@
*/ */
CKEDITOR.lang[ 'eu' ] = { CKEDITOR.lang[ 'eu' ] = {
// ARIA description. // ARIA description.
editor: 'Testu Aberastuko Editorea', editor: 'Testu aberastuaren editorea',
editorPanel: 'Rich Text Editor panel', // MISSING editorPanel: 'Testu aberastuaren editorearen panela',
// Common messages and labels. // Common messages and labels.
common: { common: {
// Screenreader titles. Please note that screenreaders are not always capable // Screenreader titles. Please note that screenreaders are not always capable
// of reading non-English words. So be careful while translating it. // of reading non-English words. So be careful while translating it.
editorHelp: 'ALT 0 sakatu laguntza jasotzeko', editorHelp: 'Sakatu ALT 0 laguntza jasotzeko',
browseServer: 'Zerbitzaria arakatu', browseServer: 'Arakatu zerbitzaria',
url: 'URL', url: 'URLa',
protocol: 'Protokoloa', protocol: 'Protokoloa',
upload: 'Gora kargatu', upload: 'Kargatu',
uploadSubmit: 'Zerbitzarira bidali', uploadSubmit: 'Bidali zerbitzarira',
image: 'Irudia', image: 'Irudia',
flash: 'Flasha', flash: 'Flash',
form: 'Formularioa', form: 'Formularioa',
checkbox: 'Kontrol-laukia', checkbox: 'Kontrol-laukia',
radio: 'Aukera-botoia', radio: 'Aukera-botoia',
textField: 'Testu Eremua', textField: 'Testu-eremua',
textarea: 'Testu-area', textarea: 'Testu-area',
hiddenField: 'Ezkutuko Eremua', hiddenField: 'Ezkutuko eremua',
button: 'Botoia', button: 'Botoia',
select: 'Hautespen Eremua', select: 'Hautespen-eremua',
imageButton: 'Irudi Botoia', imageButton: 'Irudi-botoia',
notSet: '<Ezarri gabe>', notSet: '<ezarri gabe>',
id: 'Id', id: 'Id',
name: 'Izena', name: 'Izena',
langDir: 'Hizkuntzaren Norabidea', langDir: 'Hizkuntzaren norabidea',
langDirLtr: 'Ezkerretik Eskumara(LTR)', langDirLtr: 'Ezkerretik eskuinera (LTR)',
langDirRtl: 'Eskumatik Ezkerrera (RTL)', langDirRtl: 'Eskuinetik ezkerrera (RTL)',
langCode: 'Hizkuntza Kodea', langCode: 'Hizkuntzaren kodea',
longDescr: 'URL Deskribapen Luzea', longDescr: 'URLaren deskribapen luzea',
cssClass: 'Estilo-orriko Klaseak', cssClass: 'Estilo-orriko klaseak',
advisoryTitle: 'Izenburua', advisoryTitle: 'Aholkatutako izenburua',
cssStyle: 'Estiloa', cssStyle: 'Estiloa',
ok: 'Ados', ok: 'Ados',
cancel: 'Utzi', cancel: 'Utzi',
close: 'Itxi', close: 'Itxi',
preview: 'Aurrebista', preview: 'Aurrebista',
resize: 'Arrastatu tamaina aldatzeko', resize: 'Aldatu tamainaz',
generalTab: 'Orokorra', generalTab: 'Orokorra',
advancedTab: 'Aurreratua', advancedTab: 'Aurreratua',
validateNumberFailed: 'Balio hau ez da zenbaki bat.', validateNumberFailed: 'Balio hau ez da zenbaki bat.',
confirmNewPage: 'Eduki honetan gorde gabe dauden aldaketak galduko dira. Ziur zaude orri berri bat kargatu nahi duzula?', confirmNewPage: 'Eduki honetan gorde gabe dauden aldaketak galduko dira. Ziur zaude orri berri bat kargatu nahi duzula?',
confirmCancel: 'Aukera batzuk aldatu egin dira. Ziur zaude elkarrizketa-koadroa itxi nahi duzula?', confirmCancel: 'Aukera batzuk aldatu dituzu. Ziur zaude elkarrizketa-koadroa itxi nahi duzula?',
options: 'Aukerak', options: 'Aukerak',
target: 'Target (Helburua)', target: 'Helburua',
targetNew: 'Leiho Berria (_blank)', targetNew: 'Leiho berria (_blank)',
targetTop: 'Goieneko Leihoan (_top)', targetTop: 'Goieneko leihoan (_top)',
targetSelf: 'Leiho Berdinean (_self)', targetSelf: 'Leiho berean (_self)',
targetParent: 'Leiho Gurasoan (_parent)', targetParent: 'Leiho gurasoan (_parent)',
langDirLTR: 'Ezkerretik Eskumara(LTR)', langDirLTR: 'Ezkerretik eskuinera (LTR)',
langDirRTL: 'Eskumatik Ezkerrera (RTL)', langDirRTL: 'Eskuinetik ezkerrera (RTL)',
styles: 'Estiloa', styles: 'Estiloa',
cssClasses: 'Estilo-orriko Klaseak', cssClasses: 'Estilo-orriko klaseak',
width: 'Zabalera', width: 'Zabalera',
height: 'Altuera', height: 'Altuera',
align: 'Lerrokatu', align: 'Lerrokatzea',
alignLeft: 'Ezkerrera', left: 'Ezkerrean',
alignRight: 'Eskuman', right: 'Eskuinean',
alignCenter: 'Erdian', center: 'Erdian',
justify: 'Justifikatu',
alignLeft: 'Lerrokatu ezkerrean',
alignRight: 'Lerrokatu eskuinean',
alignCenter: 'Align Center', // MISSING
alignTop: 'Goian', alignTop: 'Goian',
alignMiddle: 'Erdian', alignMiddle: 'Erdian',
alignBottom: 'Behean', alignBottom: 'Behean',
invalidValue : 'Balio ezegokia.', alignNone: 'Bat ere ez',
invalidValue: 'Balio desegokia.',
invalidHeight: 'Altuera zenbaki bat izan behar da.', invalidHeight: 'Altuera zenbaki bat izan behar da.',
invalidWidth: 'Zabalera zenbaki bat izan behar da.', invalidWidth: 'Zabalera zenbaki bat izan behar da.',
invalidCssLength: '"%1" eremurako zehaztutako balioa zenbaki positibo bat izan behar du, aukeran CSS neurri unitate batekin (px, %, in, cm, mm, em, ex, pt edo pc).', invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidHtmlLength: '"%1" eremurako zehaztutako balioa zenbaki positibo bat izan behar du, aukeran HTML neurri unitate batekin (px edo %).', invalidCssLength: '"%1" eremurako zehaztutako balioak zenbaki positibo bat izan behar du, CSS neurri unitate batekin edo gabe (px, %, in, cm, mm, em, ex, pt edo pc).',
invalidInlineStyle: 'Lerroko estiloan zehazten dena tupla "name : value" formatuko eta puntu eta komaz bereiztutako tupla bat edo gehiago izan behar dira.', invalidHtmlLength: '"%1" eremurako zehaztutako balioak zenbaki positibo bat izan behar du, HTML neurri unitate batekin edo gabe (px edo %).',
cssLengthTooltip: 'Zenbakia bakarrik zehazten bada pixeletan egongo da. CSS neurri unitatea ere zehaztu ahal da (px, %, in, cm, mm, em, ex, pt, edo pc).', invalidInlineStyle: 'Lineako estiloan zehaztutako balioak "izen : balio" formatuko tupla bat edo gehiago izan behar dira, komaz bereiztuak.',
cssLengthTooltip: 'Sartu zenbaki bat edo zenbaki bat baliozko CSS unitate batekin (px, %, in, cm, mm, em, ex, pt, edo pc).',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, erabilezina</span>' unavailable: '%1<span class="cke_accessibility">, erabilezina</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Atzera tekla',
13: 'Sartu',
16: 'Maius',
17: 'Ktrl',
18: 'Alt',
32: 'Zuriunea',
35: 'Buka',
36: 'Etxea',
46: 'Ezabatu',
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Komandoa'
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Laster-tekla',
optionDefault: 'Lehenetsia'
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -19,7 +19,7 @@
*/ */
CKEDITOR.lang[ 'fa' ] = { CKEDITOR.lang[ 'fa' ] = {
// ARIA description. // ARIA description.
editor: 'ویرایشگر متن کامل', editor: 'ویرایش‌گر متن غنی',
editorPanel: 'پنل ویرایشگر متن غنی', editorPanel: 'پنل ویرایشگر متن غنی',
// Common messages and labels. // Common messages and labels.
@ -30,8 +30,8 @@ CKEDITOR.lang[ 'fa' ] = {
browseServer: 'فهرست​نمایی سرور', browseServer: 'فهرست​نمایی سرور',
url: 'URL', url: 'URL',
protocol: 'پروتکل', protocol: 'قرارداد',
upload: 'آپلود', upload: 'بالاگذاری',
uploadSubmit: 'به سرور بفرست', uploadSubmit: 'به سرور بفرست',
image: 'تصویر', image: 'تصویر',
flash: 'فلش', flash: 'فلش',
@ -44,29 +44,29 @@ CKEDITOR.lang[ 'fa' ] = {
button: 'دکمه', button: 'دکمه',
select: 'فیلد انتخاب چند گزینه​ای', select: 'فیلد انتخاب چند گزینه​ای',
imageButton: 'دکمه‌ی تصویری', imageButton: 'دکمه‌ی تصویری',
notSet: '<تعین نشده>', notSet: '<تعیین‌نشده>',
id: 'شناسه', id: 'شناسه',
name: 'نام', name: 'نام',
langDir: 'جهت​نمای زبان', langDir: 'جهت زبان',
langDirLtr: 'چپ به راست', langDirLtr: 'چپ به راست',
langDirRtl: 'راست به چپ', langDirRtl: 'راست به چپ',
langCode: 'کد زبان', langCode: 'کد زبان',
longDescr: 'URL توصیف طولانی', longDescr: 'URL توصیف طولانی',
cssClass: 'کلاس​های شیوه​نامه (Stylesheet)', cssClass: 'کلاس​های شیوه​نامه (Stylesheet)',
advisoryTitle: 'عنوان کمکی', advisoryTitle: 'عنوان کمکی',
cssStyle: 'شیوه (style)', cssStyle: 'سبک',
ok: 'پذیرش', ok: 'پذیرش',
cancel: 'انصراف', cancel: 'انصراف',
close: 'بستن', close: 'بستن',
preview: 'پیش‌نمایش', preview: 'پیش‌نمایش',
resize: 'تغییر اندازه', resize: 'تغییر اندازه',
generalTab: 'عمومی', generalTab: 'عمومی',
advancedTab: 'پیشرفته', advancedTab: 'پیشرفته',
validateNumberFailed: 'این مقدار یک عدد نیست.', validateNumberFailed: 'این مقدار یک عدد نیست.',
confirmNewPage: 'هر تغییر ایجاد شده​ی ذخیره نشده از بین خواهد رفت. آیا اطمینان دارید که قصد بارگیری صفحه جدیدی را دارید؟', confirmNewPage: 'هر تغییر ایجاد شده​ی ذخیره نشده از بین خواهد رفت. آیا اطمینان دارید که قصد بارگیری صفحه جدیدی را دارید؟',
confirmCancel: 'برخی از گزینه‌ها تغییر کرده‌اند. آیا واقعا قصد بستن این پنجره را دارید؟', confirmCancel: 'برخی از گزینه‌ها تغییر کرده‌اند. آیا واقعا قصد بستن این پنجره را دارید؟',
options: 'گزینه​ها', options: 'گزینه​ها',
target: 'نحوه باز کردن', target: 'مقصد',
targetNew: 'پنجره جدید', targetNew: 'پنجره جدید',
targetTop: 'بالاترین پنجره', targetTop: 'بالاترین پنجره',
targetSelf: 'همان پنجره', targetSelf: 'همان پنجره',
@ -74,25 +74,74 @@ CKEDITOR.lang[ 'fa' ] = {
langDirLTR: 'چپ به راست', langDirLTR: 'چپ به راست',
langDirRTL: 'راست به چپ', langDirRTL: 'راست به چپ',
styles: 'سبک', styles: 'سبک',
cssClasses: 'کلاس‌های شیوه‌نامه', cssClasses: 'کلاس‌های سبک‌نامه',
width: 'عرض', width: 'عرض',
height: 'طول', height: 'طول',
align: 'چینش', align: 'چینش',
alignLeft: 'چپ', left: 'چپ',
alignRight: 'راست', right: 'راست',
alignCenter: 'مرکز', center: 'وسط',
justify: 'بلوک چین',
alignLeft: 'چپ چین',
alignRight: 'راست چین',
alignCenter: 'Align Center', // MISSING
alignTop: 'بالا', alignTop: 'بالا',
alignMiddle: 'وسط', alignMiddle: 'میانه',
alignBottom: 'پائین', alignBottom: 'پائین',
invalidValue : 'مقدار نامعتبر.', alignNone: 'هیچ',
invalidValue: 'مقدار نامعتبر.',
invalidHeight: 'ارتفاع باید یک عدد باشد.', invalidHeight: 'ارتفاع باید یک عدد باشد.',
invalidWidth: 'عرض باید یک عدد باشد.', invalidWidth: 'عرض باید یک عدد باشد.',
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidCssLength: 'عدد تعیین شده برای فیلد "%1" باید یک عدد مثبت با یا بدون یک واحد اندازه گیری CSS معتبر باشد (px, %, in, cm, mm, em, ex, pt, or pc).', invalidCssLength: 'عدد تعیین شده برای فیلد "%1" باید یک عدد مثبت با یا بدون یک واحد اندازه گیری CSS معتبر باشد (px, %, in, cm, mm, em, ex, pt, or pc).',
invalidHtmlLength: 'عدد تعیین شده برای فیلد "%1" باید یک عدد مثبت با یا بدون یک واحد اندازه گیری HTML معتبر باشد (px or %).', invalidHtmlLength: 'عدد تعیین شده برای فیلد "%1" باید یک عدد مثبت با یا بدون یک واحد اندازه گیری HTML معتبر باشد (px or %).',
invalidInlineStyle: 'عدد تعیین شده برای سبک درون​خطی -Inline Style- باید دارای یک یا چند چندتایی با شکلی شبیه "name : value" که باید با یک ";" از هم جدا شوند.', invalidInlineStyle: 'عدد تعیین شده برای سبک درون​خطی -Inline Style- باید دارای یک یا چند چندتایی با شکلی شبیه "name : value" که باید با یک ";" از هم جدا شوند.',
cssLengthTooltip: 'یک عدد برای یک مقدار بر حسب پیکسل و یا یک عدد با یک واحد CSS معتبر وارد کنید (px, %, in, cm, mm, em, ex, pt, or pc).', cssLengthTooltip: 'یک عدد برای یک مقدار بر حسب پیکسل و یا یک عدد با یک واحد CSS معتبر وارد کنید (px, %, in, cm, mm, em, ex, pt, or pc).',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">، غیر قابل دسترس</span>' unavailable: '%1<span class="cke_accessibility">، غیر قابل دسترس</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'عقبگرد',
13: 'ورود',
16: 'تعویض',
17: 'کنترل',
18: 'دگرساز',
32: 'Space', // MISSING
35: 'پایان',
36: 'خانه',
46: 'حذف',
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Command' // MISSING
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Keyboard shortcut', // MISSING
optionDefault: 'Default' // MISSING
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -78,21 +78,70 @@ CKEDITOR.lang[ 'fi' ] = {
width: 'Leveys', width: 'Leveys',
height: 'Korkeus', height: 'Korkeus',
align: 'Kohdistus', align: 'Kohdistus',
alignLeft: 'Vasemmalle', left: 'Vasemmalle',
alignRight: 'Oikealle', right: 'Oikealle',
alignCenter: 'Keskelle', center: 'Keskelle',
justify: 'Tasaa molemmat reunat',
alignLeft: 'Tasaa vasemmat reunat',
alignRight: 'Tasaa oikeat reunat',
alignCenter: 'Align Center', // MISSING
alignTop: 'Ylös', alignTop: 'Ylös',
alignMiddle: 'Keskelle', alignMiddle: 'Keskelle',
alignBottom: 'Alas', alignBottom: 'Alas',
invalidValue : 'Virheellinen arvo.', alignNone: 'Ei asetettu',
invalidValue: 'Virheellinen arvo.',
invalidHeight: 'Korkeuden täytyy olla numero.', invalidHeight: 'Korkeuden täytyy olla numero.',
invalidWidth: 'Leveyden täytyy olla numero.', invalidWidth: 'Leveyden täytyy olla numero.',
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidCssLength: 'Kentän "%1" arvon täytyy olla positiivinen luku CSS mittayksikön (px, %, in, cm, mm, em, ex, pt tai pc) kanssa tai ilman.', invalidCssLength: 'Kentän "%1" arvon täytyy olla positiivinen luku CSS mittayksikön (px, %, in, cm, mm, em, ex, pt tai pc) kanssa tai ilman.',
invalidHtmlLength: 'Kentän "%1" arvon täytyy olla positiivinen luku HTML mittayksikön (px tai %) kanssa tai ilman.', invalidHtmlLength: 'Kentän "%1" arvon täytyy olla positiivinen luku HTML mittayksikön (px tai %) kanssa tai ilman.',
invalidInlineStyle: 'Tyylille annetun arvon täytyy koostua yhdestä tai useammasta "nimi : arvo" parista, jotka ovat eroteltuna toisistaan puolipisteillä.', invalidInlineStyle: 'Tyylille annetun arvon täytyy koostua yhdestä tai useammasta "nimi : arvo" parista, jotka ovat eroteltuna toisistaan puolipisteillä.',
cssLengthTooltip: 'Anna numeroarvo pikseleinä tai numeroarvo CSS mittayksikön kanssa (px, %, in, cm, mm, em, ex, pt, tai pc).', cssLengthTooltip: 'Anna numeroarvo pikseleinä tai numeroarvo CSS mittayksikön kanssa (px, %, in, cm, mm, em, ex, pt, tai pc).',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, ei saatavissa</span>' unavailable: '%1<span class="cke_accessibility">, ei saatavissa</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Backspace', // MISSING
13: 'Enter', // MISSING
16: 'Shift', // MISSING
17: 'Ctrl', // MISSING
18: 'Alt', // MISSING
32: 'Space', // MISSING
35: 'End', // MISSING
36: 'Home', // MISSING
46: 'Delete', // MISSING
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Command' // MISSING
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Keyboard shortcut', // MISSING
optionDefault: 'Default' // MISSING
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -56,7 +56,7 @@ CKEDITOR.lang[ 'fo' ] = {
advisoryTitle: 'Vegleiðandi heiti', advisoryTitle: 'Vegleiðandi heiti',
cssStyle: 'Typografi', cssStyle: 'Typografi',
ok: 'Góðkent', ok: 'Góðkent',
cancel: 'Avlýst', cancel: 'Avlýs',
close: 'Lat aftur', close: 'Lat aftur',
preview: 'Frumsýn', preview: 'Frumsýn',
resize: 'Drag fyri at broyta stødd', resize: 'Drag fyri at broyta stødd',
@ -78,21 +78,70 @@ CKEDITOR.lang[ 'fo' ] = {
width: 'Breidd', width: 'Breidd',
height: 'Hædd', height: 'Hædd',
align: 'Justering', align: 'Justering',
alignLeft: 'Vinstra', left: 'Vinstra',
alignRight: 'Høgra', right: 'Høgra',
alignCenter: 'Miðsett', center: 'Miðsett',
justify: 'Javnir tekstkantar',
alignLeft: 'Vinstrasett',
alignRight: 'Høgrasett',
alignCenter: 'Align Center', // MISSING
alignTop: 'Ovast', alignTop: 'Ovast',
alignMiddle: 'Miðja', alignMiddle: 'Miðja',
alignBottom: 'Botnur', alignBottom: 'Botnur',
invalidValue : 'Invalid value.', // MISSING alignNone: 'Eingin',
invalidValue: 'Invalid value.', // MISSING
invalidHeight: 'Hædd má vera eitt tal.', invalidHeight: 'Hædd má vera eitt tal.',
invalidWidth: 'Breidd má vera eitt tal.', invalidWidth: 'Breidd má vera eitt tal.',
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidCssLength: 'Virðið sett í "%1" feltið má vera eitt positivt tal, við ella uttan gyldugum CSS mátieind (px, %, in, cm, mm, em, ex, pt, ella pc).', invalidCssLength: 'Virðið sett í "%1" feltið má vera eitt positivt tal, við ella uttan gyldugum CSS mátieind (px, %, in, cm, mm, em, ex, pt, ella pc).',
invalidHtmlLength: 'Virðið sett í "%1" feltiðield má vera eitt positivt tal, við ella uttan gyldugum CSS mátieind (px ella %).', invalidHtmlLength: 'Virðið sett í "%1" feltiðield má vera eitt positivt tal, við ella uttan gyldugum CSS mátieind (px ella %).',
invalidInlineStyle: 'Virði specifiserað fyri inline style má hava eitt ella fleiri pør (tuples) skrivað sum "name : value", hvørt parið sundurskilt við semi-colon.', invalidInlineStyle: 'Virði specifiserað fyri inline style má hava eitt ella fleiri pør (tuples) skrivað sum "name : value", hvørt parið sundurskilt við semi-colon.',
cssLengthTooltip: 'Skriva eitt tal fyri eitt virði í pixels ella eitt tal við gyldigum CSS eind (px, %, in, cm, mm, em, ex, pt, ella pc).', cssLengthTooltip: 'Skriva eitt tal fyri eitt virði í pixels ella eitt tal við gyldigum CSS eind (px, %, in, cm, mm, em, ex, pt, ella pc).',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, ikki tøkt</span>' unavailable: '%1<span class="cke_accessibility">, ikki tøkt</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Backspace', // MISSING
13: 'Enter', // MISSING
16: 'Shift', // MISSING
17: 'Ctrl', // MISSING
18: 'Alt', // MISSING
32: 'Space', // MISSING
35: 'End', // MISSING
36: 'Home', // MISSING
46: 'Delete', // MISSING
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Command' // MISSING
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Keyboard shortcut', // MISSING
optionDefault: 'Default' // MISSING
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -78,21 +78,70 @@ CKEDITOR.lang[ 'fr-ca' ] = {
width: 'Largeur', width: 'Largeur',
height: 'Hauteur', height: 'Hauteur',
align: 'Alignement', align: 'Alignement',
alignLeft: 'Gauche', left: 'Gauche',
alignRight: 'Droite', right: 'Droite',
alignCenter: 'Centré', center: 'Centré',
justify: 'Justifié',
alignLeft: 'Aligner à gauche',
alignRight: 'Aligner à Droite',
alignCenter: 'Align Center', // MISSING
alignTop: 'Haut', alignTop: 'Haut',
alignMiddle: 'Milieu', alignMiddle: 'Milieu',
alignBottom: 'Bas', alignBottom: 'Bas',
invalidValue : 'Valeur invalide.', alignNone: 'None', // MISSING
invalidValue: 'Valeur invalide.',
invalidHeight: 'La hauteur doit être un nombre.', invalidHeight: 'La hauteur doit être un nombre.',
invalidWidth: 'La largeur doit être un nombre.', invalidWidth: 'La largeur doit être un nombre.',
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidCssLength: 'La valeur spécifiée pour le champ "%1" doit être un nombre positif avec ou sans unité de mesure CSS valide (px, %, in, cm, mm, em, ex, pt, ou pc).', invalidCssLength: 'La valeur spécifiée pour le champ "%1" doit être un nombre positif avec ou sans unité de mesure CSS valide (px, %, in, cm, mm, em, ex, pt, ou pc).',
invalidHtmlLength: 'La valeur spécifiée pour le champ "%1" doit être un nombre positif avec ou sans unité de mesure HTML valide (px ou %).', invalidHtmlLength: 'La valeur spécifiée pour le champ "%1" doit être un nombre positif avec ou sans unité de mesure HTML valide (px ou %).',
invalidInlineStyle: 'La valeur spécifiée pour le style intégré doit être composée d\'un ou plusieurs couples de valeur au format "nom : valeur", separés par des points-virgules.', invalidInlineStyle: 'La valeur spécifiée pour le style intégré doit être composée d\'un ou plusieurs couples de valeur au format "nom : valeur", separés par des points-virgules.',
cssLengthTooltip: 'Entrer un nombre pour la valeur en pixel ou un nombre avec une unité CSS valide (px, %, in, cm, mm, em, ex, pt, ou pc).', cssLengthTooltip: 'Entrer un nombre pour la valeur en pixel ou un nombre avec une unité CSS valide (px, %, in, cm, mm, em, ex, pt, ou pc).',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, indisponible</span>' unavailable: '%1<span class="cke_accessibility">, indisponible</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Backspace', // MISSING
13: 'Enter', // MISSING
16: 'Shift', // MISSING
17: 'Ctrl', // MISSING
18: 'Alt', // MISSING
32: 'Space', // MISSING
35: 'End', // MISSING
36: 'Home', // MISSING
46: 'Delete', // MISSING
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Command' // MISSING
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Keyboard shortcut', // MISSING
optionDefault: 'Default' // MISSING
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -19,80 +19,129 @@
*/ */
CKEDITOR.lang[ 'fr' ] = { CKEDITOR.lang[ 'fr' ] = {
// ARIA description. // ARIA description.
editor: 'Éditeur de Texte Enrichi', editor: 'Éditeur de texte enrichi',
editorPanel: 'Tableau de bord de l\'éditeur de texte enrichi', editorPanel: 'Tableau de bord de l\'éditeur de texte enrichi',
// Common messages and labels. // Common messages and labels.
common: { common: {
// Screenreader titles. Please note that screenreaders are not always capable // Screenreader titles. Please note that screenreaders are not always capable
// of reading non-English words. So be careful while translating it. // of reading non-English words. So be careful while translating it.
editorHelp: 'Appuyez sur ALT-0 pour l\'aide', editorHelp: 'Utilisez le raccourci Alt-0 pour obtenir de l\'aide',
browseServer: 'Explorer le serveur', browseServer: 'Parcourir le serveur',
url: 'URL', url: 'URL',
protocol: 'Protocole', protocol: 'Protocole',
upload: 'Envoyer', upload: 'Télécharger',
uploadSubmit: 'Envoyer sur le serveur', uploadSubmit: 'Envoyer sur le serveur',
image: 'Image', image: 'Image',
flash: 'Flash', flash: 'Flash',
form: 'Formulaire', form: 'Formulaire',
checkbox: 'Case à cocher', checkbox: 'Case à cocher',
radio: 'Bouton Radio', radio: 'Bouton radio',
textField: 'Champ texte', textField: 'Champ texte',
textarea: 'Zone de texte', textarea: 'Zone de texte',
hiddenField: 'Champ caché', hiddenField: 'Champ invisible',
button: 'Bouton', button: 'Bouton',
select: 'Liste déroulante', select: 'Liste déroulante',
imageButton: 'Bouton image', imageButton: 'Bouton avec image',
notSet: '<non défini>', notSet: '<indéfini>',
id: 'Id', id: 'ID',
name: 'Nom', name: 'Nom',
langDir: 'Sens d\'écriture', langDir: 'Sens d\'écriture',
langDirLtr: 'Gauche à droite (LTR)', langDirLtr: 'Gauche à droite (LTR)',
langDirRtl: 'Droite à gauche (RTL)', langDirRtl: 'Droite à gauche (RTL)',
langCode: 'Code de langue', langCode: 'Code de langue',
longDescr: 'URL de description longue (longdesc => malvoyant)', longDescr: 'URL de description longue',
cssClass: 'Classe CSS', cssClass: 'Classes de style',
advisoryTitle: 'Description (title)', advisoryTitle: 'Infobulle',
cssStyle: 'Style', cssStyle: 'Style',
ok: 'OK', ok: 'OK',
cancel: 'Annuler', cancel: 'Annuler',
close: 'Fermer', close: 'Fermer',
preview: 'Aperçu', preview: 'Aperçu',
resize: 'Déplacer pour modifier la taille', resize: 'Redimensionner',
generalTab: 'Général', generalTab: 'Général',
advancedTab: 'Avancé', advancedTab: 'Avancé',
validateNumberFailed: 'Cette valeur n\'est pas un nombre.', validateNumberFailed: 'Cette valeur n\'est pas un nombre.',
confirmNewPage: 'Les changements non sauvegardés seront perdus. Êtes-vous sûr de vouloir charger une nouvelle page?', confirmNewPage: 'Les changements non sauvegardés seront perdus. Êtes-vous sûr de vouloir charger une nouvelle page ?',
confirmCancel: 'Certaines options ont été modifiées. Êtes-vous sûr de vouloir fermer?', confirmCancel: 'Certaines options ont été modifiées. Êtes-vous sûr de vouloir fermer ?',
options: 'Options', options: 'Options',
target: 'Cible (Target)', target: 'Cible',
targetNew: 'Nouvelle fenêtre (_blank)', targetNew: 'Nouvelle fenêtre (_blank)',
targetTop: 'Fenêtre supérieure (_top)', targetTop: 'Fenêtre supérieure (_top)',
targetSelf: 'Même fenêtre (_self)', targetSelf: 'Même fenêtre (_self)',
targetParent: 'Fenêtre parent (_parent)', targetParent: 'Fenêtre parent (_parent)',
langDirLTR: 'Gauche à Droite (LTR)', langDirLTR: 'Gauche à droite (LTR)',
langDirRTL: 'Droite à Gauche (RTL)', langDirRTL: 'Droite à gauche (RTL)',
styles: 'Style', styles: 'Style',
cssClasses: 'Classes de style', cssClasses: 'Classes de style',
width: 'Largeur', width: 'Largeur',
height: 'Hauteur', height: 'Hauteur',
align: 'Alignement', align: 'Alignement',
alignLeft: 'Gauche', left: 'Gauche',
alignRight: 'Droite', right: 'Droite',
alignCenter: 'Centré', center: 'Centrer',
justify: 'Justifier',
alignLeft: 'Aligner à gauche',
alignRight: 'Aligner à droite',
alignCenter: 'Align Center', // MISSING
alignTop: 'Haut', alignTop: 'Haut',
alignMiddle: 'Milieu', alignMiddle: 'Milieu',
alignBottom: 'Bas', alignBottom: 'Bas',
invalidValue : 'Valeur incorrecte.', alignNone: 'Aucun',
invalidValue: 'Valeur invalide.',
invalidHeight: 'La hauteur doit être un nombre.', invalidHeight: 'La hauteur doit être un nombre.',
invalidWidth: 'La largeur doit être un nombre.', invalidWidth: 'La largeur doit être un nombre.',
invalidCssLength: 'La valeur spécifiée pour le champ "%1" doit être un nombre positif avec ou sans unité de mesure CSS valide (px, %, in, cm, mm, em, ex, pt, ou pc).', invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidHtmlLength: 'La valeur spécifiée pour le champ "%1" doit être un nombre positif avec ou sans unité de mesure HTML valide (px ou %).', invalidCssLength: 'La valeur spécifiée pour le champ « %1 » doit être un nombre positif avec ou sans unité de mesure CSS valide (px, %, in, cm, mm, em, ex, pt, ou pc).',
invalidInlineStyle: 'La valeur spécifiée pour le style inline doit être composée d\'un ou plusieurs couples de valeur au format "nom : valeur", separés par des points-virgules.', invalidHtmlLength: 'La valeur spécifiée pour le champ « %1 » doit être un nombre positif avec ou sans unité de mesure HTML valide (px ou %).',
invalidInlineStyle: 'La valeur spécifiée pour le style en ligne doit être composée d\'un ou plusieurs couples au format « nom : valeur », séparés par des points-virgules.',
cssLengthTooltip: 'Entrer un nombre pour une valeur en pixels ou un nombre avec une unité de mesure CSS valide (px, %, in, cm, mm, em, ex, pt, ou pc).', cssLengthTooltip: 'Entrer un nombre pour une valeur en pixels ou un nombre avec une unité de mesure CSS valide (px, %, in, cm, mm, em, ex, pt, ou pc).',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, Indisponible</span>' unavailable: '%1<span class="cke_accessibility">, indisponible</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Retour arrière',
13: 'Entrée',
16: 'Majuscule',
17: 'Ctrl',
18: 'Alt',
32: 'Espace',
35: 'Fin',
36: 'Origine',
46: 'Supprimer',
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Commande'
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Raccourci clavier',
optionDefault: 'Par défaut'
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -78,21 +78,70 @@ CKEDITOR.lang[ 'gl' ] = {
width: 'Largo', width: 'Largo',
height: 'Alto', height: 'Alto',
align: 'Aliñamento', align: 'Aliñamento',
alignLeft: 'Esquerda', left: 'Esquerda',
alignRight: 'Dereita', right: 'Dereita',
alignCenter: 'Centro', center: 'Centro',
justify: 'Xustificado',
alignLeft: 'Aliñar á esquerda',
alignRight: 'Aliñar á dereita',
alignCenter: 'Align Center', // MISSING
alignTop: 'Arriba', alignTop: 'Arriba',
alignMiddle: 'Centro', alignMiddle: 'Centro',
alignBottom: 'Abaixo', alignBottom: 'Abaixo',
invalidValue : 'Valor incorrecto.', alignNone: 'Ningún',
invalidValue: 'Valor incorrecto.',
invalidHeight: 'O alto debe ser un número.', invalidHeight: 'O alto debe ser un número.',
invalidWidth: 'O largo debe ser un número.', invalidWidth: 'O largo debe ser un número.',
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidCssLength: 'O valor especificado para o campo «%1» debe ser un número positivo con ou sen unha unidade de medida CSS correcta (px, %, in, cm, mm, em, ex, pt, ou pc).', invalidCssLength: 'O valor especificado para o campo «%1» debe ser un número positivo con ou sen unha unidade de medida CSS correcta (px, %, in, cm, mm, em, ex, pt, ou pc).',
invalidHtmlLength: 'O valor especificado para o campo «%1» debe ser un número positivo con ou sen unha unidade de medida HTML correcta (px ou %).', invalidHtmlLength: 'O valor especificado para o campo «%1» debe ser un número positivo con ou sen unha unidade de medida HTML correcta (px ou %).',
invalidInlineStyle: 'O valor especificado no estilo en liña debe consistir nunha ou máis tuplas co formato «nome : valor», separadas por punto e coma.', invalidInlineStyle: 'O valor especificado no estilo en liña debe consistir nunha ou máis tuplas co formato «nome : valor», separadas por punto e coma.',
cssLengthTooltip: 'Escriba un número para o valor en píxeles ou un número cunha unidade CSS correcta (px, %, in, cm, mm, em, ex, pt, ou pc).', cssLengthTooltip: 'Escriba un número para o valor en píxeles ou un número cunha unidade CSS correcta (px, %, in, cm, mm, em, ex, pt, ou pc).',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, non dispoñíbel</span>' unavailable: '%1<span class="cke_accessibility">, non dispoñíbel</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Ir atrás',
13: 'Intro',
16: 'Maiús',
17: 'Ctrl',
18: 'Alt',
32: 'Espazo',
35: 'Fin',
36: 'Inicio',
46: 'Supr',
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Orde'
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Atallo de teclado',
optionDefault: 'Default' // MISSING
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -20,13 +20,13 @@
CKEDITOR.lang[ 'gu' ] = { CKEDITOR.lang[ 'gu' ] = {
// ARIA description. // ARIA description.
editor: 'રીચ ટેક્ષ્ત્ એડીટર', editor: 'રીચ ટેક્ષ્ત્ એડીટર',
editorPanel: 'Rich Text Editor panel', // MISSING editorPanel: 'વધુ વિકલ્પ વાળુ એડિટર',
// Common messages and labels. // Common messages and labels.
common: { common: {
// Screenreader titles. Please note that screenreaders are not always capable // Screenreader titles. Please note that screenreaders are not always capable
// of reading non-English words. So be careful while translating it. // of reading non-English words. So be careful while translating it.
editorHelp: 'પ્રેસ ALT 0 મદદ માટ', editorHelp: 'મદદ માટ ALT 0 દબાવો',
browseServer: 'સર્વર બ્રાઉઝ કરો', browseServer: 'સર્વર બ્રાઉઝ કરો',
url: 'URL', url: 'URL',
@ -78,21 +78,70 @@ CKEDITOR.lang[ 'gu' ] = {
width: 'પહોળાઈ', width: 'પહોળાઈ',
height: 'ઊંચાઈ', height: 'ઊંચાઈ',
align: 'લાઇનદોરીમાં ગોઠવવું', align: 'લાઇનદોરીમાં ગોઠવવું',
alignLeft: 'ડાબી બાજુ ગોઠવવું', left: 'ડાબી બાજુ ગોઠવવું',
alignRight: 'જમણી', right: 'જમણી',
alignCenter: 'મધ્ય સેન્ટર', center: 'મધ્ય સેન્ટર',
justify: 'બ્લૉક, અંતરાય જસ્ટિફાઇ',
alignLeft: 'ડાબી બાજુએ/બાજુ તરફ',
alignRight: 'જમણી બાજુએ/બાજુ તરફ',
alignCenter: 'Align Center', // MISSING
alignTop: 'ઉપર', alignTop: 'ઉપર',
alignMiddle: 'વચ્ચે', alignMiddle: 'વચ્ચે',
alignBottom: 'નીચે', alignBottom: 'નીચે',
invalidValue : 'Invalid value.', // MISSING alignNone: 'કઇ નહી',
invalidValue: 'અનુચિત મૂલ્ય',
invalidHeight: 'ઉંચાઈ એક આંકડો હોવો જોઈએ.', invalidHeight: 'ઉંચાઈ એક આંકડો હોવો જોઈએ.',
invalidWidth: 'પોહળ ઈ એક આંકડો હોવો જોઈએ.', invalidWidth: 'પોહળ ઈ એક આંકડો હોવો જોઈએ.',
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidCssLength: '"%1" ની વેલ્યુ એક પોસીટીવ આંકડો હોવો જોઈએ અથવા CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc) વગર.', invalidCssLength: '"%1" ની વેલ્યુ એક પોસીટીવ આંકડો હોવો જોઈએ અથવા CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc) વગર.',
invalidHtmlLength: '"%1" ની વેલ્યુ એક પોસીટીવ આંકડો હોવો જોઈએ અથવા HTML measurement unit (px or %) વગર.', invalidHtmlLength: '"%1" ની વેલ્યુ એક પોસીટીવ આંકડો હોવો જોઈએ અથવા HTML measurement unit (px or %) વગર.',
invalidInlineStyle: 'ઈનલાઈન સ્ટાઈલ ની વેલ્યુ "name : value" ના ફોર્મેટ માં હોવી જોઈએ, વચ્ચે સેમી-કોલોન જોઈએ.', invalidInlineStyle: 'ઈનલાઈન સ્ટાઈલ ની વેલ્યુ "name : value" ના ફોર્મેટ માં હોવી જોઈએ, વચ્ચે સેમી-કોલોન જોઈએ.',
cssLengthTooltip: 'પિક્ષ્લ્ નો આંકડો CSS unit (px, %, in, cm, mm, em, ex, pt, or pc) માં નાખો.', cssLengthTooltip: 'પિક્ષ્લ્ નો આંકડો CSS unit (px, %, in, cm, mm, em, ex, pt, or pc) માં નાખો.',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, નથી મળતું</span>' unavailable: '%1<span class="cke_accessibility">, નથી મળતું</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Backspace કી',
13: 'Enter કી',
16: 'Shift કી',
17: 'Ctrl કી',
18: 'Alt કી',
32: 'Space કી',
35: 'End કી',
36: 'Home કી',
46: 'Delete કી',
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Command કી'
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'કીબોર્ડ શૉર્ટકટ',
optionDefault: 'Default' // MISSING
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -78,21 +78,70 @@ CKEDITOR.lang[ 'he' ] = {
width: 'רוחב', width: 'רוחב',
height: 'גובה', height: 'גובה',
align: 'יישור', align: 'יישור',
alignLeft: 'לשמאל', left: 'לשמאל',
alignRight: 'לימין', right: 'לימין',
alignCenter: 'מרכז', center: 'מרכז',
justify: 'יישור לשוליים',
alignLeft: 'יישור לשמאל',
alignRight: 'יישור לימין',
alignCenter: 'Align Center', // MISSING
alignTop: 'למעלה', alignTop: 'למעלה',
alignMiddle: 'לאמצע', alignMiddle: 'לאמצע',
alignBottom: 'לתחתית', alignBottom: 'לתחתית',
invalidValue : 'ערך לא חוקי.', alignNone: 'None', // MISSING
invalidValue: 'ערך לא חוקי.',
invalidHeight: 'הגובה חייב להיות מספר.', invalidHeight: 'הגובה חייב להיות מספר.',
invalidWidth: 'הרוחב חייב להיות מספר.', invalidWidth: 'הרוחב חייב להיות מספר.',
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidCssLength: 'הערך שצוין לשדה "%1" חייב להיות מספר חיובי עם או ללא יחידת מידה חוקית של CSS (px, %, in, cm, mm, em, ex, pt, או pc).', invalidCssLength: 'הערך שצוין לשדה "%1" חייב להיות מספר חיובי עם או ללא יחידת מידה חוקית של CSS (px, %, in, cm, mm, em, ex, pt, או pc).',
invalidHtmlLength: 'הערך שצוין לשדה "%1" חייב להיות מספר חיובי עם או ללא יחידת מידה חוקית של HTML (px או %).', invalidHtmlLength: 'הערך שצוין לשדה "%1" חייב להיות מספר חיובי עם או ללא יחידת מידה חוקית של HTML (px או %).',
invalidInlineStyle: 'הערך שצויין לשדה הסגנון חייב להכיל זוג ערכים אחד או יותר בפורמט "שם : ערך", מופרדים על ידי נקודה-פסיק.', invalidInlineStyle: 'הערך שצויין לשדה הסגנון חייב להכיל זוג ערכים אחד או יותר בפורמט "שם : ערך", מופרדים על ידי נקודה-פסיק.',
cssLengthTooltip: 'יש להכניס מספר המייצג פיקסלים או מספר עם יחידת גליונות סגנון תקינה (px, %, in, cm, mm, em, ex, pt, או pc).', cssLengthTooltip: 'יש להכניס מספר המייצג פיקסלים או מספר עם יחידת גליונות סגנון תקינה (px, %, in, cm, mm, em, ex, pt, או pc).',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, לא זמין</span>' unavailable: '%1<span class="cke_accessibility">, לא זמין</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Backspace',
13: 'Enter',
16: 'Shift',
17: 'Ctrl',
18: 'Alt',
32: 'Space', // MISSING
35: 'End',
36: 'Home',
46: 'מחק',
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Command' // MISSING
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Keyboard shortcut', // MISSING
optionDefault: 'Default' // MISSING
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -78,21 +78,70 @@ CKEDITOR.lang[ 'hi' ] = {
width: 'चौड़ाई', width: 'चौड़ाई',
height: 'ऊँचाई', height: 'ऊँचाई',
align: 'ऍलाइन', align: 'ऍलाइन',
alignLeft: 'दायें', left: 'दायें',
alignRight: 'दायें', right: 'दायें',
alignCenter: 'बीच में', center: 'बीच में',
justify: 'ब्लॉक जस्टीफ़ाई',
alignLeft: 'बायीं तरफ',
alignRight: 'दायीं तरफ',
alignCenter: 'Align Center', // MISSING
alignTop: 'ऊपर', alignTop: 'ऊपर',
alignMiddle: 'मध्य', alignMiddle: 'मध्य',
alignBottom: 'नीचे', alignBottom: 'नीचे',
invalidValue : 'Invalid value.', // MISSING alignNone: 'None', // MISSING
invalidValue: 'Invalid value.', // MISSING
invalidHeight: 'Height must be a number.', // MISSING invalidHeight: 'Height must be a number.', // MISSING
invalidWidth: 'Width must be a number.', // MISSING invalidWidth: 'Width must be a number.', // MISSING
invalidLength: 'Value specified for the "%1" field must be a positive number with or without a valid measurement unit (%2).', // MISSING
invalidCssLength: 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING invalidCssLength: 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
invalidHtmlLength: 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).', // MISSING invalidHtmlLength: 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).', // MISSING
invalidInlineStyle: 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.', // MISSING invalidInlineStyle: 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.', // MISSING
cssLengthTooltip: 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING cssLengthTooltip: 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, unavailable</span>' // MISSING unavailable: '%1<span class="cke_accessibility">, unavailable</span>', // MISSING
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Backspace', // MISSING
13: 'Enter', // MISSING
16: 'Shift', // MISSING
17: 'Ctrl', // MISSING
18: 'Alt', // MISSING
32: 'Space', // MISSING
35: 'End', // MISSING
36: 'Home', // MISSING
46: 'Delete', // MISSING
112: 'F1', // MISSING
113: 'F2', // MISSING
114: 'F3', // MISSING
115: 'F4', // MISSING
116: 'F5', // MISSING
117: 'F6', // MISSING
118: 'F7', // MISSING
119: 'F8', // MISSING
120: 'F9', // MISSING
121: 'F10', // MISSING
122: 'F11', // MISSING
123: 'F12', // MISSING
124: 'F13', // MISSING
125: 'F14', // MISSING
126: 'F15', // MISSING
127: 'F16', // MISSING
128: 'F17', // MISSING
129: 'F18', // MISSING
130: 'F19', // MISSING
131: 'F20', // MISSING
132: 'F21', // MISSING
133: 'F22', // MISSING
134: 'F23', // MISSING
135: 'F24', // MISSING
224: 'Command' // MISSING
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Keyboard shortcut', // MISSING
optionDefault: 'Default' // MISSING
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -78,21 +78,70 @@ CKEDITOR.lang[ 'hr' ] = {
width: 'Širina', width: 'Širina',
height: 'Visina', height: 'Visina',
align: 'Poravnanje', align: 'Poravnanje',
alignLeft: 'Lijevo', left: 'Lijevo',
alignRight: 'Desno', right: 'Desno',
alignCenter: 'Središnje', center: 'Središnje',
justify: 'Blok poravnanje',
alignLeft: 'Lijevo poravnanje',
alignRight: 'Desno poravnanje',
alignCenter: 'Align Center', // MISSING
alignTop: 'Vrh', alignTop: 'Vrh',
alignMiddle: 'Sredina', alignMiddle: 'Sredina',
alignBottom: 'Dolje', alignBottom: 'Dolje',
invalidValue : 'Neispravna vrijednost.', alignNone: 'Bez poravnanja',
invalidValue: 'Neispravna vrijednost.',
invalidHeight: 'Visina mora biti broj.', invalidHeight: 'Visina mora biti broj.',
invalidWidth: 'Širina mora biti broj.', invalidWidth: 'Širina mora biti broj.',
invalidLength: 'Naznačena vrijednost polja "%1" mora biti pozitivni broj sa ili bez važeće mjerne jedinice (%2).',
invalidCssLength: 'Vrijednost određena za "%1" polje mora biti pozitivni broj sa ili bez važećih CSS mjernih jedinica (px, %, in, cm, mm, em, ex, pt ili pc).', invalidCssLength: 'Vrijednost određena za "%1" polje mora biti pozitivni broj sa ili bez važećih CSS mjernih jedinica (px, %, in, cm, mm, em, ex, pt ili pc).',
invalidHtmlLength: 'Vrijednost određena za "%1" polje mora biti pozitivni broj sa ili bez važećih HTML mjernih jedinica (px ili %).', invalidHtmlLength: 'Vrijednost određena za "%1" polje mora biti pozitivni broj sa ili bez važećih HTML mjernih jedinica (px ili %).',
invalidInlineStyle: 'Vrijednost za linijski stil mora sadržavati jednu ili više definicija s formatom "naziv:vrijednost", odvojenih točka-zarezom.', invalidInlineStyle: 'Vrijednost za linijski stil mora sadržavati jednu ili više definicija s formatom "naziv:vrijednost", odvojenih točka-zarezom.',
cssLengthTooltip: 'Unesite broj za vrijednost u pikselima ili broj s važećim CSS mjernim jedinicama (px, %, in, cm, mm, em, ex, pt ili pc).', cssLengthTooltip: 'Unesite broj za vrijednost u pikselima ili broj s važećim CSS mjernim jedinicama (px, %, in, cm, mm, em, ex, pt ili pc).',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, nedostupno</span>' unavailable: '%1<span class="cke_accessibility">, nedostupno</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Backspace',
13: 'Enter',
16: 'Shift',
17: 'Ctrl',
18: 'Alt',
32: 'Space',
35: 'End',
36: 'Home',
46: 'Delete',
112: 'F1',
113: 'F2',
114: 'F3',
115: 'F4',
116: 'F5',
117: 'F6',
118: 'F7',
119: 'F8',
120: 'F9',
121: 'F10',
122: 'F11',
123: 'F12',
124: 'F13',
125: 'F14',
126: 'F15',
127: 'F16',
128: 'F17',
129: 'F18',
130: 'F19',
131: 'F20',
132: 'F21',
133: 'F22',
134: 'F23',
135: 'F24',
224: 'Command'
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Prečica na tipkovnici',
optionDefault: 'Zadano'
} }
}; };

View File

@ -1,6 +1,6 @@
/** /**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
/** /**
@ -78,21 +78,70 @@ CKEDITOR.lang[ 'hu' ] = {
width: 'Szélesség', width: 'Szélesség',
height: 'Magasság', height: 'Magasság',
align: 'Igazítás', align: 'Igazítás',
alignLeft: 'Bal', left: 'Bal',
right: 'Jobbra',
center: 'Középre',
justify: 'Sorkizárt',
alignLeft: 'Balra',
alignRight: 'Jobbra', alignRight: 'Jobbra',
alignCenter: 'Középre', alignCenter: 'Align Center', // MISSING
alignTop: 'Tetejére', alignTop: 'Tetejére',
alignMiddle: 'Középre', alignMiddle: 'Középre',
alignBottom: 'Aljára', alignBottom: 'Aljára',
invalidValue : 'Érvénytelen érték.', alignNone: 'Semmi',
invalidValue: 'Érvénytelen érték.',
invalidHeight: 'A magasság mezőbe csak számokat írhat.', invalidHeight: 'A magasság mezőbe csak számokat írhat.',
invalidWidth: 'A szélesség mezőbe csak számokat írhat.', invalidWidth: 'A szélesség mezőbe csak számokat írhat.',
invalidLength: 'A megadott értéknek a "%1" mezőben pozitív számnak kell lennie, egy érvényes mértékegységgel vagy anélkül (%2).',
invalidCssLength: '"%1"-hez megadott érték csakis egy pozitív szám lehet, esetleg egy érvényes CSS egységgel megjelölve(px, %, in, cm, mm, em, ex, pt vagy pc).', invalidCssLength: '"%1"-hez megadott érték csakis egy pozitív szám lehet, esetleg egy érvényes CSS egységgel megjelölve(px, %, in, cm, mm, em, ex, pt vagy pc).',
invalidHtmlLength: '"%1"-hez megadott érték csakis egy pozitív szám lehet, esetleg egy érvényes HTML egységgel megjelölve(px vagy %).', invalidHtmlLength: '"%1"-hez megadott érték csakis egy pozitív szám lehet, esetleg egy érvényes HTML egységgel megjelölve(px vagy %).',
invalidInlineStyle: 'Az inline stílusnak megadott értéknek tartalmaznia kell egy vagy több rekordot a "name : value" formátumban, pontosvesszővel elválasztva.', invalidInlineStyle: 'Az inline stílusnak megadott értéknek tartalmaznia kell egy vagy több rekordot a "name : value" formátumban, pontosvesszővel elválasztva.',
cssLengthTooltip: 'Adjon meg egy számot értéknek pixelekben vagy egy számot érvényes CSS mértékegységben (px, %, in, cm, mm, em, ex, pt, vagy pc).', cssLengthTooltip: 'Adjon meg egy számot értéknek pixelekben vagy egy számot érvényes CSS mértékegységben (px, %, in, cm, mm, em, ex, pt, vagy pc).',
// Put the voice-only part of the label in the span. // Put the voice-only part of the label in the span.
unavailable: '%1<span class="cke_accessibility">, nem elérhető</span>' unavailable: '%1<span class="cke_accessibility">, nem elérhető</span>',
// Keyboard keys translations used for creating shortcuts descriptions in tooltips, context menus and ARIA labels.
keyboard: {
8: 'Backspace',
13: 'Enter',
16: 'Shift',
17: 'Ctrl',
18: 'Alt',
32: 'Space',
35: 'End',
36: 'Home',
46: 'Delete',
112: 'F1',
113: 'F2',
114: 'F3',
115: 'F4',
116: 'F5',
117: 'F6',
118: 'F7',
119: 'F8',
120: 'F9',
121: 'F10',
122: 'F11',
123: 'F12',
124: 'F13',
125: 'F14',
126: 'F15',
127: 'F16',
128: 'F17',
129: 'F18',
130: 'F19',
131: 'F20',
132: 'F21',
133: 'F22',
134: 'F23',
135: 'F24',
224: 'Command'
},
// Prepended to ARIA labels with shortcuts.
keyboardShortcut: 'Gyorsbillentyű',
optionDefault: 'Alapértelmezett'
} }
}; };

Some files were not shown because too many files have changed in this diff Show More